Browse Source

Lore Guards use charter restrictions when aggroing

combat-2
FatBoy-DOTC 8 months ago
parent
commit
30d302c43e
  1. 10
      src/engine/mobileAI/MobAI.java

10
src/engine/mobileAI/MobAI.java

@ -1090,6 +1090,11 @@ public class MobAI {
try { try {
if (ConfigManager.MB_RULESET.getValue().equals("LORE") && target.guild.equals(Guild.getErrantGuild()) == false) {
if(mob.guild.charter.equals(target.guild.charter) == true)
return false;
}
if (mob.guardedCity.cityOutlaws.contains(target.getObjectUUID()) == true) if (mob.guardedCity.cityOutlaws.contains(target.getObjectUUID()) == true)
return true; return true;
@ -1213,6 +1218,11 @@ public class MobAI {
if (potentialTarget.equals(mob.getCombatTarget())) if (potentialTarget.equals(mob.getCombatTarget()))
continue; continue;
if (ConfigManager.MB_RULESET.getValue().equals("LORE") && potentialTarget.guild.equals(Guild.getErrantGuild()) == false) {
if(mob.guild.charter.equals(potentialTarget.guild.charter) == true)
continue;
}
if (potentialTarget != null && mob.playerAgroMap.get(potentialTarget.getObjectUUID()).floatValue() > CurrentHateValue && MovementUtilities.inRangeToAggro(mob, potentialTarget)) { if (potentialTarget != null && mob.playerAgroMap.get(potentialTarget.getObjectUUID()).floatValue() > CurrentHateValue && MovementUtilities.inRangeToAggro(mob, potentialTarget)) {
CurrentHateValue = mob.playerAgroMap.get(potentialTarget.getObjectUUID()).floatValue(); CurrentHateValue = mob.playerAgroMap.get(potentialTarget.getObjectUUID()).floatValue();
mostHatedTarget = potentialTarget; mostHatedTarget = potentialTarget;

Loading…
Cancel
Save