|
|
|
@ -973,9 +973,20 @@ public class MobAI {
@@ -973,9 +973,20 @@ public class MobAI {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void hamletGuardAggro(Mob mob) { |
|
|
|
|
City guardedCity = mob.guardedCity; |
|
|
|
|
City atLocation = ZoneManager.getCityAtLocation(mob.loc); |
|
|
|
|
Realm realm = RealmMap.getRealmAtLocation(mob.loc); |
|
|
|
|
if(realm.getRealmName().equals("Uthgaard")){ |
|
|
|
|
HashSet<AbstractWorldObject> loadedMobs = WorldGrid.getObjectsInRangePartial(mob.loc, MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_MOB); |
|
|
|
|
for (AbstractWorldObject awo : loadedMobs) { |
|
|
|
|
Mob targetMob = (Mob) awo; |
|
|
|
|
if (!targetMob.isAlive() || targetMob.despawned) |
|
|
|
|
continue; |
|
|
|
|
if (targetMob.isPet()) |
|
|
|
|
continue; |
|
|
|
|
mob.combatTarget = targetMob; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
HashSet<AbstractWorldObject> loadedPlayers = WorldGrid.getObjectsInRangePartial(mob.loc, MobAIThread.AI_BASE_AGGRO_RANGE, MBServerStatics.MASK_PLAYER); |
|
|
|
|
for (AbstractWorldObject awo : loadedPlayers) { |
|
|
|
|
PlayerCharacter pc = (PlayerCharacter) awo; |
|
|
|
|