41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
using PSO2SERVER.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using static PSO2SERVER.Models.PSOPalette;
|
|
|
|
namespace PSO2SERVER.Protocol.Packets
|
|
{
|
|
public class FullPaletteInfoPacket : Packet
|
|
{
|
|
private PSOPalette Palette = new PSOPalette();
|
|
|
|
public FullPaletteInfoPacket(PSOPalette palette)
|
|
{
|
|
this.Palette = palette;
|
|
}
|
|
|
|
#region implemented abstract members of Packet
|
|
|
|
public override byte[] Build()
|
|
{
|
|
var pkt = new PacketWriter();
|
|
Palette.WriteToStream(pkt);
|
|
byte[] byteArray = pkt.ToArray();
|
|
|
|
//var info = string.Format("[-->] 发送的数据 (hex): {0} 字节", byteArray.Length);
|
|
//Logger.WriteHex(info, byteArray);
|
|
|
|
return pkt.ToArray();
|
|
}
|
|
|
|
public override PacketHeader GetHeader()
|
|
{
|
|
return new PacketHeader(0x21, 0x03, PacketFlags.None);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |