fix: mail money uint64, other-player cape textures, zone toast dedup, TCP_NODELAY

Mail: change money/COD fields from uint32 to uint64 in CMSG_SEND_MAIL and
SMSG_MAIL_LIST_RESULT for WotLK 3.3.5a. Classic keeps uint32 on the wire.
Fixes money truncation and packet misalignment causing mail failures.

Other-player capes: add cape texture loading to setOnlinePlayerEquipment().
The cape geoset was enabled but no texture was loaded, leaving capes blank.
Now mirrors the local-player path: looks up ItemDisplayInfo.dbc, finds cape
texture candidates, applies via setGroupTextureOverride/setTextureSlotOverride.

Zone toasts: suppress duplicate zone toast when the zone text overlay is
already showing the same zone name. Fixes double "Entering: Stormwind City".

Network: enable TCP_NODELAY on both auth and world sockets after connect(),
disabling Nagle's algorithm to eliminate up to 200ms buffering delay on
small packets (movement, spell casts, chat).

Rendering: track material and bone descriptor sets in M2 renderer to skip
redundant vkCmdBindDescriptorSets calls between batches sharing same textures.
This commit is contained in:
Kelsi 2026-03-27 17:20:31 -07:00
parent 6b1c728377
commit 50a3eb7f07
12 changed files with 141 additions and 28 deletions

View file

@ -2172,7 +2172,7 @@ public:
bool hasNewMail() const { return hasNewMail_; }
void closeMailbox();
void sendMail(const std::string& recipient, const std::string& subject,
const std::string& body, uint32_t money, uint32_t cod = 0);
const std::string& body, uint64_t money, uint64_t cod = 0);
// Mail attachments (max 12 per WotLK)
static constexpr int MAIL_MAX_ATTACHMENTS = 12;

View file

@ -261,7 +261,7 @@ public:
/** Build CMSG_SEND_MAIL */
virtual network::Packet buildSendMail(uint64_t mailboxGuid, const std::string& recipient,
const std::string& subject, const std::string& body,
uint32_t money, uint32_t cod,
uint64_t money, uint64_t cod,
const std::vector<uint64_t>& itemGuids = {}) {
return SendMailPacket::build(mailboxGuid, recipient, subject, body, money, cod, itemGuids);
}
@ -420,7 +420,7 @@ public:
network::Packet buildLeaveChannel(const std::string& channelName) override;
network::Packet buildSendMail(uint64_t mailboxGuid, const std::string& recipient,
const std::string& subject, const std::string& body,
uint32_t money, uint32_t cod,
uint64_t money, uint64_t cod,
const std::vector<uint64_t>& itemGuids = {}) override;
bool parseMailList(network::Packet& packet, std::vector<MailMessage>& inbox) override;
network::Packet buildMailTakeItem(uint64_t mailboxGuid, uint32_t mailId, uint32_t itemGuidLow) override;

View file

@ -2497,8 +2497,8 @@ struct MailMessage {
std::string subject;
std::string body;
uint32_t stationeryId = 0;
uint32_t money = 0;
uint32_t cod = 0; // Cash on delivery
uint64_t money = 0;
uint64_t cod = 0; // Cash on delivery
uint32_t flags = 0;
float expirationTime = 0.0f;
uint32_t mailTemplateId = 0;
@ -2517,7 +2517,7 @@ class SendMailPacket {
public:
static network::Packet build(uint64_t mailboxGuid, const std::string& recipient,
const std::string& subject, const std::string& body,
uint32_t money, uint32_t cod,
uint64_t money, uint64_t cod,
const std::vector<uint64_t>& itemGuids = {});
};