Adds checkto OnLootItem() to ensure that the pointer is still valid. (#123)

This commit is contained in:
KJack
2023-09-20 15:55:06 -04:00
committed by GitHub
parent 342eb6ebed
commit 44dca16e00

View File

@@ -913,7 +913,7 @@ public:
void OnLootItem(Player* player, Item* item, uint32 /*count*/, ObjectGuid /*lootguid*/) override
{
if (!sT->GetUseCollectionSystem() || !item)
if (!sT->GetUseCollectionSystem() || !item || typeid(*item) != typeid(Item))
return;
if (item->GetTemplate()->Bonding == ItemBondingType::BIND_WHEN_PICKED_UP || item->IsSoulBound())
{