PSO2SERVER/Server/Protocol/Packets/0F-ItemPacket/0F-BC-ChangeWeaponPalettePacket.cs
Longfeng Qin 37106641a7 物品读取修正
移除部分DEBUG信息
2024-12-11 02:24:51 +08:00

41 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using PSO2SERVER.Models;
namespace PSO2SERVER.Protocol.Packets
{
public class ChangeWeaponPalettePacket : Packet
{
/// Player switching the palette.
public ObjectHeader Player { get; set; } = new ObjectHeader();
public FixedList<ushort> unk { get; set; } = new FixedList<ushort>(0x12, 0);
public uint Unk1 { get; set; } = 0;
/// New palette ID.
public uint cur_palette { get; set; } = 0;
#region implemented abstract members of Packet
public ChangeWeaponPalettePacket(Client client)
{
Player = new ObjectHeader((uint)client._account.AccountId, ObjectType.Player);
cur_palette = client.Palette.CurPalette;
}
public override byte[] Build()
{
var pkt = new PacketWriter();
pkt.WriteObjectHeader(Player);
pkt.WriteList(unk);
pkt.Write(Unk1);
pkt.Write(cur_palette);
return pkt.ToArray();
}
public override PacketHeader GetHeader()
{
return new PacketHeader(0x0F, 0xBC, PacketFlags.None);
}
#endregion
}
}