Browse Source

mob aggro

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
23e0a0dcc7
  1. 4
      src/engine/mobileAI/MobAI.java

4
src/engine/mobileAI/MobAI.java

@ -243,6 +243,7 @@ public class MobAI {
target.setCombatTarget(mob); target.setCombatTarget(mob);
} }
} }
target.setCombatTarget(mob);
} catch (Exception e) { } catch (Exception e) {
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackMob" + " " + e.getMessage()); Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackMob" + " " + e.getMessage());
} }
@ -1367,6 +1368,9 @@ public class MobAI {
try { try {
float CurrentHateValue = 0; float CurrentHateValue = 0;
if (mob.getCombatTarget() != null && mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.Mob)){
return mob.getCombatTarget();
}
if (mob.getCombatTarget() != null && mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter)) if (mob.getCombatTarget() != null && mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter))
CurrentHateValue = mob.playerAgroMap.get(mob.combatTarget.getObjectUUID()).floatValue(); CurrentHateValue = mob.playerAgroMap.get(mob.combatTarget.getObjectUUID()).floatValue();

Loading…
Cancel
Save