From 4a632223184fb1b06ee6fa5185a99fb3e5c6e5ef Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 10 Sep 2024 16:54:57 -0500 Subject: [PATCH] cast while flying --- src/engine/gameManager/PowersManager.java | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 46b71f21..79cf408c 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -292,7 +292,6 @@ public enum PowersManager { //check for movement buffs while flying if(playerCharacter.isFlying()) { - boolean whileFlying = true; switch(pb.token){ case 429005674: case 429505739: @@ -309,19 +308,15 @@ public enum PowersManager { case 1794395699: case 429428796: case 1514898036: - whileFlying = false; - break; - } - if(!whileFlying) { - ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff"); - //refund stamina - float amount = playerCharacter.getStamina() + pb.cost; - playerCharacter.setStamina(amount, playerCharacter); - - // Update all surrounding clients. - TargetedActionMsg cmm = new TargetedActionMsg(playerCharacter); - DispatchMessage.dispatchMsgToInterestArea(playerCharacter, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); - return true; + ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff"); + //refund stamina + float amount = playerCharacter.getStamina() + pb.cost; + playerCharacter.setStamina(amount, playerCharacter); + + // Update all surrounding clients. + TargetedActionMsg cmm = new TargetedActionMsg(playerCharacter); + DispatchMessage.dispatchMsgToInterestArea(playerCharacter, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); + return true; } }