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

@ -13081,6 +13081,15 @@ void GameScreen::renderZoneToasts(float deltaTime) {
[](const ZoneToastEntry& e) { return e.age >= kZoneToastLifetime; }),
zoneToasts_.end());
// Suppress toasts while the zone text overlay is showing the same zone —
// avoids duplicate "Entering: Stormwind City" messages.
if (zoneTextTimer_ > 0.0f) {
zoneToasts_.erase(
std::remove_if(zoneToasts_.begin(), zoneToasts_.end(),
[this](const ZoneToastEntry& e) { return e.zoneName == zoneTextName_; }),
zoneToasts_.end());
}
if (zoneToasts_.empty()) return;
auto* window = core::Application::getInstance().getWindow();
@ -21462,11 +21471,14 @@ void GameScreen::renderMailWindow(game::GameHandler& gameHandler) {
// COD warning
if (mail.cod > 0) {
uint32_t g = mail.cod / 10000;
uint32_t s = (mail.cod / 100) % 100;
uint32_t c = mail.cod % 100;
uint64_t g = mail.cod / 10000;
uint64_t s = (mail.cod / 100) % 100;
uint64_t c = mail.cod % 100;
ImGui::TextColored(kColorRed,
"COD: %ug %us %uc (you pay this to take items)", g, s, c);
"COD: %llug %llus %lluc (you pay this to take items)",
static_cast<unsigned long long>(g),
static_cast<unsigned long long>(s),
static_cast<unsigned long long>(c));
}
// Attachments
@ -21693,9 +21705,9 @@ void GameScreen::renderMailComposeWindow(game::GameHandler& gameHandler) {
ImGui::SameLine();
ImGui::Text("c");
uint32_t totalMoney = static_cast<uint32_t>(mailComposeMoney_[0]) * 10000 +
static_cast<uint32_t>(mailComposeMoney_[1]) * 100 +
static_cast<uint32_t>(mailComposeMoney_[2]);
uint64_t totalMoney = static_cast<uint64_t>(mailComposeMoney_[0]) * 10000 +
static_cast<uint64_t>(mailComposeMoney_[1]) * 100 +
static_cast<uint64_t>(mailComposeMoney_[2]);
uint32_t sendCost = attachCount > 0 ? static_cast<uint32_t>(30 * attachCount) : 30u;
ImGui::TextColored(kColorGray, "Sending cost: %uc", sendCost);