mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Remove debug LOG_INFO spam from applyEquipment; use DBC layout for texture fields
The verbose diagnostic logs added in 16cdde8 for Classic equipment debugging
are no longer needed now that the CSV string-detection bug is fixed. Remove
them to eliminate log spam on every character screen open.
Also replace the hardcoded `14 + region` texture field lookup with the same
DBC-layout-aware array pattern used in game_screen.cpp::updateCharacterTextures,
so texture field indices are correctly resolved per expansion.
This commit is contained in:
parent
b31a2a66b6
commit
5c830216be
1 changed files with 15 additions and 24 deletions
|
|
@ -547,20 +547,6 @@ bool CharacterPreview::applyEquipment(const std::vector<game::EquipmentItem>& eq
|
|||
return false;
|
||||
}
|
||||
|
||||
// Diagnostic: log equipment vector and DBC state
|
||||
LOG_INFO("applyEquipment: ", equipment.size(), " items, ItemDisplayInfo.dbc records=",
|
||||
displayInfoDbc->getRecordCount(), " fields=", displayInfoDbc->getFieldCount(),
|
||||
" bodySkin=", bodySkinPath_.empty() ? "(empty)" : bodySkinPath_);
|
||||
for (size_t ei = 0; ei < equipment.size(); ++ei) {
|
||||
const auto& it = equipment[ei];
|
||||
if (it.displayModel == 0) continue;
|
||||
int32_t dbcRec = displayInfoDbc->findRecordById(it.displayModel);
|
||||
LOG_INFO(" slot[", ei, "]: displayModel=", it.displayModel,
|
||||
" invType=", (int)it.inventoryType,
|
||||
" dbcRec=", dbcRec,
|
||||
(dbcRec >= 0 ? " (found)" : " (NOT FOUND in ItemDisplayInfo.dbc)"));
|
||||
}
|
||||
|
||||
auto hasInvType = [&](std::initializer_list<uint8_t> types) -> bool {
|
||||
for (const auto& it : equipment) {
|
||||
if (it.displayModel == 0) continue;
|
||||
|
|
@ -586,10 +572,6 @@ bool CharacterPreview::applyEquipment(const std::vector<game::EquipmentItem>& eq
|
|||
int32_t recIdx = displayInfoDbc->findRecordById(displayInfoId);
|
||||
if (recIdx < 0) return 0;
|
||||
uint32_t val = displayInfoDbc->getUInt32(static_cast<uint32_t>(recIdx), 7 + groupField);
|
||||
if (val > 0) {
|
||||
LOG_INFO(" getGeosetGroup: displayInfoId=", displayInfoId,
|
||||
" groupField=", groupField, " field=", (7 + groupField), " val=", val);
|
||||
}
|
||||
return val;
|
||||
};
|
||||
|
||||
|
|
@ -661,6 +643,20 @@ bool CharacterPreview::applyEquipment(const std::vector<game::EquipmentItem>& eq
|
|||
"LegUpperTexture", "LegLowerTexture", "FootTexture",
|
||||
};
|
||||
|
||||
// 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,
|
||||
};
|
||||
|
||||
std::vector<std::pair<int, std::string>> regionLayers;
|
||||
regionLayers.reserve(32);
|
||||
|
||||
|
|
@ -670,13 +666,9 @@ bool CharacterPreview::applyEquipment(const std::vector<game::EquipmentItem>& eq
|
|||
if (recIdx < 0) continue;
|
||||
|
||||
for (int region = 0; region < 8; region++) {
|
||||
uint32_t fieldIdx = 14 + region; // texture_1..texture_8
|
||||
std::string texName = displayInfoDbc->getString(static_cast<uint32_t>(recIdx), fieldIdx);
|
||||
std::string texName = displayInfoDbc->getString(static_cast<uint32_t>(recIdx), texRegionFields[region]);
|
||||
if (texName.empty()) continue;
|
||||
|
||||
LOG_INFO(" texture region ", region, " (field ", fieldIdx, "): texName=", texName,
|
||||
" for displayModel=", it.displayModel);
|
||||
|
||||
std::string base = "Item\\TextureComponents\\" +
|
||||
std::string(componentDirs[region]) + "\\" + texName;
|
||||
|
||||
|
|
@ -692,7 +684,6 @@ bool CharacterPreview::applyEquipment(const std::vector<game::EquipmentItem>& eq
|
|||
} else if (assetManager_->fileExists(basePath)) {
|
||||
fullPath = basePath;
|
||||
} else {
|
||||
LOG_INFO(" texture path not found: ", base, " (_M/_F/_U/.blp)");
|
||||
continue;
|
||||
}
|
||||
regionLayers.emplace_back(region, fullPath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue