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
8a890609
Commit
8a890609
authored
Apr 20, 2022
by
Melledy
Browse files
Fix not being able to join friend's world
parent
7f2de4fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/GenshinPlayer.java
View file @
8a890609
...
@@ -125,6 +125,12 @@ public class GenshinPlayer {
...
@@ -125,6 +125,12 @@ public class GenshinPlayer {
}
}
this
.
properties
.
put
(
prop
.
getId
(),
0
);
this
.
properties
.
put
(
prop
.
getId
(),
0
);
}
}
this
.
gachaInfo
=
new
PlayerGachaInfo
();
this
.
nameCardList
=
new
HashSet
<>();
this
.
flyCloakList
=
new
HashSet
<>();
this
.
costumeList
=
new
HashSet
<>();
this
.
setSceneId
(
3
);
this
.
setSceneId
(
3
);
this
.
setRegionId
(
1
);
this
.
setRegionId
(
1
);
this
.
sceneState
=
SceneLoadState
.
NONE
;
this
.
sceneState
=
SceneLoadState
.
NONE
;
...
@@ -144,11 +150,6 @@ public class GenshinPlayer {
...
@@ -144,11 +150,6 @@ public class GenshinPlayer {
this
.
nickname
=
"Traveler"
;
this
.
nickname
=
"Traveler"
;
this
.
signature
=
""
;
this
.
signature
=
""
;
this
.
teamManager
=
new
TeamManager
(
this
);
this
.
teamManager
=
new
TeamManager
(
this
);
this
.
gachaInfo
=
new
PlayerGachaInfo
();
this
.
playerProfile
=
new
PlayerProfile
(
this
);
this
.
nameCardList
=
new
HashSet
<>();
this
.
flyCloakList
=
new
HashSet
<>();
this
.
costumeList
=
new
HashSet
<>();
this
.
setProperty
(
PlayerProperty
.
PROP_PLAYER_LEVEL
,
1
);
this
.
setProperty
(
PlayerProperty
.
PROP_PLAYER_LEVEL
,
1
);
this
.
setProperty
(
PlayerProperty
.
PROP_IS_SPRING_AUTO_USE
,
1
);
this
.
setProperty
(
PlayerProperty
.
PROP_IS_SPRING_AUTO_USE
,
1
);
this
.
setProperty
(
PlayerProperty
.
PROP_SPRING_AUTO_USE_PERCENT
,
50
);
this
.
setProperty
(
PlayerProperty
.
PROP_SPRING_AUTO_USE_PERCENT
,
50
);
...
@@ -169,6 +170,7 @@ public class GenshinPlayer {
...
@@ -169,6 +170,7 @@ public class GenshinPlayer {
public
void
setUid
(
int
id
)
{
public
void
setUid
(
int
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
getProfile
().
syncWithCharacter
(
this
);
}
}
public
long
getNextGenshinGuid
()
{
public
long
getNextGenshinGuid
()
{
...
@@ -720,12 +722,8 @@ public class GenshinPlayer {
...
@@ -720,12 +722,8 @@ public class GenshinPlayer {
// Make sure these exist
// Make sure these exist
if
(
this
.
getTeamManager
()
==
null
)
{
if
(
this
.
getTeamManager
()
==
null
)
{
this
.
teamManager
=
new
TeamManager
(
this
);
this
.
teamManager
=
new
TeamManager
(
this
);
}
if
(
this
.
getGachaInfo
()
==
null
)
{
}
if
(
this
.
getProfile
().
getId
()
==
0
)
{
this
.
gachaInfo
=
new
PlayerGachaInfo
();
this
.
getProfile
().
syncWithCharacter
(
this
);
}
if
(
this
.
nameCardList
==
null
)
{
this
.
nameCardList
=
new
HashSet
<>();
}
if
(
this
.
costumeList
==
null
)
{
this
.
costumeList
=
new
HashSet
<>();
}
}
// Check if player object exists in server
// Check if player object exists in server
...
...
src/main/java/emu/grasscutter/game/friends/PlayerProfile.java
View file @
8a890609
...
@@ -87,6 +87,7 @@ public class PlayerProfile {
...
@@ -87,6 +87,7 @@ public class PlayerProfile {
return
;
return
;
}
}
this
.
id
=
player
.
getUid
();
this
.
name
=
player
.
getNickname
();
this
.
name
=
player
.
getNickname
();
this
.
avatarId
=
player
.
getHeadImage
();
this
.
avatarId
=
player
.
getHeadImage
();
this
.
signature
=
player
.
getSignature
();
this
.
signature
=
player
.
getSignature
();
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java
View file @
8a890609
...
@@ -23,7 +23,6 @@ public class PacketGetPlayerFriendListRsp extends GenshinPacket {
...
@@ -23,7 +23,6 @@ public class PacketGetPlayerFriendListRsp extends GenshinPacket {
.
setWorldLevel
(
0
)
.
setWorldLevel
(
0
)
.
setSignature
(
""
)
.
setSignature
(
""
)
.
setLastActiveTime
((
int
)
(
System
.
currentTimeMillis
()
/
1000
f
))
.
setLastActiveTime
((
int
)
(
System
.
currentTimeMillis
()
/
1000
f
))
.
setIsMpModeAvailable
(
true
)
.
setNameCardId
(
210001
)
.
setNameCardId
(
210001
)
.
setOnlineState
(
FriendOnlineState
.
FRIEND_ONLINE
)
.
setOnlineState
(
FriendOnlineState
.
FRIEND_ONLINE
)
.
setParam
(
1
)
.
setParam
(
1
)
...
...
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