bugfix-flightfix #18

Merged
MagicBot merged 3 commits from bugfix-flightfix into master 2022-08-28 11:43:43 +00:00
2 changed files with 15 additions and 6 deletions
Showing only changes of commit 5fe518f8a1 - Show all commits
+15
View File
@@ -1600,11 +1600,26 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
//Call to apply any new effects to player
public synchronized void applyBonuses() {
PlayerCharacter player;
//tell the player to applyBonuses because something has changed
//start running the bonus calculations
try{
runBonuses();
// Check if calculations affected flight.
if (this.getGridObjectType().equals(GameObjectType.PlayerCharacter)) {
player = (PlayerCharacter) this;
// Ground players who cannot fly but are currently flying
if (CanFly(player) == false &&
player.getMovementState().equals(MovementState.FLYING))
PlayerCharacter.GroundPlayer(player);
}
}catch(Exception e){
Logger.error("Error in run bonuses for object UUID " + this.getObjectUUID());
Logger.error(e);
-6
View File
@@ -4771,12 +4771,6 @@ public void dismissNecroPets() {
}
}
// Ground players who cannot fly but are currently flying
if (CanFly(this) &&
this.getMovementState().equals(MovementState.FLYING))
GroundPlayer(this);
RealmMap.updateRealm(this);
updateBlessingMessage();