protected override void InternalParse() { Output.AppendLine("Mail Id: " + Reader.ReadUInt32()); MailResponseType type = (MailResponseType)Reader.ReadUInt32(); Output.AppendLine("Type: " + type); MailResponseResult result = (MailResponseResult)Reader.ReadUInt32(); Output.AppendLine("Result: " + result); if (result == MailResponseResult.MAIL_ERR_EQUIP_ERROR) { Output.AppendLine("Equip Error: " + (InventoryChangeFailure)Reader.ReadUInt32()); } if (type == MailResponseType.MAIL_ITEM_TAKEN) { Output.AppendLine("Attachment Id: " + Reader.ReadUInt32()); Output.AppendLine("Count: " + Reader.ReadUInt32()); } }
public PSSendMailResult( uint mailID, MailResponseType mailAction, MailResponseResult mailError, uint equipError = 0, uint itemGUID = 0, uint itemCount = 0) : base(WorldOpcodes.SMSG_SEND_MAIL_RESULT) { this.Write(mailID); this.Write((uint)mailAction); this.Write((uint)mailError); this.Write((uint)mailError); if (mailError == MailResponseResult.MAIL_ERR_EQUIP_ERROR) { this.Write(equipError); } else if (mailAction == MailResponseType.MAIL_ITEM_TAKEN) { this.Write(itemGUID); // item guid low? this.Write(itemCount); // item count? } }