Fix new avatar weapons being null

This commit is contained in:
KingRainbow44
2023-05-31 21:04:38 -04:00
Unverified
parent bcf54dd6ba
commit 73c23707b4
7 changed files with 82 additions and 51 deletions
@@ -1325,11 +1325,20 @@ public class Player implements PlayerHook, FieldFetch {
runner.submit(this::loadBattlePassManager);
// Wait for all tasks to finish.
Utils.waitFor(() ->
this.getAvatars().isLoaded() &&
this.getInventory().isLoaded());
this.getPlayerProgress().setPlayer(this); // Add reference to the player.
}
/**
* Invoked when the player selects their avatar.
*/
public void onPlayerBorn() {
getQuestManager().onPlayerBorn();
Grasscutter.getThreadPool().submit(
this.getQuestManager()::onPlayerBorn);
}
public void onLogin() {