Skip to content

Commit

Permalink
Move worldlevel for World to Player::setWorldLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
GanyusLeftHorn authored and Melledy committed Jun 25, 2022
1 parent 7ffe107 commit 2cdfea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/emu/grasscutter/game/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ public int getWorldLevel() {
}

public void setWorldLevel(int level) {
this.getWorld().setWorldLevel(newWorldLevel);

this.setProperty(PlayerProperty.PROP_PLAYER_WORLD_LEVEL, level);
this.sendPacket(new PacketPlayerPropNotify(this, PlayerProperty.PROP_PLAYER_WORLD_LEVEL));

Expand Down Expand Up @@ -545,7 +547,6 @@ private void updateWorldLevel() {
0;

if (newWorldLevel != currentWorldLevel) {
this.getWorld().setWorldLevel(newWorldLevel);
this.setWorldLevel(newWorldLevel);
}
}
Expand Down

0 comments on commit 2cdfea1

Please sign in to comment.