Overhaul of the director system and opening quests. Private Areas further implemented as well.

This commit is contained in:
Filip Maj 2017-03-07 00:09:37 -05:00
parent dcaad5729d
commit e898c045f7
69 changed files with 2602 additions and 1816 deletions

View file

@ -298,6 +298,19 @@ namespace FFXIVClassic_Map_Server.Actors
if (!mActorList.ContainsKey(id))
return null;
return mActorList[id];
}
public Actor FindActorInZoneByUniqueID(string uniqueId)
{
foreach (Actor a in mActorList.Values)
{
if (a is Npc)
{
if (((Npc)a).GetUniqueId().ToLower().Equals(uniqueId))
return a;
}
}
return null;
}
public Player FindPCInZone(string name)
@ -360,7 +373,16 @@ namespace FFXIVClassic_Map_Server.Actors
if (actorClass == null)
return;
Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, actorId, location.x, location.y, location.z, location.rot, location.state, location.animId, null);
uint zoneId;
if (this is PrivateArea)
zoneId = ((PrivateArea)this).GetParentZone().actorId;
else
zoneId = actorId;
Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, this, location.x, location.y, location.z, location.rot, location.state, location.animId, null);
npc.LoadEventConditions(actorClass.eventConditions);
AddActorToZone(npc);