mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 05:44:36 +01:00
Fix error when creating a new player
This commit is contained in:
@@ -203,9 +203,12 @@ public class Player {
|
|||||||
|
|
||||||
this.level = newLevel;
|
this.level = newLevel;
|
||||||
this.exp = GameData.getPlayerExpRequired(this.level);
|
this.exp = GameData.getPlayerExpRequired(this.level);
|
||||||
this.sendPacket(new PacketPlayerSyncScNotify(this));
|
|
||||||
|
if (this.isOnline()) {
|
||||||
|
this.getSession().send(new PacketPlayerSyncScNotify(this));
|
||||||
this.save();
|
this.save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void onLevelChange(int oldLevel, int newLevel) {
|
private void onLevelChange(int oldLevel, int newLevel) {
|
||||||
// Auto upgrades the player's world level when they level up to the right level
|
// Auto upgrades the player's world level when they level up to the right level
|
||||||
|
|||||||
Reference in New Issue
Block a user