Fix error when creating a new player

This commit is contained in:
Melledy
2023-12-11 04:58:28 -08:00
parent 5a46313f5f
commit b84f24e4a7

View File

@@ -203,9 +203,12 @@ public class Player {
this.level = newLevel;
this.exp = GameData.getPlayerExpRequired(this.level);
this.sendPacket(new PacketPlayerSyncScNotify(this));
if (this.isOnline()) {
this.getSession().send(new PacketPlayerSyncScNotify(this));
this.save();
}
}
private void onLevelChange(int oldLevel, int newLevel) {
// Auto upgrades the player's world level when they level up to the right level