Fix crash when displaying Mirror Image with hidden transmogs (#94)

* Fix crash when displaying Mirror Image with hidden transmogs

* brackets

Co-authored-by: Nefertumm <nefertum.dev@protonmail.com>
This commit is contained in:
ZhengPeiRu21
2022-07-31 22:49:20 -06:00
committed by GitHub
parent 4be33942f9
commit fead45b93c

View File

@@ -720,8 +720,17 @@ public:
void OnMirrorImageDisplayItem(const Item *item, uint32 &display) override
{
if (uint32 entry = sTransmogrification->GetFakeEntry(item->GetGUID()))
{
if (entry == HIDDEN_ITEM_ID)
{
display = 0;
}
else
{
display=uint32(sObjectMgr->GetItemTemplate(entry)->DisplayInfoID);
}
}
}
};
class unit_transmog_script : public UnitScript