mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 22:04:36 +01:00
Fix an issue with player lineups being saved with no ownerUid
This commit is contained in:
@@ -132,22 +132,22 @@ public class Player {
|
|||||||
// Called when player is created
|
// Called when player is created
|
||||||
public Player(GameSession session) {
|
public Player(GameSession session) {
|
||||||
this();
|
this();
|
||||||
this.resetPosition();
|
|
||||||
this.session = session;
|
this.session = session;
|
||||||
this.accountUid = getAccount().getUid();
|
this.accountUid = getAccount().getUid();
|
||||||
|
this.initUid();
|
||||||
|
this.resetPosition();
|
||||||
|
|
||||||
|
// Setup player data
|
||||||
this.name = GameConstants.DEFAULT_NAME;
|
this.name = GameConstants.DEFAULT_NAME;
|
||||||
this.signature = "";
|
this.signature = "";
|
||||||
this.headIcon = 200001;
|
this.headIcon = 200001;
|
||||||
this.level = 1;
|
this.level = 1;
|
||||||
this.stamina = GameConstants.MAX_STAMINA;
|
this.stamina = GameConstants.MAX_STAMINA;
|
||||||
this.nextStaminaRecover = System.currentTimeMillis();
|
this.nextStaminaRecover = System.currentTimeMillis();
|
||||||
|
|
||||||
this.unlockedHeadIcons = new IntOpenHashSet();
|
this.unlockedHeadIcons = new IntOpenHashSet();
|
||||||
this.lineupManager = new LineupManager(this);
|
this.lineupManager = new LineupManager(this);
|
||||||
this.gachaInfo = new PlayerGachaInfo();
|
this.gachaInfo = new PlayerGachaInfo();
|
||||||
|
|
||||||
// Setup uid
|
|
||||||
this.initUid();
|
|
||||||
|
|
||||||
// Setup hero paths
|
// Setup hero paths
|
||||||
this.getAvatars().setupHeroPaths();
|
this.getAvatars().setupHeroPaths();
|
||||||
@@ -157,6 +157,7 @@ public class Player {
|
|||||||
GameAvatar avatar = new GameAvatar(GameConstants.TRAILBLAZER_AVATAR_ID);
|
GameAvatar avatar = new GameAvatar(GameConstants.TRAILBLAZER_AVATAR_ID);
|
||||||
this.addAvatar(avatar);
|
this.addAvatar(avatar);
|
||||||
this.getCurrentLineup().getAvatars().add(avatar.getAvatarId());
|
this.getCurrentLineup().getAvatars().add(avatar.getAvatarId());
|
||||||
|
this.getCurrentLineup().save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameServer getServer() {
|
public GameServer getServer() {
|
||||||
|
|||||||
Reference in New Issue
Block a user