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

37 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using PSO2SERVER.Models;
namespace PSO2SERVER.Protocol.Packets
{
public class LoadMaterialStoragePacket : Packet
{
public uint player_id { get; set; } = new uint();
public List<MaterialStorageItem> items { get; set; } = new List<MaterialStorageItem> ();
public StorageInfo info { get; set; } = new StorageInfo ();
#region implemented abstract members of Packet
public LoadMaterialStoragePacket(Client client)
{
player_id = (uint)client._account.AccountId;
}
public override byte[] Build()
{
var pkt = new PacketWriter();
pkt.Write(player_id);
pkt.WriteMagic((uint)items.Count, 0xAC9, 0x9F);
foreach (var item in items) {pkt.WriteStruct(item);}
pkt.WriteStruct(info);
return pkt.ToArray();
}
public override PacketHeader GetHeader()
{
return new PacketHeader(0x0F, 0xDF, PacketFlags.PACKED);
}
#endregion
}
}