mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-24 18:10:51 +02:00
moved ally engage stuff to ContentArea onUpdate
This commit is contained in:
parent
520ae7a119
commit
27200b8df5
15 changed files with 115 additions and 98 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue