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

(cherry picked from commit 2a41755b589f215c14c85b1015e71534c1e91a98)
This commit is contained in:
jackpoz
2021-12-24 00:46:45 +01:00
committed by Shauren
parent 48bd9698f8
commit 4e0da6f7d1
+1 -1
View File
@@ -6918,7 +6918,7 @@ SpellCastResult Spell::CheckItems(int32* param1 /*= nullptr*/, int32* param2 /*=
if (spellEffectInfo.ItemType)
{
ItemPosCountVec dest;
InventoryResult msg = target->ToPlayer()->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, spellEffectInfo.ItemType, 1);
InventoryResult msg = target->ToPlayer()->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, spellEffectInfo.ItemType, spellEffectInfo.CalcValue());
if (msg != EQUIP_ERR_OK)
{
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(spellEffectInfo.ItemType);