Core/Items: Fixed crash happening when deleting item before it was saved for the first time

Port From (https://github.com/TrinityCore/TrinityCore/commit/3df64ceff4aaada63c598d110156f22dd31f1d2c)
This commit is contained in:
hondacrx
2021-05-18 13:46:30 -04:00
parent 00da79c7a9
commit fb81030c75
+1 -1
View File
@@ -5431,7 +5431,7 @@ namespace Game.Entities
pItem.SetSlot(ItemConst.NullSlot);
pItem.SetState(ItemUpdateState.Removed, this);
if (pItem.GetTemplate().GetInventoryType() != InventoryType.NonEquip)
if (pProto.GetInventoryType() != InventoryType.NonEquip)
UpdateAverageItemLevelTotal();
if (bag == InventorySlots.Bag0)