PSO2SERVER/Server/Protocol/Handlers/19-UnkHandler/19-1C-Unk191CPacketHandler.cs

40 lines
1.3 KiB
C#

using System;
using PSO2SERVER.Models;
using PSO2SERVER.Protocol.Packets;
namespace PSO2SERVER.Protocol.Handlers
{
[PacketHandlerAttr(0x19, 0x1C)]
public class Unk191CPacketHandler : PacketHandler
{
public struct Unk191CPacket
{
public uint Unk1; // 对应 Rust 的 u32
public uint Unk2; // 对应 Rust 的 u32
public uint Unk3; // 对应 Rust 的 u32
public uint Unk4; // 对应 Rust 的 u32
public float Unk5; // 对应 Rust 的 f32
public float Unk6; // 对应 Rust 的 f32
public float Unk7; // 对应 Rust 的 f32
// 可选:可以添加构造函数来初始化结构体
public Unk191CPacket(uint unk1, uint unk2, uint unk3, uint unk4, float unk5, float unk6, float unk7)
{
Unk1 = unk1;
Unk2 = unk2;
Unk3 = unk3;
Unk4 = unk4;
Unk5 = unk5;
Unk6 = unk6;
Unk7 = unk7;
}
}
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);
}
}
}