Skip to content

Commit

Permalink
Core/Items: Updated InventoryResult enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren committed Aug 20, 2012
1 parent 6cea446 commit 9c3c3cd
Show file tree
Hide file tree
Showing 13 changed files with 242 additions and 240 deletions.
6 changes: 3 additions & 3 deletions src/server/game/Entities/Item/Item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,15 +838,15 @@ InventoryResult Item::CanBeMergedPartlyWith(ItemTemplate const* proto) const
{
// not allow merge looting currently items
if (m_lootGenerated)
return EQUIP_ERR_ALREADY_LOOTED;
return EQUIP_ERR_LOOT_GONE;

// check item type
if (GetEntry() != proto->ItemId)
return EQUIP_ERR_ITEM_CANT_STACK;
return EQUIP_ERR_CANT_STACK;

// check free space (full stacks can't be target of merge
if (GetCount() >= proto->GetMaxStackSize())
return EQUIP_ERR_ITEM_CANT_STACK;
return EQUIP_ERR_CANT_STACK;

return EQUIP_ERR_OK;
}
Expand Down
182 changes: 93 additions & 89 deletions src/server/game/Entities/Item/Item.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,95 +38,99 @@ struct ItemSetEffect

enum InventoryResult
{
EQUIP_ERR_OK = 0,
EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1,
EQUIP_ERR_CANT_EQUIP_SKILL = 2,
EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT = 3,
EQUIP_ERR_BAG_FULL = 4,
EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG = 5,
EQUIP_ERR_CANT_TRADE_EQUIP_BAGS = 6,
EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE = 7,
EQUIP_ERR_NO_REQUIRED_PROFICIENCY = 8,
EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE = 9,
EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM = 10,
EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2 = 11,
EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2 = 12,
EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED = 13,
EQUIP_ERR_CANT_DUAL_WIELD = 14,
EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG = 15,
EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2 = 16,
EQUIP_ERR_CANT_CARRY_MORE_OF_THIS = 17,
EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3 = 18,
EQUIP_ERR_ITEM_CANT_STACK = 19,
EQUIP_ERR_ITEM_CANT_BE_EQUIPPED = 20,
EQUIP_ERR_ITEMS_CANT_BE_SWAPPED = 21,
EQUIP_ERR_SLOT_IS_EMPTY = 22,
EQUIP_ERR_ITEM_NOT_FOUND = 23,
EQUIP_ERR_CANT_DROP_SOULBOUND = 24,
EQUIP_ERR_OUT_OF_RANGE = 25,
EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT = 26,
EQUIP_ERR_COULDNT_SPLIT_ITEMS = 27,
EQUIP_ERR_MISSING_REAGENT = 28,
EQUIP_ERR_NOT_ENOUGH_MONEY = 29,
EQUIP_ERR_NOT_A_BAG = 30,
EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS = 31,
EQUIP_ERR_DONT_OWN_THAT_ITEM = 32,
EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER = 33,
EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT = 34,
EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK = 35,
EQUIP_ERR_ITEM_LOCKED = 36,
EQUIP_ERR_YOU_ARE_STUNNED = 37,
EQUIP_ERR_YOU_ARE_DEAD = 38,
EQUIP_ERR_CANT_DO_RIGHT_NOW = 39,
EQUIP_ERR_INT_BAG_ERROR = 40,
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,
EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED = 45,
EQUIP_ERR_BOUND_CANT_BE_WRAPPED = 46,
EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED = 47,
EQUIP_ERR_BAGS_CANT_BE_WRAPPED = 48,
EQUIP_ERR_ALREADY_LOOTED = 49,
EQUIP_ERR_INVENTORY_FULL = 50,
EQUIP_ERR_BANK_FULL = 51,
EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT = 52,
EQUIP_ERR_BAG_FULL3 = 53,
EQUIP_ERR_ITEM_NOT_FOUND2 = 54,
EQUIP_ERR_ITEM_CANT_STACK2 = 55,
EQUIP_ERR_BAG_FULL4 = 56,
EQUIP_ERR_ITEM_SOLD_OUT = 57,
EQUIP_ERR_OBJECT_IS_BUSY = 58,
EQUIP_ERR_NONE = 59,
EQUIP_ERR_NOT_IN_COMBAT = 60,
EQUIP_ERR_NOT_WHILE_DISARMED = 61,
EQUIP_ERR_BAG_FULL6 = 62,
EQUIP_ERR_CANT_EQUIP_RANK = 63,
EQUIP_ERR_CANT_EQUIP_REPUTATION = 64,
EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 65,
EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 66,
EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE = 67,
EQUIP_ERR_VENDOR_MISSING_TURNINS = 68,
EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 69,
EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 70,
EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 71,
EQUIP_ERR_MAIL_BOUND_ITEM = 72,
EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING = 73,
EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 75,
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 76,
EQUIP_ERR_TOO_MUCH_GOLD = 77,
EQUIP_ERR_NOT_DURING_ARENA_MATCH = 78,
EQUIP_ERR_CANNOT_TRADE_THAT = 79,
EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW = 80,
EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM = 81,
EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS = 82,
// no output = 83,
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED = 84,
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED = 85,
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 86,
EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 87,
EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 88,
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED = 89
EQUIP_ERR_OK = 0,
EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1, // You must reach level %d to use that item.
EQUIP_ERR_CANT_EQUIP_SKILL = 2, // You aren't skilled enough to use that item.
EQUIP_ERR_WRONG_SLOT = 3, // That item does not go in that slot.
EQUIP_ERR_BAG_FULL = 4, // That bag is full.
EQUIP_ERR_BAG_IN_BAG = 5, // Can't put non-empty bags in other bags.
EQUIP_ERR_TRADE_EQUIPPED_BAG = 6, // You can't trade equipped bags.
EQUIP_ERR_AMMO_ONLY = 7, // Only ammo can go there.
EQUIP_ERR_PROFICIENCY_NEEDED = 8, // You do not have the required proficiency for that item.
EQUIP_ERR_NO_SLOT_AVAILABLE = 9, // No equipment slot is available for that item.
EQUIP_ERR_CANT_EQUIP_EVER = 10, // You can never use that item.
EQUIP_ERR_CANT_EQUIP_EVER_2 = 11, // You can never use that item.
EQUIP_ERR_NO_SLOT_AVAILABLE_2 = 12, // No equipment slot is available for that item.
EQUIP_ERR_2HANDED_EQUIPPED = 13, // Cannot equip that with a two-handed weapon.
EQUIP_ERR_2HSKILLNOTFOUND = 14, // You cannot dual-wield
EQUIP_ERR_WRONG_BAG_TYPE = 15, // That item doesn't go in that container.
EQUIP_ERR_WRONG_BAG_TYPE_2 = 16, // That item doesn't go in that container.
EQUIP_ERR_ITEM_MAX_COUNT = 17, // You can't carry any more of those items.
EQUIP_ERR_NO_SLOT_AVAILABLE_3 = 18, // No equipment slot is available for that item.
EQUIP_ERR_CANT_STACK = 19, // This item cannot stack.
EQUIP_ERR_NOT_EQUIPPABLE = 20, // This item cannot be equipped.
EQUIP_ERR_CANT_SWAP = 21, // These items can't be swapped.
EQUIP_ERR_SLOT_EMPTY = 22, // That slot is empty.
EQUIP_ERR_ITEM_NOT_FOUND = 23, // The item was not found.
EQUIP_ERR_DROP_BOUND_ITEM = 24, // You can't drop a soulbound item.
EQUIP_ERR_OUT_OF_RANGE = 25, // Out of range.
EQUIP_ERR_TOO_FEW_TO_SPLIT = 26, // Tried to split more than number in stack.
EQUIP_ERR_SPLIT_FAILED = 27, // Couldn't split those items.
EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC = 28, // Missing reagent
EQUIP_ERR_NOT_ENOUGH_MONEY = 29, // You don't have enough money.
EQUIP_ERR_NOT_A_BAG = 30, // Not a bag.
EQUIP_ERR_DESTROY_NONEMPTY_BAG = 31, // You can only do that with empty bags.
EQUIP_ERR_NOT_OWNER = 32, // You don't own that item.
EQUIP_ERR_ONLY_ONE_QUIVER = 33, // You can only equip one quiver.
EQUIP_ERR_NO_BANK_SLOT = 34, // You must purchase that bag slot first
EQUIP_ERR_NO_BANK_HERE = 35, // You are too far away from a bank.
EQUIP_ERR_ITEM_LOCKED = 36, // Item is locked.
EQUIP_ERR_GENERIC_STUNNED = 37, // You are stunned
EQUIP_ERR_PLAYER_DEAD = 38, // You can't do that when you're dead.
EQUIP_ERR_CLIENT_LOCKED_OUT = 39, // You can't do that right now.
EQUIP_ERR_INTERNAL_BAG_ERROR = 40, // Internal Bag Error
EQUIP_ERR_ONLY_ONE_BOLT = 41, // You can only equip one quiver.
EQUIP_ERR_ONLY_ONE_AMMO = 42, // You can only equip one ammo pouch.
EQUIP_ERR_CANT_WRAP_STACKABLE = 43, // Stackable items can't be wrapped.
EQUIP_ERR_CANT_WRAP_EQUIPPED = 44, // Equipped items can't be wrapped.
EQUIP_ERR_CANT_WRAP_WRAPPED = 45, // Wrapped items can't be wrapped.
EQUIP_ERR_CANT_WRAP_BOUND = 46, // Bound items can't be wrapped.
EQUIP_ERR_CANT_WRAP_UNIQUE = 47, // Unique items can't be wrapped.
EQUIP_ERR_CANT_WRAP_BAGS = 48, // Bags can't be wrapped.
EQUIP_ERR_LOOT_GONE = 49, // Already looted
EQUIP_ERR_INV_FULL = 50, // Inventory is full.
EQUIP_ERR_BANK_FULL = 51, // Your bank is full
EQUIP_ERR_VENDOR_SOLD_OUT = 52, // That item is currently sold out.
EQUIP_ERR_BAG_FULL_2 = 53, // That bag is full.
EQUIP_ERR_ITEM_NOT_FOUND_2 = 54, // The item was not found.
EQUIP_ERR_CANT_STACK_2 = 55, // This item cannot stack.
EQUIP_ERR_BAG_FULL_3 = 56, // That bag is full.
EQUIP_ERR_VENDOR_SOLD_OUT_2 = 57, // That item is currently sold out.
EQUIP_ERR_OBJECT_IS_BUSY = 58, // That object is busy.
EQUIP_ERR_CANT_BE_DISENCHANTED = 59,
EQUIP_ERR_NOT_IN_COMBAT = 60, // You can't do that while in combat
EQUIP_ERR_NOT_WHILE_DISARMED = 61, // You can't do that while disarmed
EQUIP_ERR_BAG_FULL_4 = 62, // That bag is full.
EQUIP_ERR_CANT_EQUIP_RANK = 63, // You don't have the required rank for that item
EQUIP_ERR_CANT_EQUIP_REPUTATION = 64, // You don't have the required reputation for that item
EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 65, // You cannot equip another bag of that type
EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 66, // You can't loot that item now.
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE = 67, // You cannot equip more than one of those.
EQUIP_ERR_VENDOR_MISSING_TURNINS = 68, // You do not have the required items for that purchase
EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 69, // You don't have enough honor points
EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 70, // You don't have enough arena points
EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 71, // You have the maximum number of those gems in your inventory or socketed into items.
EQUIP_ERR_MAIL_BOUND_ITEM = 72, // You can't mail soulbound items.
EQUIP_ERR_INTERNAL_BAG_ERROR_2 = 73, // Internal Bag Error
EQUIP_ERR_BAG_FULL_5 = 74, // That bag is full.
EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 75, // You have the maximum number of those gems socketed into equipped items.
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 76, // You cannot socket more than one of those gems into a single item.
EQUIP_ERR_TOO_MUCH_GOLD = 77, // At gold limit
EQUIP_ERR_NOT_DURING_ARENA_MATCH = 78, // You can't do that while in an arena match
EQUIP_ERR_TRADE_BOUND_ITEM = 79, // You can't trade a soulbound item.
EQUIP_ERR_CANT_EQUIP_RATING = 80, // You don't have the personal, team, or battleground rating required to buy that item
EQUIP_ERR_NO_OUTPUT = 81,
EQUIP_ERR_NOT_SAME_ACCOUNT = 82, // Account-bound items can only be given to your own characters.
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS = 84, // You can only carry %d %s
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS = 85, // You can only equip %d |4item:items in the %s category
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 86, // Your level is too high to use that item
EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 87, // You must reach level %d to purchase that item.
EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 88, // You do not have the required talent to equip that.
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS = 89, // You can only equip %d |4item:items in the %s category
EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP = 90, // Cannot equip item in this form
EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL = 91, // Your inventory is full. Your satchel has been delivered to your mailbox.
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_TOO_LOW = 92, // Your level is too low to use that item
EQUIP_ERR_CANT_BUY_QUANTITY = 93, // You can't buy the specified quantity of that item.
};

enum BuyResult
Expand Down
Loading

0 comments on commit 9c3c3cd

Please sign in to comment.