mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
moved ally engage stuff to ContentArea onUpdate
This commit is contained in:
@@ -421,6 +421,11 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
return GetAllActors<BattleNpc>();
|
||||
}
|
||||
|
||||
public virtual List<Ally> GetAllies()
|
||||
{
|
||||
return GetAllActors<Ally>();
|
||||
}
|
||||
|
||||
public void BroadcastPacketsAroundActor(Actor actor, List<SubPacket> packets)
|
||||
{
|
||||
foreach (SubPacket packet in packets)
|
||||
@@ -662,11 +667,14 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
lock (mActorList)
|
||||
{
|
||||
foreach (Actor a in mActorList.Values)
|
||||
foreach (Actor a in mActorList.Values.ToList())
|
||||
a.Update(tick);
|
||||
|
||||
var deltaTime = (tick - Program.LastTick).TotalMilliseconds;
|
||||
LuaEngine.GetInstance().CallLuaFunction(null, this, "onUpdate", true, deltaTime, this);
|
||||
if ((tick - lastUpdateScript).TotalMilliseconds > 1500)
|
||||
{
|
||||
LuaEngine.GetInstance().CallLuaFunctionForReturn(LuaEngine.GetScriptPath(this), "onUpdate", true, this, tick);
|
||||
lastUpdateScript = tick;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user