From f70beba07c4ac6df0dad1c48cb16a0333fb4a86f Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 28 Mar 2026 10:58:34 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20visible=20item=20field=20base=20408?= =?UTF-8?q?=E2=86=92286=20(computed=20from=20INV=5FSLOT=5FHEAD=3D324)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PLAYER_VISIBLE_ITEM_1_ENTRYID = PLAYER_FIELD_INV_SLOT_HEAD(324) - 19*2 = 286. The previous value of 408 landed far past inventory slots in string/name data, producing garbage entry IDs (ASCII fragments like "mant", "alk ", "ryan") that the server rejected as invalid items. Derivation: 19 visible item slots × 2 fields (entry + enchant) = 38 fields immediately before PLAYER_FIELD_INV_SLOT_HEAD at index 324. --- include/game/game_handler.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/game/game_handler.hpp b/include/game/game_handler.hpp index e2977b77..2cdd8fa7 100644 --- a/include/game/game_handler.hpp +++ b/include/game/game_handler.hpp @@ -2568,10 +2568,10 @@ private: // Visible equipment for other players: detect the update-field layout (base + stride) // using the local player's own equipped items, then decode other players by index. - // WotLK 3.3.5a: PLAYER_VISIBLE_ITEM_1_ENTRYID = UNIT_END(148) + 0x0104 = 408, stride 2. - // Previous value 284 (UNIT_END+136) was wrong — landed in quest log fields. + // WotLK 3.3.5a: PLAYER_VISIBLE_ITEM_1_ENTRYID = PLAYER_FIELD_INV_SLOT_HEAD(324) - 19*2 = 286. + // 19 visible item slots × 2 fields (entry + enchant) = 38 fields before inventory. // The heuristic in maybeDetectVisibleItemLayout() can still override if needed. - int visibleItemEntryBase_ = 408; + int visibleItemEntryBase_ = 286; int visibleItemStride_ = 2; bool visibleItemLayoutVerified_ = false; // true once heuristic confirms/overrides default std::unordered_map> otherPlayerVisibleItemEntries_;