fix: validate displayId range and skip missing equipment textures

Reject displayId values >100k (corrupted update-field data) to avoid
pointless DBC lookups and log spam. Add fileExists() guard before
using base texture path in 4 equipment compositing code paths that
were falling through without checking, causing excessive "Texture not
found" warnings when users have incomplete MPQ extractions.
This commit is contained in:
Kelsi 2026-04-14 04:20:28 -07:00
parent 2f3a973444
commit 83eef878fb
4 changed files with 18 additions and 5 deletions

View file

@ -769,10 +769,12 @@ void EntitySpawner::setOnlinePlayerEquipment(uint64_t guid,
std::string base = "Item\\TextureComponents\\" + std::string(componentDirs[region]) + "\\" + texName;
std::string genderPath = base + (isFemale ? "_F.blp" : "_M.blp");
std::string unisexPath = base + "_U.blp";
std::string basePath = base + ".blp";
std::string fullPath;
if (assetManager_->fileExists(genderPath)) fullPath = genderPath;
else if (assetManager_->fileExists(unisexPath)) fullPath = unisexPath;
else fullPath = base + ".blp";
else if (assetManager_->fileExists(basePath)) fullPath = basePath;
else continue;
regionLayers.emplace_back(region, fullPath);
}