mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-15 17:03:50 +00:00
fix(dbc): runtime detection for ItemDisplayInfo texture field indices
Revert static JSON layout changes (15-22 back to 14-21) since WotLK loads the Classic 23-field DBC. Add getItemDisplayInfoTextureFields() helper that detects field count at runtime and adjusts the texture base index accordingly (14 for 23-field, 15 for 25-field).
This commit is contained in:
parent
3111fa50e8
commit
1379e74c40
6 changed files with 51 additions and 70 deletions
|
|
@ -739,16 +739,8 @@ bool CharacterPreview::applyEquipment(const std::vector<game::EquipmentItem>& eq
|
|||
// Texture component region fields — use DBC layout when available, fall back to binary offsets.
|
||||
const auto* idiL = pipeline::getActiveDBCLayout()
|
||||
? pipeline::getActiveDBCLayout()->getLayout("ItemDisplayInfo") : nullptr;
|
||||
const uint32_t texRegionFields[8] = {
|
||||
idiL ? (*idiL)["TextureArmUpper"] : 14u,
|
||||
idiL ? (*idiL)["TextureArmLower"] : 15u,
|
||||
idiL ? (*idiL)["TextureHand"] : 16u,
|
||||
idiL ? (*idiL)["TextureTorsoUpper"] : 17u,
|
||||
idiL ? (*idiL)["TextureTorsoLower"] : 18u,
|
||||
idiL ? (*idiL)["TextureLegUpper"] : 19u,
|
||||
idiL ? (*idiL)["TextureLegLower"] : 20u,
|
||||
idiL ? (*idiL)["TextureFoot"] : 21u,
|
||||
};
|
||||
uint32_t texRegionFields[8];
|
||||
pipeline::getItemDisplayInfoTextureFields(*displayInfoDbc, idiL, texRegionFields);
|
||||
|
||||
std::vector<std::pair<int, std::string>> regionLayers;
|
||||
regionLayers.reserve(32);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue