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

This commit is contained in:
jackpoz authored and Ovahlord committed 2022-09-12 09:15:26 +02:00
1 parent 5724e4c578
commit c237b056b3
1 file changed
+1 -1
+1 -1
View File
@@ -7127,7 +7127,7 @@ SpellCastResult Spell::CheckItems(uint32* param1 /*= nullptr*/, uint32* param2 /
if (m_spellInfo->Effects[i].ItemType)
{
ItemPosCountVec dest;
InventoryResult msg = target->ToPlayer()->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->Effects[i].ItemType, 1);
InventoryResult msg = target->ToPlayer()->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->Effects[i].ItemType, m_spellInfo->Effects[i].CalcValue());
if (msg != EQUIP_ERR_OK)
{
ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(m_spellInfo->Effects[i].ItemType);