Browse Source

guards use proper aggro rules for added aggro check

master
FatBoy-DOTC 2 years ago
parent
commit
ca11651be6
  1. 7
      src/engine/ai/MobileFSM.java

7
src/engine/ai/MobileFSM.java

@ -484,8 +484,15 @@ public class MobileFSM {
} }
private static void CheckToSendMobHome(Mob mob) { private static void CheckToSendMobHome(Mob mob) {
if(mob.BehaviourType.isAgressive) { if(mob.BehaviourType.isAgressive) {
if(mob.isPlayerGuard())
{
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardCaptain.ordinal()){
CheckForPlayerGuardAggro(mob);
}
} else {
CheckForAggro(mob); CheckForAggro(mob);
} }
}
if(mob.getCombatTarget() != null && CombatUtilities.inRange2D(mob,mob.getCombatTarget(),MBServerStatics.AI_BASE_AGGRO_RANGE * 0.5f)){ if(mob.getCombatTarget() != null && CombatUtilities.inRange2D(mob,mob.getCombatTarget(),MBServerStatics.AI_BASE_AGGRO_RANGE * 0.5f)){
return; return;
} }

Loading…
Cancel
Save