mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 19:05:09 +00:00
Fix new account can't load codex datas
This commit is contained in:
parent
9e8b6eff09
commit
c8a7aea78b
@ -187,7 +187,7 @@ public class Player {
|
||||
this.birthday = new PlayerBirthday();
|
||||
this.rewardedLevels = new HashSet<>();
|
||||
this.moonCardGetTimes = new HashSet<>();
|
||||
this.codex = new PlayerCodex();
|
||||
this.codex = new PlayerCodex(this);
|
||||
|
||||
this.shopLimit = new ArrayList<>();
|
||||
this.expeditionInfo = new HashMap<>();
|
||||
@ -208,7 +208,7 @@ public class Player {
|
||||
this.signature = "";
|
||||
this.teamManager = new TeamManager(this);
|
||||
this.birthday = new PlayerBirthday();
|
||||
this.codex = new PlayerCodex();
|
||||
this.codex = new PlayerCodex(this);
|
||||
this.setProperty(PlayerProperty.PROP_PLAYER_LEVEL, 1);
|
||||
this.setProperty(PlayerProperty.PROP_IS_SPRING_AUTO_USE, 1);
|
||||
this.setProperty(PlayerProperty.PROP_SPRING_AUTO_USE_PERCENT, 50);
|
||||
@ -1174,6 +1174,9 @@ public class Player {
|
||||
if (this.getTeamManager() == null) {
|
||||
this.teamManager = new TeamManager(this);
|
||||
}
|
||||
if (this.getCodex() == null) {
|
||||
this.codex = new PlayerCodex(this);
|
||||
}
|
||||
if (this.getProfile().getUid() == 0) {
|
||||
this.getProfile().syncWithCharacter(this);
|
||||
}
|
||||
|
@ -39,6 +39,11 @@ public class PlayerCodex {
|
||||
this.unlockedReliquarySuitCodex = new HashSet<>();
|
||||
}
|
||||
|
||||
public PlayerCodex(Player player){
|
||||
this();
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user