Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
f894b96e
Commit
f894b96e
authored
May 06, 2022
by
Melledy
Browse files
Fix crash on login if the player didnt have a TowerManager
parent
1ed0511c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/player/Player.java
View file @
f894b96e
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment