mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 20:26:03 +08:00
46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
using EggLink.DanhengServer.Enums.Fight;
|
|
using EggLink.DanhengServer.GameServer.Game.MultiPlayer.MarbleGame;
|
|
using EggLink.DanhengServer.GameServer.Game.MultiPlayer.MarbleGame.Sync;
|
|
using EggLink.DanhengServer.Kcp;
|
|
using EggLink.DanhengServer.Proto;
|
|
|
|
namespace EggLink.DanhengServer.GameServer.Server.Packet.Send.Fight;
|
|
|
|
public class PacketFightGeneralScNotify : BasePacket
|
|
{
|
|
public PacketFightGeneralScNotify(MarbleNetWorkMsgEnum msgType, MarbleNetWorkMsgEnum syncType, MarbleGameRoomInstance game) : base(CmdIds.FightGeneralScNotify)
|
|
{
|
|
var proto = new FightGeneralScNotify
|
|
{
|
|
NetworkMsgType = (uint)msgType,
|
|
FightGeneralInfo = new FightGeneralServerInfo
|
|
{
|
|
FightGameInfo = { new FightGameInfo
|
|
{
|
|
MarbleGameInfo = game.ToProto(),
|
|
GameMessageType = (uint)syncType
|
|
} }
|
|
}
|
|
};
|
|
|
|
SetData(proto);
|
|
}
|
|
|
|
public PacketFightGeneralScNotify(MarbleNetWorkMsgEnum msgType, List<MarbleGameBaseSyncData> sync) : base(CmdIds.FightGeneralScNotify)
|
|
{
|
|
var proto = new FightGeneralScNotify
|
|
{
|
|
NetworkMsgType = (uint)msgType,
|
|
FightGeneralInfo = new FightGeneralServerInfo
|
|
{
|
|
FightGameInfo = { sync.Select(x => new FightGameInfo
|
|
{
|
|
GameMessageType = (uint)x.MessageType,
|
|
MarbleGameSyncInfo = x.ToProto()
|
|
}) }
|
|
}
|
|
};
|
|
|
|
SetData(proto);
|
|
}
|
|
} |