Browse Source

mob aggro issue

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
8156f261fc
  1. 13
      src/engine/mobileAI/MobAI.java

13
src/engine/mobileAI/MobAI.java

@ -727,7 +727,7 @@ public class MobAI { @@ -727,7 +727,7 @@ public class MobAI {
}
}
private static void CheckForAggro(Mob aiAgent) {
private static void CheckForAggro(Mob aiAgent, boolean pets) {
try {
@ -735,7 +735,7 @@ public class MobAI { @@ -735,7 +735,7 @@ public class MobAI {
if (!aiAgent.isAlive())
return;
if(!pets) {
ConcurrentHashMap<Integer, Float> loadedPlayers = aiAgent.playerAgroMap;
for (Entry playerEntry : loadedPlayers.entrySet()) {
@ -778,8 +778,7 @@ public class MobAI { @@ -778,8 +778,7 @@ public class MobAI {
}
}
if (aiAgent.getCombatTarget() == null) {
} else{
//look for pets to aggro if no players found to aggro
@ -952,7 +951,7 @@ public class MobAI { @@ -952,7 +951,7 @@ public class MobAI {
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardCaptain))
CheckForPlayerGuardAggro(mob);
} else {
CheckForAggro(mob);
CheckForAggro(mob,false);
}
}
@ -1212,9 +1211,9 @@ public class MobAI { @@ -1212,9 +1211,9 @@ public class MobAI {
if (mob.behaviourType == Enum.MobBehaviourType.HamletGuard) {
SafeGuardAggro(mob); //safehold guard
}else {
CheckForAggro(mob); //normal aggro
CheckForAggro(mob,false); //normal aggro
if(mob.combatTarget == null)
SafeGuardAggro(mob); // look for pets if no players to aggro
CheckForAggro(mob,true); // look for pets if no players to aggro
}
}
}

Loading…
Cancel
Save