using PSO2SERVER.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PSO2SERVER.Protocol.Packets { public class CharacterDeletionPacket : Packet { public DeletionStatus Status { get; } public enum DeletionStatus : uint { /// /// Character has items which prevent deletion. /// UndeletableItems, /// /// Character has been scheduled for deletion. /// Success } public struct ItemId { /// /// Item type. /// public ushort ItemType { get; set; } /// /// Item category. /// public ushort Id { get; set; } /// /// Item ID after appraisal. /// public ushort Unk3 { get; set; } /// /// Item ID. /// public ushort SubId { get; set; } } public struct CharacterDeletePacket { /// /// Deletion request status. /// public DeletionStatus Status { get; set; } public uint Unk1 { get; set; } public List Unk2 { get; set; } public List Unk3 { get; set; } public List Unk4 { get; set; } public List Unk5 { get; set; } public List Unk6 { get; set; } } public CharacterDeletionPacket(DeletionStatus status) { Status = status; } #region implemented abstract members of Packet public override byte[] Build() { var pkt = new PacketWriter(); pkt.Write((uint)Status); pkt.Write((uint)0); pkt.WriteMagic(0, 0x33D4, 0xC4); return pkt.ToArray(); } public override PacketHeader GetHeader() { return new PacketHeader(0x11, 0x08, PacketFlags.PACKED); } #endregion } }