From 63b40c27a5c880813ddfe409dc36bed55ccd06fd Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 9 Jan 2025 17:53:13 -0600 Subject: [PATCH] fall slowly while stunned --- src/engine/objects/PlayerCharacter.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index af37822a..b4a2387e 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4914,6 +4914,15 @@ public class PlayerCharacter extends AbstractCharacter { GroundPlayer(this); //ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff"); } + if(this.getDesiredAltitude() == this.getAltitude() && this.bonuses.getBool(ModType.Stunned, SourceType.None)){ + this.setAltitude(this.getAltitude()); + this.setDesiredAltitude(this.getAltitude() - 10); + this.setTakeOffTime(System.currentTimeMillis()); + + ChangeAltitudeMsg msg = new ChangeAltitudeMsg(this.getObjectType().ordinal(), this.getObjectUUID(), false, this.getAltitude(), this.getDesiredAltitude(), this.getAltitude()); + // force a landing + DispatchMessage.dispatchMsgToInterestArea(this, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); + } } } catch (Exception e) {