stun grounds 1 tier per 1.5 seconds of stunned
This commit is contained in:
@@ -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)){
|
||||||
|
this.setDesiredAltitude(this.altitude - 10);
|
||||||
|
this.setTakeOffTime(System.currentTimeMillis());
|
||||||
|
|
||||||
ChangeAltitudeMsg msg = new ChangeAltitudeMsg(this.getObjectType().ordinal(), this.getObjectUUID(), false, this.getAltitude(), this.getDesiredAltitude(), this.getAltitude());
|
ChangeAltitudeMsg msg = new ChangeAltitudeMsg(this.getObjectType().ordinal(), this.getObjectUUID(), false, this.getAltitude(), this.getDesiredAltitude(), this.getAltitude());
|
||||||
// force a landing
|
// force a landing
|
||||||
DispatchMessage.dispatchMsgToInterestArea(this, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user