Browse Source

player character attacks added to city outlaws

feature-workorder
FatBoy-DOTC 1 year ago
parent
commit
46e67be8ca
  1. 13
      src/engine/objects/AbstractCharacter.java

13
src/engine/objects/AbstractCharacter.java

@ -14,10 +14,7 @@ import engine.Enum.*; @@ -14,10 +14,7 @@ import engine.Enum.*;
import engine.InterestManagement.InterestManager;
import engine.InterestManagement.WorldGrid;
import engine.exception.SerializationException;
import engine.gameManager.CombatManager;
import engine.gameManager.ConfigManager;
import engine.gameManager.MovementManager;
import engine.gameManager.PowersManager;
import engine.gameManager.*;
import engine.job.AbstractJob;
import engine.job.JobContainer;
import engine.job.JobScheduler;
@ -1254,6 +1251,14 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -1254,6 +1251,14 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
target.guardedCity.cityOutlaws.add(attacker.getObjectUUID());
}
}
} else if(this.getObjectType().equals(GameObjectType.PlayerCharacter)){
City playerCity = ZoneManager.getCityAtLocation(this.loc);
if(playerCity != null){
if(!attacker.getGuild().getNation().equals(playerCity.getGuild().getNation()))
if(!playerCity.getGuild().getNation().getAllyList().contains(attacker.getGuild().getNation()))
if(!playerCity.cityOutlaws.contains(attacker.getObjectUUID()))
playerCity.cityOutlaws.add(attacker.getObjectUUID());
}
}
return newHealth - oldHealth;
} finally {

Loading…
Cancel
Save