mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 14:34:32 +02:00
More cleanup (moved groups to WorldMaster class) and fixed the project file.
This commit is contained in:
parent
2cc63960a7
commit
31446f37fa
10 changed files with 227 additions and 127 deletions
|
@ -82,7 +82,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
GetActor().zone.UpdateActorPosition(GetActor());
|
||||
|
||||
}
|
||||
|
||||
long lastMilis = 0;
|
||||
public void UpdateInstance(List<Actor> list)
|
||||
{
|
||||
if (isUpdatesLocked)
|
||||
|
@ -95,11 +95,29 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
//Remove missing actors
|
||||
for (int i = 0; i < actorInstanceList.Count; i++)
|
||||
{
|
||||
if (list.Contains(actorInstanceList[i]) && actorInstanceList[i] is Npc)
|
||||
{
|
||||
Npc npc = (Npc)actorInstanceList[i];
|
||||
|
||||
|
||||
long milliseconds = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
|
||||
|
||||
|
||||
if (npc.GetUniqueId().Equals("1") && milliseconds - lastMilis > 1000)
|
||||
{
|
||||
lastMilis = milliseconds;
|
||||
GetActor().QueuePacket(RemoveActorPacket.BuildPacket(playerActor.actorId, actorInstanceList[i].actorId));
|
||||
actorInstanceList.RemoveAt(i);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!list.Contains(actorInstanceList[i]))
|
||||
{
|
||||
GetActor().QueuePacket(RemoveActorPacket.BuildPacket(playerActor.actorId, actorInstanceList[i].actorId));
|
||||
actorInstanceList.RemoveAt(i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Add new actors or move
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue