mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Items: Fixed crash happening when deleting item before it was saved for the first time
Closes #26532
This commit is contained in:
@@ -12690,7 +12690,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
|
||||
pItem->SetSlot(NULL_SLOT);
|
||||
pItem->SetState(ITEM_REMOVED, this);
|
||||
|
||||
if (pItem->GetTemplate()->GetInventoryType() != INVTYPE_NON_EQUIP)
|
||||
if (pProto->GetInventoryType() != INVTYPE_NON_EQUIP)
|
||||
UpdateAverageItemLevelTotal();
|
||||
if (bag == INVENTORY_SLOT_BAG_0)
|
||||
UpdateAverageItemLevelEquipped();
|
||||
|
||||
Reference in New Issue
Block a user