mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix equipment textures: correct DBC field indices and stop texture cycling
Binary ItemDisplayInfo.dbc has 23 fields with texture components at 14-21, not 15-22. The previous "fix" shifted all fields by +1 which read wrong columns and broke both player and NPC equipment rendering. Also fix local player texture cycling: rebuildOnlineInventory() was called on every item query response (including for other players), unconditionally setting onlineEquipDirty_ which triggered redundant texture recompositing. Now tracks previous equipment displayInfoIds and only sets dirty when they actually change. Unified all 3 equipment texture code paths (local player, other players, NPCs) to use the DBC layout system with correct field 14 base index.
This commit is contained in:
parent
e0e927cac1
commit
8282583b9a
8 changed files with 57 additions and 35 deletions
|
|
@ -5686,7 +5686,16 @@ void GameHandler::rebuildOnlineInventory() {
|
|||
}
|
||||
}
|
||||
|
||||
onlineEquipDirty_ = true;
|
||||
// Only mark equipment dirty if equipped item displayInfoIds actually changed
|
||||
std::array<uint32_t, 19> currentEquipDisplayIds{};
|
||||
for (int i = 0; i < 19; i++) {
|
||||
const auto& slot = inventory.getEquipSlot(static_cast<EquipSlot>(i));
|
||||
if (!slot.empty()) currentEquipDisplayIds[i] = slot.item.displayInfoId;
|
||||
}
|
||||
if (currentEquipDisplayIds != lastEquipDisplayIds_) {
|
||||
lastEquipDisplayIds_ = currentEquipDisplayIds;
|
||||
onlineEquipDirty_ = true;
|
||||
}
|
||||
|
||||
LOG_DEBUG("Rebuilt online inventory: equip=", [&](){
|
||||
int c = 0; for (auto g : equipSlotGuids_) if (g) c++; return c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue