PSO2SERVER/Server/Protocol/Packets/1A-MailPacket/1A-03-DeletedMailPacket.cs

38 lines
955 B
C#

using PSO2SERVER.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PSO2SERVER.Protocol.Packets
{
public class DeletedMailPacket : Packet
{
public List<MailId> Ids { get; set; } = new List<MailId>();
public uint unk { get; set; } = 0;//maybe delete status
public DeletedMailPacket(List<MailId> ids)
{
Ids = ids;
unk = 1;
}
#region implemented abstract members of Packet
public override byte[] Build()
{
var pkt = new PacketWriter();
pkt.WriteMagic(Ids.Count, 0x421C, 0x56);
foreach (MailId id in Ids) {pkt.WriteStruct(id);}
pkt.Write(unk);
return pkt.ToArray();
}
public override PacketHeader GetHeader()
{
return new PacketHeader(0x1A, 0x03, PacketFlags.PACKED);
}
#endregion
}
}