From 15f6aaadb25034ceca71c5468edbaf8f09e07e4c Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 28 Mar 2026 11:07:17 -0700 Subject: [PATCH] fix: revert stride to 2 (correct for WotLK visible items), add re-emit tracing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stride 4 was wrong — the raw dump shows entries at 284, 288, 292 which are slots 0, 2, 4 with stride 2 (slot 1=NECK is zero because necks are invisible). Stride 2 with base 284 correctly maps 19 equipment slots. Added WARNING-level log when item query responses trigger equipment re-emit for other players, to confirm the re-emit chain works. The falling-through-world issue is likely terrain chunks not loading fast enough — the terrain streaming stalls are still present. --- include/game/game_handler.hpp | 2 +- src/game/inventory_handler.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/game/game_handler.hpp b/include/game/game_handler.hpp index 462c33b2..b9977d06 100644 --- a/include/game/game_handler.hpp +++ b/include/game/game_handler.hpp @@ -2573,7 +2573,7 @@ private: // [284]=3817(Buckler) [288]=3808(Boots) [292]=3252 [296]=3823 [300]=3845 etc. // Each visible item occupies 4 fields: entry(1) + enchant(1) + padding(2). int visibleItemEntryBase_ = 284; - int visibleItemStride_ = 4; + int visibleItemStride_ = 2; bool visibleItemLayoutVerified_ = false; // true once heuristic confirms/overrides default std::unordered_map> otherPlayerVisibleItemEntries_; std::unordered_set otherPlayerVisibleDirty_; diff --git a/src/game/inventory_handler.cpp b/src/game/inventory_handler.cpp index 1c83417d..5c468306 100644 --- a/src/game/inventory_handler.cpp +++ b/src/game/inventory_handler.cpp @@ -2370,14 +2370,19 @@ void InventoryHandler::handleItemQueryResponse(network::Packet& packet) { // Selectively re-emit only players whose equipment references this item entry const uint32_t resolvedEntry = data.entry; + int reemitCount = 0; for (const auto& [guid, entries] : owner_.otherPlayerVisibleItemEntries_) { for (uint32_t e : entries) { if (e == resolvedEntry) { emitOtherPlayerEquipment(guid); + reemitCount++; break; } } } + if (reemitCount > 0) { + LOG_WARNING("Re-emitted equipment for ", reemitCount, " players after resolving entry=", resolvedEntry); + } // Same for inspect-based entries if (owner_.playerEquipmentCallback_) { for (const auto& [guid, entries] : owner_.inspectedPlayerItemEntries_) {