mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 16:30:15 +00:00
fix(mail): correct WotLK mail list attachment parsing
This commit is contained in:
parent
5fa5020af5
commit
013f6be162
1 changed files with 5 additions and 4 deletions
|
|
@ -5141,10 +5141,9 @@ bool PacketParsers::parseMailList(network::Packet& packet, std::vector<MailMessa
|
|||
msg.expirationTime = packet.readFloat();
|
||||
msg.mailTemplateId = packet.readUInt32();
|
||||
msg.subject = packet.readString();
|
||||
|
||||
if (msg.mailTemplateId == 0) {
|
||||
msg.body = packet.readString();
|
||||
}
|
||||
// WotLK 3.3.5a always includes body text in SMSG_MAIL_LIST_RESULT.
|
||||
// mailTemplateId != 0 still carries a (possibly empty) body string.
|
||||
msg.body = packet.readString();
|
||||
|
||||
uint8_t attachCount = packet.readUInt8();
|
||||
msg.attachments.reserve(attachCount);
|
||||
|
|
@ -5164,6 +5163,8 @@ bool PacketParsers::parseMailList(network::Packet& packet, std::vector<MailMessa
|
|||
att.stackCount = packet.readUInt32();
|
||||
att.chargesOrDurability = packet.readUInt32();
|
||||
att.maxDurability = packet.readUInt32();
|
||||
packet.readUInt32(); // durability/current durability
|
||||
packet.readUInt8(); // unknown WotLK trailing byte per attachment
|
||||
msg.attachments.push_back(att);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue