Browse Source

no more dead or self track

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
3e30c7a01e
  1. 8
      src/engine/gameManager/PowersManager.java

8
src/engine/gameManager/PowersManager.java

@ -1578,6 +1578,14 @@ public enum PowersManager {
trackChars = new HashSet<>(); trackChars = new HashSet<>();
HashSet<AbstractWorldObject> allInRange = WorldGrid.getObjectsInRangePartial(playerCharacter.loc,MBServerStatics.CHARACTER_LOAD_RANGE,MBServerStatics.MASK_PLAYER); HashSet<AbstractWorldObject> allInRange = WorldGrid.getObjectsInRangePartial(playerCharacter.loc,MBServerStatics.CHARACTER_LOAD_RANGE,MBServerStatics.MASK_PLAYER);
ArrayList<Guild> nationsInRange = new ArrayList<>(); ArrayList<Guild> nationsInRange = new ArrayList<>();
ArrayList<AbstractWorldObject> purgeList = new ArrayList<>();
for(AbstractWorldObject trackChar : allInRange) {
if(trackChar.equals(playerCharacter) || !trackChar.isAlive() || !((PlayerCharacter)trackChar).isActive())
purgeList.add(trackChar);
}
allInRange.removeAll(purgeList);
//first round to add players in range //first round to add players in range
for(AbstractWorldObject trackChar : allInRange){ for(AbstractWorldObject trackChar : allInRange){
if(trackChar.equals(playerCharacter) || !trackChar.isAlive() || !((PlayerCharacter)trackChar).isActive()) if(trackChar.equals(playerCharacter) || !trackChar.isAlive() || !((PlayerCharacter)trackChar).isActive())

Loading…
Cancel
Save