From d8c768701d9915554679ddfa47947d559a08f2d2 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 28 Mar 2026 16:12:31 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20visible=20item=20field=20base=20284?= =?UTF-8?q?=E2=86=92283=20(confirmed=20by=20raw=20field=20dump)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RAW FIELDS dump shows item entries at odd indices: 283, 285, 287, 289... With base=283, stride=2: 17 of 19 slots have valid item IDs (14200, 12020, 14378, etc). Slots 12-13 (trinkets) correctly empty. With base=284: only 5 entries, and values are enchant IDs (913, 905, 904) — these are the field AFTER each entry, confirming base was off by 1. --- include/game/game_handler.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/game/game_handler.hpp b/include/game/game_handler.hpp index b4ab02d5..445844fe 100644 --- a/include/game/game_handler.hpp +++ b/include/game/game_handler.hpp @@ -2530,10 +2530,13 @@ 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 (AzerothCore/ChromieCraft): visible item entries appear at field - // indices 284, 288, 292, 296, ... with stride 4. Confirmed by RAW FIELDS dump: - // [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; + // WotLK 3.3.5a: PLAYER_VISIBLE_ITEM_1_ENTRYID = field 283, stride 2. + // Confirmed by RAW FIELDS dump: base=283 gives 17/19 valid item IDs, + // base=284 reads enchant values instead. + // Slots: HEAD=0, NECK=1, SHOULDERS=2, BODY=3, CHEST=4, WAIST=5, LEGS=6, + // FEET=7, WRISTS=8, HANDS=9, FINGER1=10, FINGER2=11, TRINKET1=12, + // TRINKET2=13, BACK=14, MAINHAND=15, OFFHAND=16, RANGED=17, TABARD=18 + int visibleItemEntryBase_ = 283; int visibleItemStride_ = 2; bool visibleItemLayoutVerified_ = false; // true once heuristic confirms/overrides default std::unordered_map> otherPlayerVisibleItemEntries_;