From 30d302c43e1a3c3ddbe6d7608811eec2ac4cae19 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 30 Apr 2024 21:45:28 -0500 Subject: [PATCH] Lore Guards use charter restrictions when aggroing --- src/engine/mobileAI/MobAI.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 005179da..a9989fdb 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -1090,6 +1090,11 @@ public class MobAI { 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) return true; @@ -1213,6 +1218,11 @@ public class MobAI { if (potentialTarget.equals(mob.getCombatTarget())) 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)) { CurrentHateValue = mob.playerAgroMap.get(potentialTarget.getObjectUUID()).floatValue(); mostHatedTarget = potentialTarget;