32 lines
991 B
C#
32 lines
991 B
C#
using System;
|
|
using PSO2SERVER.Models;
|
|
using PSO2SERVER.Protocol.Packets;
|
|
using static PSO2SERVER.Protocol.Handlers.CharacterNewNameRequest;
|
|
|
|
namespace PSO2SERVER.Protocol.Handlers
|
|
{
|
|
[PacketHandlerAttr(0x11, 0xB0)]
|
|
public class Unk11B0 : PacketHandler
|
|
{
|
|
public struct Unk11B0Packet
|
|
{
|
|
public uint unk1 { get; set; }
|
|
public uint unk2 { get; set; }
|
|
}
|
|
|
|
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
|
|
{
|
|
var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length);
|
|
Logger.WriteHex(info, data);
|
|
|
|
// 创建一个结构体实例
|
|
var packet = new Unk11B0Packet();
|
|
|
|
// 读取数据并填充到结构体中
|
|
var reader = new PacketReader(data, position, size);
|
|
packet.unk1 = reader.ReadUInt32();
|
|
packet.unk2 = reader.ReadUInt32();
|
|
}
|
|
}
|
|
}
|