Core: use enum InventoryResult as return type for functions working with player items.
Original patch by TOM_RUS.
This commit is contained in:
@@ -804,7 +804,7 @@ bool Item::IsBoundByEnchant() const
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8 Item::CanBeMergedPartlyWith(ItemTemplate const* proto) const
|
||||
InventoryResult Item::CanBeMergedPartlyWith(ItemTemplate const* proto) const
|
||||
{
|
||||
// not allow merge looting currently items
|
||||
if (m_lootGenerated)
|
||||
|
||||
@@ -36,7 +36,7 @@ struct ItemSetEffect
|
||||
SpellEntry const *spells[8];
|
||||
};
|
||||
|
||||
enum InventoryChangeFailure
|
||||
enum InventoryResult
|
||||
{
|
||||
EQUIP_ERR_OK = 0,
|
||||
EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1,
|
||||
@@ -79,7 +79,7 @@ enum InventoryChangeFailure
|
||||
EQUIP_ERR_YOU_ARE_DEAD = 38,
|
||||
EQUIP_ERR_CANT_DO_RIGHT_NOW = 39,
|
||||
EQUIP_ERR_INT_BAG_ERROR = 40,
|
||||
EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER2 = 41,
|
||||
EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT = 41,
|
||||
EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH = 42,
|
||||
EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED = 43,
|
||||
EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED = 44,
|
||||
@@ -129,7 +129,7 @@ enum InventoryChangeFailure
|
||||
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED = 89
|
||||
};
|
||||
|
||||
enum BuyFailure
|
||||
enum BuyResult
|
||||
{
|
||||
BUY_ERR_CANT_FIND_ITEM = 0,
|
||||
BUY_ERR_ITEM_ALREADY_SOLD = 1,
|
||||
@@ -142,7 +142,7 @@ enum BuyFailure
|
||||
BUY_ERR_REPUTATION_REQUIRE = 12
|
||||
};
|
||||
|
||||
enum SellFailure
|
||||
enum SellResult
|
||||
{
|
||||
SELL_ERR_CANT_FIND_ITEM = 1,
|
||||
SELL_ERR_CANT_SELL_ITEM = 2, // merchant doesn't like that item
|
||||
@@ -277,7 +277,7 @@ class Item : public Object
|
||||
uint32 GetMaxStackCount() const { return GetTemplate()->GetMaxStackSize(); }
|
||||
uint8 GetGemCountWithID(uint32 GemID) const;
|
||||
uint8 GetGemCountWithLimitCategory(uint32 limitCategory) const;
|
||||
uint8 CanBeMergedPartlyWith(ItemTemplate const* proto) const;
|
||||
InventoryResult CanBeMergedPartlyWith(ItemTemplate const* proto) const;
|
||||
|
||||
uint8 GetSlot() const {return m_slot;}
|
||||
Bag *GetContainer() { return m_container; }
|
||||
|
||||
Reference in New Issue
Block a user