mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Core/Spell): do not create new items when inventory is full (#4298)
This commit is contained in:
@@ -6916,6 +6916,15 @@ SpellCastResult Spell::CheckItems()
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELL_EFFECT_CREATE_RANDOM_ITEM:
|
||||
{
|
||||
if (player->GetFreeInventorySpace() == 0)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_INVENTORY_FULL, nullptr, nullptr, m_spellInfo->Effects[i].ItemType);
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELL_EFFECT_ENCHANT_ITEM:
|
||||
if (m_spellInfo->Effects[i].ItemType && m_targets.GetItemTarget()
|
||||
&& (m_targets.GetItemTarget()->IsWeaponVellum() || m_targets.GetItemTarget()->IsArmorVellum()))
|
||||
|
||||
Reference in New Issue
Block a user