|
|
@ -4914,15 +4914,22 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
GroundPlayer(this); |
|
|
|
GroundPlayer(this); |
|
|
|
//ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff");
|
|
|
|
//ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff");
|
|
|
|
} |
|
|
|
} |
|
|
|
if(this.getDesiredAltitude() == this.getAltitude() && this.bonuses.getBool(ModType.Stunned, SourceType.None)){ |
|
|
|
if(!this.timestamps.containsKey("StunGrounded")) |
|
|
|
this.setAltitude(this.getAltitude()); |
|
|
|
this.timestamps.put("StunGrounded",System.currentTimeMillis() - 1000L); |
|
|
|
this.setDesiredAltitude(this.getAltitude() - 10); |
|
|
|
if(this.bonuses.getBool(ModType.Stunned, SourceType.None) && this.timestamps.get("StunGrounded") < System.currentTimeMillis()){ |
|
|
|
this.setTakeOffTime(System.currentTimeMillis()); |
|
|
|
boolean isFlyMoving = this.getDesiredAltitude() != this.altitude; |
|
|
|
|
|
|
|
if(!isFlyMoving && this.bonuses.getBool(ModType.Stunned, SourceType.None)){ |
|
|
|
ChangeAltitudeMsg msg = new ChangeAltitudeMsg(this.getObjectType().ordinal(), this.getObjectUUID(), false, this.getAltitude(), this.getDesiredAltitude(), this.getAltitude()); |
|
|
|
this.setDesiredAltitude(this.altitude - 10); |
|
|
|
// force a landing
|
|
|
|
this.setTakeOffTime(System.currentTimeMillis()); |
|
|
|
DispatchMessage.dispatchMsgToInterestArea(this, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false); |
|
|
|
|
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
this.timestamps.put("StunGrounded",System.currentTimeMillis() + 1500L); |
|
|
|
|
|
|
|
ChatManager.chatSystemInfo(this,"Applying 1 Tier Ground"); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|