Browse Source

.contains check needed.

combat-2
MagicBot 1 year ago
parent
commit
ef3e3a0392
  1. 7
      src/engine/gameManager/CombatManager.java

7
src/engine/gameManager/CombatManager.java

@ -826,8 +826,8 @@ public enum CombatManager { @@ -826,8 +826,8 @@ public enum CombatManager {
damage *= 2.5f; //increase damage if sitting
if (tarAc.getObjectType() == GameObjectType.Mob) {
if(ac.getObjectType().equals(GameObjectType.PlayerCharacter))
((Mob)tarAc).playerAgroMap.put(ac.getObjectUUID(), ((Mob) tarAc).playerAgroMap.get(ac.getObjectUUID()) + damage);
if (ac.getObjectType().equals(GameObjectType.PlayerCharacter))
((Mob) tarAc).playerAgroMap.put(ac.getObjectUUID(), ((Mob) tarAc).playerAgroMap.get(ac.getObjectUUID()) + damage);
((Mob) tarAc).handleDirectAggro(ac);
}
@ -1325,7 +1325,8 @@ public enum CombatManager { @@ -1325,7 +1325,8 @@ public enum CombatManager {
// Add to city outlaw list
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter) &&
attackedMobile.guardedCity.cityOutlaws.contains(attacker.getObjectUUID()) == false)
attackedMobile.guardedCity.cityOutlaws.add(attacker.getObjectUUID());
}

Loading…
Cancel
Save