|
|
@ -658,6 +658,17 @@ public class MobAI { |
|
|
|
//no players loaded, no need to proceed
|
|
|
|
//no players loaded, no need to proceed
|
|
|
|
|
|
|
|
|
|
|
|
if (mob.playerAgroMap.isEmpty()) { |
|
|
|
if (mob.playerAgroMap.isEmpty()) { |
|
|
|
|
|
|
|
//attempt to reload agro map
|
|
|
|
|
|
|
|
HashSet<AbstractWorldObject> players = WorldGrid.getObjectsInRangePartial(mob.loc, mob.getAggroRange(), MBServerStatics.MASK_PLAYER); |
|
|
|
|
|
|
|
if(players.size() > 0){ |
|
|
|
|
|
|
|
for(AbstractWorldObject player : players){ |
|
|
|
|
|
|
|
if(mob.playerAgroMap.containsKey(player.getObjectUUID()) == false) { |
|
|
|
|
|
|
|
PlayerCharacter pc = (PlayerCharacter) player; |
|
|
|
|
|
|
|
mob.playerAgroMap.put(pc.getObjectUUID(), 0.0f); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(mob.getCombatTarget() != null) |
|
|
|
if(mob.getCombatTarget() != null) |
|
|
|
mob.setCombatTarget(null); |
|
|
|
mob.setCombatTarget(null); |
|
|
|
return; |
|
|
|
return; |
|
|
|