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

View File

@@ -776,7 +776,7 @@ void Map::ScriptsProcess()
if (Player* pReceiver = _GetScriptPlayerSourceOrTarget(source, target, step.script))
{
ItemPosCountVec dest;
uint8 msg = pReceiver->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, step.script->CreateItem.ItemEntry, step.script->CreateItem.Amount);
InventoryResult msg = pReceiver->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, step.script->CreateItem.ItemEntry, step.script->CreateItem.Amount);
if (msg == EQUIP_ERR_OK)
{
if (Item* item = pReceiver->StoreNewItem(dest, step.script->CreateItem.ItemEntry, true))