Browse Source

extra 60 seconds added to summon if enemies near and not in safezone

lakebane-strongholds
FatBoy-DOTC 3 months ago
parent
commit
9a66f18edb
  1. 10
      src/engine/gameManager/PowersManager.java

10
src/engine/gameManager/PowersManager.java

@ -1372,6 +1372,16 @@ public enum PowersManager { @@ -1372,6 +1372,16 @@ public enum PowersManager {
else
duration = 45000; // Belgosh Summons, 45 seconds
boolean enemiesNear = false;
for(AbstractWorldObject awo : WorldGrid.getObjectsInRangePartial(pc.loc,MBServerStatics.CHARACTER_LOAD_RANGE, MBServerStatics.MASK_PLAYER)){
PlayerCharacter playerCharacter = (PlayerCharacter)awo;
if(!playerCharacter.guild.getNation().equals(pc.guild.getNation())){
enemiesNear = true;
}
}
if(enemiesNear && !pc.isInSafeZone())
duration += 60000;
// Teleport to summoners location
FinishSummonsJob fsj = new FinishSummonsJob(source, pc);

Loading…
Cancel
Save