mirror of
https://github.com/azerothcore/mod-transmog
synced 2025-11-29 22:48:30 +08:00
Adds checkto OnLootItem() to ensure that the pointer is still valid. (#123)
This commit is contained in:
@@ -913,7 +913,7 @@ public:
|
|||||||
|
|
||||||
void OnLootItem(Player* player, Item* item, uint32 /*count*/, ObjectGuid /*lootguid*/) override
|
void OnLootItem(Player* player, Item* item, uint32 /*count*/, ObjectGuid /*lootguid*/) override
|
||||||
{
|
{
|
||||||
if (!sT->GetUseCollectionSystem() || !item)
|
if (!sT->GetUseCollectionSystem() || !item || typeid(*item) != typeid(Item))
|
||||||
return;
|
return;
|
||||||
if (item->GetTemplate()->Bonding == ItemBondingType::BIND_WHEN_PICKED_UP || item->IsSoulBound())
|
if (item->GetTemplate()->Bonding == ItemBondingType::BIND_WHEN_PICKED_UP || item->IsSoulBound())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user