Browse Source

mob aggro

lakebane-master
FatBoy-DOTC 8 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 { @@ -243,6 +243,7 @@ public class MobAI {
target.setCombatTarget(mob);
}
}
target.setCombatTarget(mob);
} catch (Exception e) {
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackMob" + " " + e.getMessage());
}
@ -1367,6 +1368,9 @@ public class MobAI { @@ -1367,6 +1368,9 @@ public class MobAI {
try {
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))
CurrentHateValue = mob.playerAgroMap.get(mob.combatTarget.getObjectUUID()).floatValue();

Loading…
Cancel
Save