Core: use enum InventoryResult as return type for functions working with player items.
Original patch by TOM_RUS.
This commit is contained in:
@@ -105,12 +105,13 @@ public:
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
uint32 itemId = 23614;
|
||||
uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1);
|
||||
InventoryResult msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, 1);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
if (Item* item = pPlayer->StoreNewItem(dest, itemId, true))
|
||||
pPlayer->SendNewItem(item, 1, false, true);
|
||||
} else
|
||||
}
|
||||
else
|
||||
pPlayer->SendEquipError(msg, NULL, NULL, itemId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user