fix(dbc): add ItemDisplayInfo.RightModel and RightModelTexture to all expansions

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.
This commit is contained in:
Kelsi
2026-05-15 02:04:38 -07:00
parent bd5e9aa2c2
commit 50e31ab0eb
4 changed files with 8 additions and 0 deletions

View File

@@ -113,7 +113,9 @@
"ID": 0,
"InventoryIcon": 5,
"LeftModel": 1,
"RightModel": 2,
"LeftModelTexture": 3,
"RightModelTexture": 4,
"TextureArmLower": 15,
"TextureArmUpper": 14,
"TextureFoot": 21,

View File

@@ -118,7 +118,9 @@
"ID": 0,
"InventoryIcon": 5,
"LeftModel": 1,
"RightModel": 2,
"LeftModelTexture": 3,
"RightModelTexture": 4,
"TextureArmLower": 15,
"TextureArmUpper": 14,
"TextureFoot": 21,

View File

@@ -112,7 +112,9 @@
"ID": 0,
"InventoryIcon": 5,
"LeftModel": 1,
"RightModel": 2,
"LeftModelTexture": 3,
"RightModelTexture": 4,
"TextureArmLower": 15,
"TextureArmUpper": 14,
"TextureFoot": 21,

View File

@@ -130,7 +130,9 @@
"ID": 0,
"InventoryIcon": 5,
"LeftModel": 1,
"RightModel": 2,
"LeftModelTexture": 3,
"RightModelTexture": 4,
"TextureArmLower": 15,
"TextureArmUpper": 14,
"TextureFoot": 21,