|
|
@ -305,6 +305,13 @@ public class MobileFSM { |
|
|
|
public static void DetermineAction(Mob mob) { |
|
|
|
public static void DetermineAction(Mob mob) { |
|
|
|
if (mob == null) |
|
|
|
if (mob == null) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
if (mob.playerAgroMap.isEmpty() && !mob.isPlayerGuard) |
|
|
|
|
|
|
|
//no players loaded, no need to proceed
|
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
else{ |
|
|
|
|
|
|
|
if(mob.isPlayerGuard && mob.guardedCity._playerMemory.size() < 1 && mob.playerAgroMap.isEmpty()) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
if (mob.despawned && mob.isPlayerGuard) { |
|
|
|
if (mob.despawned && mob.isPlayerGuard) { |
|
|
|
//override for guards
|
|
|
|
//override for guards
|
|
|
|
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){ |
|
|
|
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){ |
|
|
@ -326,9 +333,6 @@ public class MobileFSM { |
|
|
|
CheckForRespawn(mob); |
|
|
|
CheckForRespawn(mob); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (mob.playerAgroMap.isEmpty()) |
|
|
|
|
|
|
|
//no players loaded, no need to proceed
|
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
if (mob.isCombat() && mob.getCombatTarget() == null) { |
|
|
|
if (mob.isCombat() && mob.getCombatTarget() == null) { |
|
|
|
mob.setCombat(false); |
|
|
|
mob.setCombat(false); |
|
|
|
UpdateStateMsg rwss = new UpdateStateMsg(); |
|
|
|
UpdateStateMsg rwss = new UpdateStateMsg(); |
|
|
|