Browse Source

mobs don't go home while in combat range

master
FatBoy-DOTC 1 year ago
parent
commit
b154f7ee7f
  1. 3
      src/engine/ai/MobileFSM.java

3
src/engine/ai/MobileFSM.java

@ -486,6 +486,9 @@ public class MobileFSM {
AttackTarget(mob, mob.getCombatTarget()); AttackTarget(mob, mob.getCombatTarget());
} }
private static void CheckToSendMobHome(Mob mob) { private static void CheckToSendMobHome(Mob mob) {
if(CombatUtilities.inRangeToAttack(mob, mob.getCombatTarget()) == true){
return;
}
if (mob.isPlayerGuard() && !mob.despawned) { if (mob.isPlayerGuard() && !mob.despawned) {
City current = ZoneManager.getCityAtLocation(mob.getLoc()); City current = ZoneManager.getCityAtLocation(mob.getLoc());
if (current == null || current.equals(mob.getGuild().getOwnedCity()) == false || mob.playerAgroMap.isEmpty()) { if (current == null || current.equals(mob.getGuild().getOwnedCity()) == false || mob.playerAgroMap.isEmpty()) {

Loading…
Cancel
Save