Core: use enum InventoryResult as return type for functions working with player items.
Original patch by TOM_RUS.
This commit is contained in:
1 parent
e1647aaa29
commit
6fb2bf4224
22 files changed
+164
-191
No files matched your search
@@ -2431,7 +2431,7 @@ void Spell::DoCreateItem(uint32 /*i*/, uint32 itemtype)
|
||||
// can the player store the new item?
|
||||
ItemPosCountVec dest;
|
||||
uint32 no_space = 0;
|
||||
uint8 msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, newitemid, num_to_add, &no_space);
|
||||
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, newitemid, num_to_add, &no_space);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
// convert to possible store amount
|
||||
@@ -2897,7 +2897,7 @@ void Spell::EffectSummonChangeItem(SpellEffIndex effIndex)
|
||||
if (player->IsInventoryPos(pos))
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = player->CanStoreItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), dest, pNewItem, true);
|
||||
InventoryResult msg = player->CanStoreItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), dest, pNewItem, true);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
||||
|
||||
Reference in new issue
Block a user