From 50e31ab0eb8b006e11ebff5bc16451061d2bfe40 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 15 May 2026 02:04:38 -0700 Subject: [PATCH] fix(dbc): add ItemDisplayInfo.RightModel and RightModelTexture to all expansions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit entity_spawner.cpp:1832-1835 queries these for shoulder-piece M2 attachment (shoulders have two models — left at attachment point 5 and right at attachment point 6): const uint32_t leftModelField = idiL ? (*idiL)["LeftModel"] : 1u; const uint32_t rightModelField = idiL ? (*idiL)["RightModel"] : 2u; const uint32_t leftTexFieldS = idiL ? (*idiL)["LeftModelTexture"] : 3u; const uint32_t rightTexFieldS = idiL ? (*idiL)["RightModelTexture"]: 4u; None of the four dbc_layouts.json files defined RightModel or RightModelTexture. The ternary returns the layout lookup result when idiL is non-null — and DBCFieldMap::operator[] on a missing field returns DBC_FIELD_INVALID (0xFFFFFFFF), NOT the intended fallback. So shoulder right-side M2 model and texture loaded from field 0xFFFFFFFF (out of bounds, getUInt32 returns 0) and the right shoulder pad never rendered on any character. Added the standard pairing values (RightModel=2, RightModelTexture=4) to all four expansion layouts — these match the canonical ItemDisplayInfo.dbc field order and the code's intended fallbacks. Same root cause as bd5e9aa2 (SpellRange.MinRange) — the 'tnL ? (*tnL)["Field"] : N' pattern silently breaks when the field is missing from the JSON but the DBC is present, because the sentinel from operator[] beats the fallback N. --- Data/expansions/classic/dbc_layouts.json | 2 ++ Data/expansions/tbc/dbc_layouts.json | 2 ++ Data/expansions/turtle/dbc_layouts.json | 2 ++ Data/expansions/wotlk/dbc_layouts.json | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Data/expansions/classic/dbc_layouts.json b/Data/expansions/classic/dbc_layouts.json index d3041cb4..69ffe768 100644 --- a/Data/expansions/classic/dbc_layouts.json +++ b/Data/expansions/classic/dbc_layouts.json @@ -113,7 +113,9 @@ "ID": 0, "InventoryIcon": 5, "LeftModel": 1, + "RightModel": 2, "LeftModelTexture": 3, + "RightModelTexture": 4, "TextureArmLower": 15, "TextureArmUpper": 14, "TextureFoot": 21, diff --git a/Data/expansions/tbc/dbc_layouts.json b/Data/expansions/tbc/dbc_layouts.json index f96d74c6..18fcc55a 100644 --- a/Data/expansions/tbc/dbc_layouts.json +++ b/Data/expansions/tbc/dbc_layouts.json @@ -118,7 +118,9 @@ "ID": 0, "InventoryIcon": 5, "LeftModel": 1, + "RightModel": 2, "LeftModelTexture": 3, + "RightModelTexture": 4, "TextureArmLower": 15, "TextureArmUpper": 14, "TextureFoot": 21, diff --git a/Data/expansions/turtle/dbc_layouts.json b/Data/expansions/turtle/dbc_layouts.json index c1b351e6..eb89b666 100644 --- a/Data/expansions/turtle/dbc_layouts.json +++ b/Data/expansions/turtle/dbc_layouts.json @@ -112,7 +112,9 @@ "ID": 0, "InventoryIcon": 5, "LeftModel": 1, + "RightModel": 2, "LeftModelTexture": 3, + "RightModelTexture": 4, "TextureArmLower": 15, "TextureArmUpper": 14, "TextureFoot": 21, diff --git a/Data/expansions/wotlk/dbc_layouts.json b/Data/expansions/wotlk/dbc_layouts.json index 9bd48eb5..843224c5 100644 --- a/Data/expansions/wotlk/dbc_layouts.json +++ b/Data/expansions/wotlk/dbc_layouts.json @@ -130,7 +130,9 @@ "ID": 0, "InventoryIcon": 5, "LeftModel": 1, + "RightModel": 2, "LeftModelTexture": 3, + "RightModelTexture": 4, "TextureArmLower": 15, "TextureArmUpper": 14, "TextureFoot": 21,