Commit f894b96e authored by Melledy's avatar Melledy
Browse files

Fix crash on login if the player didnt have a TowerManager

parent 1ed0511c
......@@ -144,6 +144,7 @@ public class Player {
this.avatars = new AvatarStorage(this);
this.friendsList = new FriendsList(this);
this.mailHandler = new MailHandler(this);
this.towerManager = new TowerManager(this);
this.pos = new Position();
this.rotation = new Position();
this.properties = new HashMap<>();
......@@ -190,7 +191,6 @@ 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);
......@@ -1099,9 +1099,6 @@ 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment