diff --git a/src/main/java/emu/lunarcore/game/player/Player.java b/src/main/java/emu/lunarcore/game/player/Player.java index 6dcf33130..69b5faa84 100644 --- a/src/main/java/emu/lunarcore/game/player/Player.java +++ b/src/main/java/emu/lunarcore/game/player/Player.java @@ -47,7 +47,6 @@ import emu.lunarcore.game.scene.SceneBuff; import emu.lunarcore.game.scene.entity.EntityProp; import emu.lunarcore.game.scene.entity.GameEntity; -import emu.lunarcore.proto.AssistSimpleInfoOuterClass.AssistSimpleInfo; import emu.lunarcore.proto.BoardDataSyncOuterClass.BoardDataSync; import emu.lunarcore.proto.FriendOnlineStatusOuterClass.FriendOnlineStatus; import emu.lunarcore.proto.HeadIconOuterClass.HeadIcon; @@ -950,7 +949,6 @@ public SimpleInfo toSimpleInfo() { .setOnlineStatus(this.isOnline() ? FriendOnlineStatus.FRIEND_ONLINE_STATUS_ONLINE : FriendOnlineStatus.FRIEND_ONLINE_STATUS_OFFLINE) .setPlatformType(PlatformType.PC) .setLastActiveTime(this.getLastActiveTime()) - .addAssistSimpleInfo(AssistSimpleInfo.newInstance().setAvatarId(GameConstants.TRAILBLAZER_AVATAR_ID).setLevel(1)) // TODO .setHeadIcon(this.getHeadIcon()); return proto; diff --git a/src/main/java/emu/lunarcore/server/packet/send/PacketGetFriendListInfoScRsp.java b/src/main/java/emu/lunarcore/server/packet/send/PacketGetFriendListInfoScRsp.java index ced368865..15ed7eed2 100644 --- a/src/main/java/emu/lunarcore/server/packet/send/PacketGetFriendListInfoScRsp.java +++ b/src/main/java/emu/lunarcore/server/packet/send/PacketGetFriendListInfoScRsp.java @@ -8,6 +8,7 @@ import emu.lunarcore.proto.FriendOnlineStatusOuterClass.FriendOnlineStatus; import emu.lunarcore.proto.GetFriendListInfoScRspOuterClass.GetFriendListInfoScRsp; import emu.lunarcore.proto.PlatformTypeOuterClass.PlatformType; +import emu.lunarcore.proto.PlayingStateOuterClass.PlayingState; import emu.lunarcore.proto.SimpleInfoOuterClass.SimpleInfo; import emu.lunarcore.server.packet.BasePacket; import emu.lunarcore.server.packet.CmdId; @@ -39,9 +40,21 @@ public PacketGetFriendListInfoScRsp(FriendList friendList) { var friend = friendList.getServer().getPlayerByUid(friendship.getFriendUid(), true); if (friend == null) continue; + // Create friend info var friendInfo = FriendListInfo.newInstance() .setSimpleInfo(friend.toSimpleInfo()); + // Set playing state + if (friend.isOnline()) { + if (friend.getChallengeInstance() != null && friend.getChallengeInstance().isStory()) { + friendInfo.setPlayingState(PlayingState.PLAYING_CHALLENGE_STORY); + } else if (friend.getChallengeInstance() != null) { + friendInfo.setPlayingState(PlayingState.PLAYING_CHALLENGE_MEMORY); + } else if (friend.getRogueInstance() != null) { + friendInfo.setPlayingState(PlayingState.PLAYING_ROGUE_COSMOS); + } + } + data.addFriendList(friendInfo); }