Added things for testing mapobjs.

This commit is contained in:
Filip Maj 2017-05-05 02:37:01 -04:00
parent 9505cd71be
commit 08b3564d7e
7 changed files with 280 additions and 20 deletions

View file

@ -407,6 +407,34 @@ namespace FFXIVClassic_Map_Server.Actors
return npc;
}
public Npc SpawnActor(uint classId, string uniqueId, float x, float y, float z, uint regionId, uint layoutId)
{
ActorClass actorClass = Server.GetWorldManager().GetActorClass(classId);
if (actorClass == null)
return null;
uint zoneId;
if (this is PrivateArea)
zoneId = ((PrivateArea)this).GetParentZone().actorId;
else
zoneId = actorId;
Npc npc = new Npc(mActorList.Count + 1, actorClass, uniqueId, this, x, y, z, 0, regionId, layoutId);
npc.LoadEventConditions(actorClass.eventConditions);
AddActorToZone(npc);
return npc;
}
public void DespawnActor(string uniqueId)
{
RemoveActorFromZone(FindActorInZoneByUniqueID(uniqueId));
}
public Director GetWeatherDirector()
{
return mWeatherDirector;