|
|
@ -719,8 +719,8 @@ public class MobileFSM { |
|
|
|
for (Entry playerEntry : mob.playerAgroMap.entrySet()) { |
|
|
|
for (Entry playerEntry : mob.playerAgroMap.entrySet()) { |
|
|
|
PlayerCharacter potentialTarget = PlayerCharacter.getFromCache((int)playerEntry.getKey()); |
|
|
|
PlayerCharacter potentialTarget = PlayerCharacter.getFromCache((int)playerEntry.getKey()); |
|
|
|
if(potentialTarget != null && potentialTarget.getHateValue() > CurrentHateValue){ |
|
|
|
if(potentialTarget != null && potentialTarget.getHateValue() > CurrentHateValue){ |
|
|
|
CurrentHateValue = ((AbstractCharacter)playerEntry.getKey()).getHateValue(); |
|
|
|
CurrentHateValue = potentialTarget.getHateValue(); |
|
|
|
mostHatedTarget = PlayerCharacter.getFromCache((int)playerEntry.getKey()); |
|
|
|
mostHatedTarget = potentialTarget; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return mostHatedTarget; |
|
|
|
return mostHatedTarget; |
|
|
|