From 9a66f18edb2db31ec0c5fcdc99bbea4d249257e3 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 29 Aug 2024 20:21:26 -0500 Subject: [PATCH] extra 60 seconds added to summon if enemies near and not in safezone --- src/engine/gameManager/PowersManager.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 984c2a2b..297dbb10 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -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);