Choose Avatar & Enter Tower

This commit is contained in:
Akka
2022-05-06 14:10:23 +08:00
committed by Melledy
parent 93b3265d72
commit c912b8d857
13 changed files with 350 additions and 13 deletions

View File

@@ -27,6 +27,7 @@ import emu.grasscutter.game.props.EntityType;
import emu.grasscutter.game.props.PlayerProperty;
import emu.grasscutter.game.shop.ShopLimit;
import emu.grasscutter.game.managers.MapMarkManager.*;
import emu.grasscutter.game.tower.TowerManager;
import emu.grasscutter.game.world.Scene;
import emu.grasscutter.game.world.World;
import emu.grasscutter.net.packet.BasePacket;
@@ -89,6 +90,8 @@ public class Player {
@Transient private MessageHandler messageHandler;
private TeamManager teamManager;
private TowerManager towerManager;
private PlayerGachaInfo gachaInfo;
private PlayerProfile playerProfile;
private boolean showAvatar;
@@ -176,6 +179,7 @@ public class Player {
this.nickname = "Traveler";
this.signature = "";
this.teamManager = new TeamManager(this);
this.towerManager = new TowerManager(this);
this.birthday = new PlayerBirthday();
this.setProperty(PlayerProperty.PROP_PLAYER_LEVEL, 1);
this.setProperty(PlayerProperty.PROP_IS_SPRING_AUTO_USE, 1);
@@ -389,6 +393,10 @@ public class Player {
return this.teamManager;
}
public TowerManager getTowerManager() {
return towerManager;
}
public PlayerGachaInfo getGachaInfo() {
return gachaInfo;
}
@@ -1030,6 +1038,9 @@ public class Player {
if (this.getProfile().getUid() == 0) {
this.getProfile().syncWithCharacter(this);
}
if (this.getTowerManager() == null) {
this.towerManager = new TowerManager(this);
}
// Check if player object exists in server
// TODO - optimize