fixed auto attacking self/npcs

This commit is contained in:
Tahir Akhlaq
2017-08-24 16:36:56 +01:00
parent 5e2487c8cc
commit 88abd59ec3
4 changed files with 20 additions and 8 deletions

View File

@@ -44,15 +44,16 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.state
return true;
}
*/
if (owner.target != target || owner.target?.actorId != owner.currentLockedTarget)
owner.aiContainer.ChangeTarget(target = Server.GetWorldManager().GetActorInWorld(owner.currentLockedTarget) as Character);
if (target == null || target.IsDead())
{
//if (owner.currentSubState == SetActorStatePacket.SUB_STATE_MONSTER)
// target = ((BattleNpc)owner).hateContainer.GetMostHatedTarget();
}
else
{
if (owner.target != target || owner.target.actorId != owner.currentLockedTarget)
owner.aiContainer.ChangeTarget(target = Server.GetWorldManager().GetActorInWorld(owner.currentLockedTarget) as Character);
if (IsAttackReady())
{
if (CanAttack())