corrected mob to use correct substate

- added global tick
- stubbed some more functions
- added checks for engaged/dead
- todo: everything else
This commit is contained in:
Tahir Akhlaq 2017-06-14 20:01:15 +01:00
parent b9bfe5e985
commit 2c9ae60bbf
9 changed files with 131 additions and 36 deletions

View file

@ -160,7 +160,7 @@ namespace FFXIVClassic_Map_Server.Actors
var pos = positionUpdates[0];
if (this is Character)
((Character)this).OnPath(ref pos);
((Character)this).OnPath(pos);
positionX = pos.X;
positionY = pos.Y;
@ -642,6 +642,31 @@ namespace FFXIVClassic_Map_Server.Actors
return new Vector3(positionX + x, positionY, positionZ + z);
}
public Player GetAsPlayer()
{
return currentSubState == SetActorStatePacket.SUB_STATE_PLAYER && this is Player ? ((Player)this) : null;
}
public Mob GetAsMob()
{
return currentSubState == SetActorStatePacket.SUB_STATE_MONSTER && this is Mob ? ((Mob)this) : null;
}
public Npc GetAsNpc()
{
return currentSubState != SetActorStatePacket.SUB_STATE_PLAYER && this is Npc ? ((Npc)this) : null;
}
public Actor GetAsActor()
{
return this is Actor ? ((Actor)this) : null;
}
public Character GetAsCharacter()
{
return this is Character ? ((Character)this) : null;
}
}
}