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

38 lines
955 B
C#
Raw Normal View History

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