Commit 81b57ed5 authored by Luis's avatar Luis

Merge branch '2.0.0' into '2.0.0'

Clear up under attack maps on release

See merge request open-rsc/Game!2224
parents 93245b0a 442e5ddc
......@@ -797,11 +797,15 @@ public final class World implements SimpleSubscriber<FishingTrawler> {
}
public void releaseUnderAttack(Player p) {
playerUnderAttackMap.put(p, false);
if (playerUnderAttackMap.containsKey(p)) {
playerUnderAttackMap.remove(p);
}
}
public void releaseUnderAttack(Npc n) {
npcUnderAttackMap.put(n, false);
if (npcUnderAttackMap.containsKey(n)) {
npcUnderAttackMap.remove(n);
}
}
public synchronized Map<Player, Boolean> getPlayersUnderAttack() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment