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
f6db3992
Commit
f6db3992
authored
Apr 27, 2022
by
Melledy
Browse files
Fix co-op requests not showing up
parent
10e5851a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/friends/Friendship.java
View file @
f6db3992
...
...
@@ -8,7 +8,7 @@ import emu.grasscutter.database.DatabaseHelper;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.proto.FriendBriefOuterClass.FriendBrief
;
import
emu.grasscutter.net.proto.FriendOnlineStateOuterClass.FriendOnlineState
;
import
emu.grasscutter.net.proto.
HeadImageOuterClass.HeadImag
e
;
import
emu.grasscutter.net.proto.
ProfilePictureOuterClass.ProfilePictur
e
;
@Entity
(
value
=
"friendships"
,
useDiscriminator
=
false
)
public
class
Friendship
{
...
...
@@ -92,7 +92,7 @@ public class Friendship {
.
setUid
(
getFriendProfile
().
getUid
())
.
setNickname
(
getFriendProfile
().
getName
())
.
setLevel
(
getFriendProfile
().
getPlayerLevel
())
.
set
AvatarId
(
HeadImag
e
.
newBuilder
().
setAvatarId
(
getFriendProfile
().
getAvatarId
())
.
getAvatarId
()
)
.
set
ProfilePicture
(
ProfilePictur
e
.
newBuilder
().
setAvatarId
(
getFriendProfile
().
getAvatarId
()))
.
setWorldLevel
(
getFriendProfile
().
getWorldLevel
())
.
setSignature
(
getFriendProfile
().
getSignature
())
.
setOnlineState
(
getFriendProfile
().
isOnline
()
?
FriendOnlineState
.
FRIEND_ONLINE
:
FriendOnlineState
.
FREIEND_DISCONNECT
)
...
...
src/main/java/emu/grasscutter/game/player/Player.java
View file @
f6db3992
...
...
@@ -27,13 +27,13 @@ import emu.grasscutter.game.world.World;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.proto.AbilityInvokeEntryOuterClass.AbilityInvokeEntry
;
import
emu.grasscutter.net.proto.CombatInvokeEntryOuterClass.CombatInvokeEntry
;
import
emu.grasscutter.net.proto.HeadImageOuterClass.HeadImage
;
import
emu.grasscutter.net.proto.InteractTypeOuterClass.InteractType
;
import
emu.grasscutter.net.proto.MpSettingTypeOuterClass.MpSettingType
;
import
emu.grasscutter.net.proto.OnlinePlayerInfoOuterClass.OnlinePlayerInfo
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass
;
import
emu.grasscutter.net.proto.PlayerLocationInfoOuterClass.PlayerLocationInfo
;
import
emu.grasscutter.net.proto.PlayerWorldLocationInfoOuterClass
;
import
emu.grasscutter.net.proto.ProfilePictureOuterClass.ProfilePicture
;
import
emu.grasscutter.net.proto.SocialDetailOuterClass.SocialDetail
;
import
emu.grasscutter.server.game.GameServer
;
import
emu.grasscutter.server.game.GameSession
;
...
...
@@ -799,7 +799,7 @@ public class Player {
.
setMpSettingType
(
this
.
getMpSetting
())
.
setNameCardId
(
this
.
getNameCardId
())
.
setSignature
(
this
.
getSignature
())
.
set
AvatarId
(
HeadImag
e
.
newBuilder
().
setAvatarId
(
this
.
getHeadImage
())
.
getAvatarId
()
);
.
set
ProfilePicture
(
ProfilePictur
e
.
newBuilder
().
setAvatarId
(
this
.
getHeadImage
()));
if
(
this
.
getWorld
()
!=
null
)
{
onlineInfo
.
setCurPlayerNumInWorld
(
this
.
getWorld
().
getPlayers
().
indexOf
(
this
)
+
1
);
...
...
@@ -834,7 +834,7 @@ public class Player {
public
SocialDetail
.
Builder
getSocialDetail
()
{
SocialDetail
.
Builder
social
=
SocialDetail
.
newBuilder
()
.
setUid
(
this
.
getUid
())
.
set
AvatarId
(
HeadImag
e
.
newBuilder
().
setAvatarId
(
this
.
getHeadImage
())
.
getAvatarId
()
)
.
set
ProfilePicture
(
ProfilePictur
e
.
newBuilder
().
setAvatarId
(
this
.
getHeadImage
()))
.
setNickname
(
this
.
getNickname
())
.
setSignature
(
this
.
getSignature
())
.
setLevel
(
this
.
getLevel
())
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java
View file @
f6db3992
...
...
@@ -8,7 +8,7 @@ import emu.grasscutter.net.packet.PacketOpcodes;
import
emu.grasscutter.net.proto.FriendBriefOuterClass.FriendBrief
;
import
emu.grasscutter.net.proto.FriendOnlineStateOuterClass.FriendOnlineState
;
import
emu.grasscutter.net.proto.GetPlayerFriendListRspOuterClass.GetPlayerFriendListRsp
;
import
emu.grasscutter.net.proto.
HeadImageOuterClass.HeadImag
e
;
import
emu.grasscutter.net.proto.
ProfilePictureOuterClass.ProfilePictur
e
;
import
emu.grasscutter.net.proto.PlatformTypeOuterClass
;
public
class
PacketGetPlayerFriendListRsp
extends
BasePacket
{
...
...
@@ -20,7 +20,7 @@ public class PacketGetPlayerFriendListRsp extends BasePacket {
.
setUid
(
GameConstants
.
SERVER_CONSOLE_UID
)
.
setNickname
(
"Server"
)
.
setLevel
(
1
)
.
set
AvatarId
(
HeadImag
e
.
newBuilder
().
setAvatarId
(
GameConstants
.
MAIN_CHARACTER_FEMALE
)
.
getAvatarId
()
)
.
set
ProfilePicture
(
ProfilePictur
e
.
newBuilder
().
setAvatarId
(
GameConstants
.
MAIN_CHARACTER_FEMALE
))
.
setWorldLevel
(
0
)
.
setSignature
(
""
)
.
setLastActiveTime
((
int
)
(
System
.
currentTimeMillis
()
/
1000
f
))
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerHeadImageRsp.java
View file @
f6db3992
...
...
@@ -3,7 +3,7 @@ package emu.grasscutter.server.packet.send;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.
HeadImageOuterClass.HeadImag
e
;
import
emu.grasscutter.net.proto.
ProfilePictureOuterClass.ProfilePictur
e
;
import
emu.grasscutter.net.proto.SetPlayerHeadImageRspOuterClass.SetPlayerHeadImageRsp
;
public
class
PacketSetPlayerHeadImageRsp
extends
BasePacket
{
...
...
@@ -12,7 +12,7 @@ public class PacketSetPlayerHeadImageRsp extends BasePacket {
super
(
PacketOpcodes
.
SetPlayerHeadImageRsp
);
SetPlayerHeadImageRsp
proto
=
SetPlayerHeadImageRsp
.
newBuilder
()
.
set
AvatarId
(
HeadImag
e
.
newBuilder
().
setAvatarId
(
player
.
getHeadImage
())
.
getAvatarId
()
)
.
set
ProfilePicture
(
ProfilePictur
e
.
newBuilder
().
setAvatarId
(
player
.
getHeadImage
()))
.
build
();
this
.
setData
(
proto
);
...
...
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