Core: use enum InventoryResult as return type for functions working with player items.

Original patch by TOM_RUS.
This commit is contained in:
Azazel committed 2011-04-29 16:48:15 +06:00
1 parent e1647aaa29
commit 6fb2bf4224
22 files changed
+164 -191

No files matched your search

+2 -2
View File
@@ -6092,7 +6092,7 @@ SpellCastResult Spell::CheckItems()
if (!m_IsTriggeredSpell && m_spellInfo->EffectItemType[i])
{
ItemPosCountVec dest;
uint8 msg = p_caster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->EffectItemType[i], 1);
InventoryResult msg = p_caster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->EffectItemType[i], 1);
if (msg != EQUIP_ERR_OK)
{
ItemTemplate const *pProto = sObjectMgr->GetItemTemplate(m_spellInfo->EffectItemType[i]);
@@ -6127,7 +6127,7 @@ SpellCastResult Spell::CheckItems()
if (m_CastItem && m_CastItem->GetTemplate()->Flags & ITEM_PROTO_FLAG_TRIGGERED_CAST)
return SPELL_FAILED_TOTEM_CATEGORY;
ItemPosCountVec dest;
uint8 msg = p_caster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->EffectItemType[i], 1);
InventoryResult msg = p_caster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->EffectItemType[i], 1);
if (msg != EQUIP_ERR_OK)
{
p_caster->SendEquipError(msg, NULL, NULL, m_spellInfo->EffectItemType[i]);