outlaw and hate value moved to modifyHealth
This commit is contained in:
@@ -1244,11 +1244,21 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
CombatManager.handleRetaliate(this, attacker);
|
||||
}
|
||||
|
||||
if(this.getObjectType().equals(GameObjectType.Mob)){
|
||||
//handle hate value addition
|
||||
Mob target = (Mob)this;
|
||||
if (attacker.getObjectType().equals(GameObjectType.PlayerCharacter)) {
|
||||
target.playerAgroMap.put(attacker.getObjectUUID(), target.playerAgroMap.get(attacker.getObjectUUID()) + value);
|
||||
if (target.isPlayerGuard()){
|
||||
if(target.guardedCity != null && target.guardedCity.cityOutlaws.contains(attacker.getObjectUUID()) == false)
|
||||
target.guardedCity.cityOutlaws.add(attacker.getObjectUUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
return newHealth - oldHealth;
|
||||
} finally {
|
||||
this.healthLock.writeLock().unlock();
|
||||
}
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user