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

Original patch by TOM_RUS.
This commit is contained in:
Azazel
2011-04-29 16:48:15 +06:00
parent e1647aaa29
commit 6fb2bf4224
22 changed files with 164 additions and 191 deletions
+2 -2
View File
@@ -282,7 +282,7 @@ bool ChatHandler::HandleAddItemCommand(const char *args)
// check space and find places
ItemPosCountVec dest;
uint8 msg = plTarget->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, count, &noSpaceForCount);
InventoryResult msg = plTarget->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, count, &noSpaceForCount);
if (msg != EQUIP_ERR_OK) // convert to possible store amount
count -= noSpaceForCount;
@@ -348,7 +348,7 @@ bool ChatHandler::HandleAddItemSetCommand(const char *args)
{
found = true;
ItemPosCountVec dest;
uint8 msg = playerTarget->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itr->second.ItemId, 1);
InventoryResult msg = playerTarget->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itr->second.ItemId, 1);
if (msg == EQUIP_ERR_OK)
{
Item* item = playerTarget->StoreNewItem(dest, itr->second.ItemId, true);