mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-11 23:14:39 +02:00
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:
parent
b9bfe5e985
commit
2c9ae60bbf
9 changed files with 131 additions and 36 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue