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,8 +203,11 @@ public class Player {
this.level = newLevel;
this.exp = GameData.getPlayerExpRequired(this.level);
this.sendPacket(new PacketPlayerSyncScNotify(this));
this.save();
if (this.isOnline()) {
this.getSession().send(new PacketPlayerSyncScNotify(this));
this.save();
}
}
private void onLevelChange(int oldLevel, int newLevel) {