mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-27 05:23:51 +00:00
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:
parent
2f3a973444
commit
83eef878fb
4 changed files with 18 additions and 5 deletions
|
|
@ -649,6 +649,14 @@ void EntitySpawner::buildCreatureDisplayLookups() {
|
|||
}
|
||||
|
||||
std::string EntitySpawner::getModelPathForDisplayId(uint32_t displayId) const {
|
||||
// WotLK 3.3.5a CreatureDisplayInfo tops out around ~32000; values far
|
||||
// beyond that are corrupted update-field data or packet parse errors.
|
||||
// Silently reject to avoid pointless DBC lookups and log spam.
|
||||
constexpr uint32_t kMaxReasonableDisplayId = 100000;
|
||||
if (displayId == 0 || displayId > kMaxReasonableDisplayId) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (displayId == 30412) return "Creature\\Gryphon\\Gryphon.m2";
|
||||
if (displayId == 30413) return "Creature\\Wyvern\\Wyvern.m2";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue