Core/Spells: Fix missing "Inventory is full" with spells that create more than 1 item

Port From (https://github.com/TrinityCore/TrinityCore/commit/4e0da6f7d12bdbf9a333901f58903757d236c59f)
This commit is contained in:
hondacrx
2022-01-07 12:54:01 -05:00
parent 038a06e166
commit a09f085aa9
+1 -1
View File
@@ -6165,7 +6165,7 @@ namespace Game.Spells
if (spellEffectInfo.ItemType != 0)
{
List<ItemPosCount> dest = new();
InventoryResult msg = target.ToPlayer().CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, spellEffectInfo.ItemType, 1);
InventoryResult msg = target.ToPlayer().CanStoreNewItem(ItemConst.NullBag, ItemConst.NullSlot, dest, spellEffectInfo.ItemType, spellEffectInfo.CalcValue());
if (msg != InventoryResult.Ok)
{
ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate(spellEffectInfo.ItemType);