PSO2SERVER/Server/Protocol/Packets/21-PalettePacket/21-03-FullPaletteInfoPacket.cs

41 lines
1.0 KiB
C#
Raw Normal View History

2024-09-16 17:09:36 +08:00
using PSO2SERVER.Models;
using System;
using System.Collections.Generic;
2024-09-22 11:14:48 +08:00
using System.IO;
2024-09-16 17:09:36 +08:00
using System.Linq;
using System.Text;
2024-09-22 11:14:48 +08:00
using static PSO2SERVER.Models.PSOPalette;
2024-09-16 17:09:36 +08:00
namespace PSO2SERVER.Protocol.Packets
2024-09-16 17:09:36 +08:00
{
public class FullPaletteInfoPacket : Packet
2024-09-16 17:09:36 +08:00
{
private PSOPalette Palette = new PSOPalette();
2024-09-16 17:09:36 +08:00
public FullPaletteInfoPacket(PSOPalette palette)
2024-09-16 17:09:36 +08:00
{
2024-09-22 11:14:48 +08:00
this.Palette = palette;
2024-09-16 17:09:36 +08:00
}
#region implemented abstract members of Packet
public override byte[] Build()
{
2024-09-17 11:29:41 +08:00
var pkt = new PacketWriter();
2024-09-22 11:14:48 +08:00
Palette.WriteToStream(pkt);
byte[] byteArray = pkt.ToArray();
2024-11-25 23:33:41 +08:00
//var info = string.Format("[-->] 发送的数据 (hex): {0} 字节", byteArray.Length);
//Logger.WriteHex(info, byteArray);
2024-09-22 11:14:48 +08:00
2024-09-17 11:29:41 +08:00
return pkt.ToArray();
2024-09-16 17:09:36 +08:00
}
public override PacketHeader GetHeader()
{
return new PacketHeader(0x21, 0x03, PacketFlags.None);
2024-09-16 17:09:36 +08:00
}
#endregion
}
}