style: cleanup code

This commit is contained in:
StopWuyu
2025-08-23 20:32:54 +08:00
parent dcc3c24cdf
commit 2a3164201f
80 changed files with 457 additions and 578 deletions

View File

@@ -1,13 +1,13 @@
using EggLink.DanhengServer.Database.Friend;
using EggLink.DanhengServer.Kcp;
using EggLink.DanhengServer.Proto;
using System.Linq;
namespace EggLink.DanhengServer.GameServer.Server.Packet.Send.Challenge;
public class PacketGetChallengeGroupStatisticsScRsp : BasePacket
{
public PacketGetChallengeGroupStatisticsScRsp(uint groupId, ChallengeGroupStatisticsPb? data) : base(CmdIds.GetChallengeGroupStatisticsScRsp)
public PacketGetChallengeGroupStatisticsScRsp(uint groupId, ChallengeGroupStatisticsPb? data) : base(
CmdIds.GetChallengeGroupStatisticsScRsp)
{
var proto = new GetChallengeGroupStatisticsScRsp
{
@@ -15,22 +15,13 @@ public class PacketGetChallengeGroupStatisticsScRsp : BasePacket
};
var maxMemory = data?.MemoryGroupStatistics?.Values.MaxBy(x => x.Level);
if (maxMemory != null)
{
proto.MemoryGroup = maxMemory.ToProto();
}
if (maxMemory != null) proto.MemoryGroup = maxMemory.ToProto();
var maxStory = data?.StoryGroupStatistics?.Values.MaxBy(x => x.Level);
if (maxStory != null)
{
proto.StoryGroup = maxStory.ToProto();
}
if (maxStory != null) proto.StoryGroup = maxStory.ToProto();
var maxBoss = data?.BossGroupStatistics?.Values.MaxBy(x => x.Level);
if (maxBoss != null)
{
proto.BossGroup = maxBoss.ToProto();
}
if (maxBoss != null) proto.BossGroup = maxBoss.ToProto();
SetData(proto);
}