TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Item.h File Reference
#include "Common.h"
#include "Object.h"
#include "LootMgr.h"
#include "ItemTemplate.h"
#include "DatabaseEnv.h"
+ Include dependency graph for Item.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ItemSetEffect
 
struct  BonusData
 
class  Item
 

Namespaces

 WorldPackets
 
 WorldPackets::Item
 

Macros

#define MAX_VISIBLE_ITEM_OFFSET   2
 
#define MAX_GEM_SOCKETS   MAX_ITEM_PROTO_SOCKETS
 
#define MAX_ENCHANTMENT_OFFSET   3
 
#define MAX_ITEM_SPELLS   5
 

Enumerations

enum  InventoryResult {
  EQUIP_ERR_OK = 0, EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1, EQUIP_ERR_CANT_EQUIP_SKILL = 2, EQUIP_ERR_WRONG_SLOT = 3,
  EQUIP_ERR_BAG_FULL = 4, EQUIP_ERR_BAG_IN_BAG = 5, EQUIP_ERR_TRADE_EQUIPPED_BAG = 6, EQUIP_ERR_AMMO_ONLY = 7,
  EQUIP_ERR_PROFICIENCY_NEEDED = 8, EQUIP_ERR_NO_SLOT_AVAILABLE = 9, EQUIP_ERR_CANT_EQUIP_EVER = 10, EQUIP_ERR_CANT_EQUIP_EVER_2 = 11,
  EQUIP_ERR_NO_SLOT_AVAILABLE_2 = 12, EQUIP_ERR_2HANDED_EQUIPPED = 13, EQUIP_ERR_2HSKILLNOTFOUND = 14, EQUIP_ERR_WRONG_BAG_TYPE = 15,
  EQUIP_ERR_WRONG_BAG_TYPE_2 = 16, EQUIP_ERR_ITEM_MAX_COUNT = 17, EQUIP_ERR_NO_SLOT_AVAILABLE_3 = 18, EQUIP_ERR_CANT_STACK = 19,
  EQUIP_ERR_NOT_EQUIPPABLE = 20, EQUIP_ERR_CANT_SWAP = 21, EQUIP_ERR_SLOT_EMPTY = 22, EQUIP_ERR_ITEM_NOT_FOUND = 23,
  EQUIP_ERR_DROP_BOUND_ITEM = 24, EQUIP_ERR_OUT_OF_RANGE = 25, EQUIP_ERR_TOO_FEW_TO_SPLIT = 26, EQUIP_ERR_SPLIT_FAILED = 27,
  EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC = 28, EQUIP_ERR_NOT_ENOUGH_MONEY = 29, EQUIP_ERR_NOT_A_BAG = 30, EQUIP_ERR_DESTROY_NONEMPTY_BAG = 31,
  EQUIP_ERR_NOT_OWNER = 32, EQUIP_ERR_ONLY_ONE_QUIVER = 33, EQUIP_ERR_NO_BANK_SLOT = 34, EQUIP_ERR_NO_BANK_HERE = 35,
  EQUIP_ERR_ITEM_LOCKED = 36, EQUIP_ERR_GENERIC_STUNNED = 37, EQUIP_ERR_PLAYER_DEAD = 38, EQUIP_ERR_CLIENT_LOCKED_OUT = 39,
  EQUIP_ERR_INTERNAL_BAG_ERROR = 40, EQUIP_ERR_ONLY_ONE_BOLT = 41, EQUIP_ERR_ONLY_ONE_AMMO = 42, EQUIP_ERR_CANT_WRAP_STACKABLE = 43,
  EQUIP_ERR_CANT_WRAP_EQUIPPED = 44, EQUIP_ERR_CANT_WRAP_WRAPPED = 45, EQUIP_ERR_CANT_WRAP_BOUND = 46, EQUIP_ERR_CANT_WRAP_UNIQUE = 47,
  EQUIP_ERR_CANT_WRAP_BAGS = 48, EQUIP_ERR_LOOT_GONE = 49, EQUIP_ERR_INV_FULL = 50, EQUIP_ERR_BANK_FULL = 51,
  EQUIP_ERR_VENDOR_SOLD_OUT = 52, EQUIP_ERR_BAG_FULL_2 = 53, EQUIP_ERR_ITEM_NOT_FOUND_2 = 54, EQUIP_ERR_CANT_STACK_2 = 55,
  EQUIP_ERR_BAG_FULL_3 = 56, EQUIP_ERR_VENDOR_SOLD_OUT_2 = 57, EQUIP_ERR_OBJECT_IS_BUSY = 58, EQUIP_ERR_CANT_BE_DISENCHANTED = 59,
  EQUIP_ERR_NOT_IN_COMBAT = 60, EQUIP_ERR_NOT_WHILE_DISARMED = 61, EQUIP_ERR_BAG_FULL_4 = 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_EQUIPPABLE = 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_INTERNAL_BAG_ERROR_2 = 73, EQUIP_ERR_BAG_FULL_5 = 74, 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_TRADE_BOUND_ITEM = 79,
  EQUIP_ERR_CANT_EQUIP_RATING = 80, EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM = 81, EQUIP_ERR_NOT_SAME_ACCOUNT = 82, EQUIP_ERR_NO_OUTPUT = 83,
  EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS = 84, EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS = 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_IS = 89, EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP = 90, EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL = 91,
  EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_TOO_LOW = 92, EQUIP_ERR_CANT_BUY_QUANTITY = 93, EQUIP_ERR_ITEM_IS_BATTLE_PAY_LOCKED = 94, EQUIP_ERR_REAGENT_BANK_FULL = 95,
  EQUIP_ERR_REAGENT_BANK_LOCKED = 96, EQUIP_ERR_WRONG_BAG_TYPE_3 = 97
}
 
enum  BuyResult {
  BUY_ERR_CANT_FIND_ITEM = 0, BUY_ERR_ITEM_ALREADY_SOLD = 1, BUY_ERR_NOT_ENOUGHT_MONEY = 2, BUY_ERR_SELLER_DONT_LIKE_YOU = 4,
  BUY_ERR_DISTANCE_TOO_FAR = 5, BUY_ERR_ITEM_SOLD_OUT = 7, BUY_ERR_CANT_CARRY_MORE = 8, BUY_ERR_RANK_REQUIRE = 11,
  BUY_ERR_REPUTATION_REQUIRE = 12
}
 
enum  SellResult {
  SELL_ERR_CANT_FIND_ITEM = 1, SELL_ERR_CANT_SELL_ITEM = 2, SELL_ERR_CANT_FIND_VENDOR = 3, SELL_ERR_YOU_DONT_OWN_THAT_ITEM = 4,
  SELL_ERR_UNK = 5, SELL_ERR_ONLY_EMPTY_BAG = 6
}
 
enum  EnchantmentSlot : uint16 {
  PERM_ENCHANTMENT_SLOT = 0, TEMP_ENCHANTMENT_SLOT = 1, SOCK_ENCHANTMENT_SLOT = 2, SOCK_ENCHANTMENT_SLOT_2 = 3,
  SOCK_ENCHANTMENT_SLOT_3 = 4, BONUS_ENCHANTMENT_SLOT = 5, PRISMATIC_ENCHANTMENT_SLOT = 6, USE_ENCHANTMENT_SLOT = 7,
  MAX_INSPECTED_ENCHANTMENT_SLOT = 8, PROP_ENCHANTMENT_SLOT_0 = 8, PROP_ENCHANTMENT_SLOT_1 = 9, PROP_ENCHANTMENT_SLOT_2 = 10,
  PROP_ENCHANTMENT_SLOT_3 = 11, PROP_ENCHANTMENT_SLOT_4 = 12, MAX_ENCHANTMENT_SLOT = 13
}
 
enum  EnchantmentOffset { ENCHANTMENT_ID_OFFSET = 0, ENCHANTMENT_DURATION_OFFSET = 1, ENCHANTMENT_CHARGES_OFFSET = 2 }
 
enum  EnchantmentSlotMask { ENCHANTMENT_CAN_SOULBOUND = 0x01, ENCHANTMENT_UNK1 = 0x02, ENCHANTMENT_UNK2 = 0x04, ENCHANTMENT_UNK3 = 0x08 }
 
enum  ItemUpdateState { ITEM_UNCHANGED = 0, ITEM_CHANGED = 1, ITEM_NEW = 2, ITEM_REMOVED = 3 }
 
enum  ItemModifier {
  ITEM_MODIFIER_TRANSMOG_APPEARANCE_MOD = 0, ITEM_MODIFIER_TRANSMOG_ITEM_ID = 1, ITEM_MODIFIER_UPGRADE_ID = 2, ITEM_MODIFIER_BATTLE_PET_SPECIES_ID = 3,
  ITEM_MODIFIER_BATTLE_PET_BREED_DATA = 4, ITEM_MODIFIER_BATTLE_PET_LEVEL = 5, ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID = 6, ITEM_MODIFIER_ENCHANT_ILLUSION = 7,
  MAX_ITEM_MODIFIERS
}
 

Functions

bool ItemCanGoIntoBag (ItemTemplate const *proto, ItemTemplate const *pBagProto)
 

Macro Definition Documentation

#define MAX_ENCHANTMENT_OFFSET   3
#define MAX_GEM_SOCKETS   MAX_ITEM_PROTO_SOCKETS
#define MAX_ITEM_SPELLS   5
#define MAX_VISIBLE_ITEM_OFFSET   2

Enumeration Type Documentation

enum BuyResult
Enumerator
BUY_ERR_CANT_FIND_ITEM 
BUY_ERR_ITEM_ALREADY_SOLD 
BUY_ERR_NOT_ENOUGHT_MONEY 
BUY_ERR_SELLER_DONT_LIKE_YOU 
BUY_ERR_DISTANCE_TOO_FAR 
BUY_ERR_ITEM_SOLD_OUT 
BUY_ERR_CANT_CARRY_MORE 
BUY_ERR_RANK_REQUIRE 
BUY_ERR_REPUTATION_REQUIRE 
149 {
159 };
Definition: Item.h:151
Definition: Item.h:153
Definition: Item.h:157
Definition: Item.h:150
Definition: Item.h:158
Definition: Item.h:154
Definition: Item.h:152
Definition: Item.h:155
Definition: Item.h:156
Enumerator
ENCHANTMENT_ID_OFFSET 
ENCHANTMENT_DURATION_OFFSET 
ENCHANTMENT_CHARGES_OFFSET 
198 {
201  ENCHANTMENT_CHARGES_OFFSET = 2 // now here not only charges, but something new in wotlk
202 };
Definition: Item.h:199
Definition: Item.h:200
Definition: Item.h:201
Enumerator
PERM_ENCHANTMENT_SLOT 
TEMP_ENCHANTMENT_SLOT 
SOCK_ENCHANTMENT_SLOT 
SOCK_ENCHANTMENT_SLOT_2 
SOCK_ENCHANTMENT_SLOT_3 
BONUS_ENCHANTMENT_SLOT 
PRISMATIC_ENCHANTMENT_SLOT 
USE_ENCHANTMENT_SLOT 
MAX_INSPECTED_ENCHANTMENT_SLOT 
PROP_ENCHANTMENT_SLOT_0 
PROP_ENCHANTMENT_SLOT_1 
PROP_ENCHANTMENT_SLOT_2 
PROP_ENCHANTMENT_SLOT_3 
PROP_ENCHANTMENT_SLOT_4 
MAX_ENCHANTMENT_SLOT 
172  : uint16
173 {
180  PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment
182 
184 
185  PROP_ENCHANTMENT_SLOT_0 = 8, // used with RandomSuffix
186  PROP_ENCHANTMENT_SLOT_1 = 9, // used with RandomSuffix
187  PROP_ENCHANTMENT_SLOT_2 = 10, // used with RandomSuffix and RandomProperty
188  PROP_ENCHANTMENT_SLOT_3 = 11, // used with RandomProperty
189  PROP_ENCHANTMENT_SLOT_4 = 12, // used with RandomProperty
191 };
Definition: Item.h:185
Definition: Item.h:174
Definition: Item.h:188
Definition: Item.h:187
Definition: Item.h:190
Definition: Item.h:181
Definition: Item.h:175
Definition: Item.h:189
Definition: Item.h:176
uint16_t uint16
Definition: Define.h:151
Definition: Item.h:186
Definition: Item.h:178
Definition: Item.h:177
Definition: Item.h:180
Definition: Item.h:179
Definition: Item.h:183
Enumerator
ENCHANTMENT_CAN_SOULBOUND 
ENCHANTMENT_UNK1 
ENCHANTMENT_UNK2 
ENCHANTMENT_UNK3 
207 {
209  ENCHANTMENT_UNK1 = 0x02,
210  ENCHANTMENT_UNK2 = 0x04,
211  ENCHANTMENT_UNK3 = 0x08
212 };
Definition: Item.h:210
Definition: Item.h:208
Definition: Item.h:211
Definition: Item.h:209
Enumerator
EQUIP_ERR_OK 
EQUIP_ERR_CANT_EQUIP_LEVEL_I 
EQUIP_ERR_CANT_EQUIP_SKILL 
EQUIP_ERR_WRONG_SLOT 
EQUIP_ERR_BAG_FULL 
EQUIP_ERR_BAG_IN_BAG 
EQUIP_ERR_TRADE_EQUIPPED_BAG 
EQUIP_ERR_AMMO_ONLY 
EQUIP_ERR_PROFICIENCY_NEEDED 
EQUIP_ERR_NO_SLOT_AVAILABLE 
EQUIP_ERR_CANT_EQUIP_EVER 
EQUIP_ERR_CANT_EQUIP_EVER_2 
EQUIP_ERR_NO_SLOT_AVAILABLE_2 
EQUIP_ERR_2HANDED_EQUIPPED 
EQUIP_ERR_2HSKILLNOTFOUND 
EQUIP_ERR_WRONG_BAG_TYPE 
EQUIP_ERR_WRONG_BAG_TYPE_2 
EQUIP_ERR_ITEM_MAX_COUNT 
EQUIP_ERR_NO_SLOT_AVAILABLE_3 
EQUIP_ERR_CANT_STACK 
EQUIP_ERR_NOT_EQUIPPABLE 
EQUIP_ERR_CANT_SWAP 
EQUIP_ERR_SLOT_EMPTY 
EQUIP_ERR_ITEM_NOT_FOUND 
EQUIP_ERR_DROP_BOUND_ITEM 
EQUIP_ERR_OUT_OF_RANGE 
EQUIP_ERR_TOO_FEW_TO_SPLIT 
EQUIP_ERR_SPLIT_FAILED 
EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC 
EQUIP_ERR_NOT_ENOUGH_MONEY 
EQUIP_ERR_NOT_A_BAG 
EQUIP_ERR_DESTROY_NONEMPTY_BAG 
EQUIP_ERR_NOT_OWNER 
EQUIP_ERR_ONLY_ONE_QUIVER 
EQUIP_ERR_NO_BANK_SLOT 
EQUIP_ERR_NO_BANK_HERE 
EQUIP_ERR_ITEM_LOCKED 
EQUIP_ERR_GENERIC_STUNNED 
EQUIP_ERR_PLAYER_DEAD 
EQUIP_ERR_CLIENT_LOCKED_OUT 
EQUIP_ERR_INTERNAL_BAG_ERROR 
EQUIP_ERR_ONLY_ONE_BOLT 
EQUIP_ERR_ONLY_ONE_AMMO 
EQUIP_ERR_CANT_WRAP_STACKABLE 
EQUIP_ERR_CANT_WRAP_EQUIPPED 
EQUIP_ERR_CANT_WRAP_WRAPPED 
EQUIP_ERR_CANT_WRAP_BOUND 
EQUIP_ERR_CANT_WRAP_UNIQUE 
EQUIP_ERR_CANT_WRAP_BAGS 
EQUIP_ERR_LOOT_GONE 
EQUIP_ERR_INV_FULL 
EQUIP_ERR_BANK_FULL 
EQUIP_ERR_VENDOR_SOLD_OUT 
EQUIP_ERR_BAG_FULL_2 
EQUIP_ERR_ITEM_NOT_FOUND_2 
EQUIP_ERR_CANT_STACK_2 
EQUIP_ERR_BAG_FULL_3 
EQUIP_ERR_VENDOR_SOLD_OUT_2 
EQUIP_ERR_OBJECT_IS_BUSY 
EQUIP_ERR_CANT_BE_DISENCHANTED 
EQUIP_ERR_NOT_IN_COMBAT 
EQUIP_ERR_NOT_WHILE_DISARMED 
EQUIP_ERR_BAG_FULL_4 
EQUIP_ERR_CANT_EQUIP_RANK 
EQUIP_ERR_CANT_EQUIP_REPUTATION 
EQUIP_ERR_TOO_MANY_SPECIAL_BAGS 
EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW 
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE 
EQUIP_ERR_VENDOR_MISSING_TURNINS 
EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS 
EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS 
EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED 
EQUIP_ERR_MAIL_BOUND_ITEM 
EQUIP_ERR_INTERNAL_BAG_ERROR_2 
EQUIP_ERR_BAG_FULL_5 
EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED 
EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED 
EQUIP_ERR_TOO_MUCH_GOLD 
EQUIP_ERR_NOT_DURING_ARENA_MATCH 
EQUIP_ERR_TRADE_BOUND_ITEM 
EQUIP_ERR_CANT_EQUIP_RATING 
EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM 
EQUIP_ERR_NOT_SAME_ACCOUNT 
EQUIP_ERR_NO_OUTPUT 
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS 
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS 
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED 
EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW 
EQUIP_ERR_CANT_EQUIP_NEED_TALENT 
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS 
EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP 
EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL 
EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_TOO_LOW 
EQUIP_ERR_CANT_BUY_QUANTITY 
EQUIP_ERR_ITEM_IS_BATTLE_PAY_LOCKED 
EQUIP_ERR_REAGENT_BANK_FULL 
EQUIP_ERR_REAGENT_BANK_LOCKED 
EQUIP_ERR_WRONG_BAG_TYPE_3 
47 {
48  EQUIP_ERR_OK = 0,
49  EQUIP_ERR_CANT_EQUIP_LEVEL_I = 1, // You must reach level %d to use that item.
50  EQUIP_ERR_CANT_EQUIP_SKILL = 2, // You aren't skilled enough to use that item.
51  EQUIP_ERR_WRONG_SLOT = 3, // That item does not go in that slot.
52  EQUIP_ERR_BAG_FULL = 4, // That bag is full.
53  EQUIP_ERR_BAG_IN_BAG = 5, // Can't put non-empty bags in other bags.
54  EQUIP_ERR_TRADE_EQUIPPED_BAG = 6, // You can't trade equipped bags.
55  EQUIP_ERR_AMMO_ONLY = 7, // Only ammo can go there.
56  EQUIP_ERR_PROFICIENCY_NEEDED = 8, // You do not have the required proficiency for that item.
57  EQUIP_ERR_NO_SLOT_AVAILABLE = 9, // No equipment slot is available for that item.
58  EQUIP_ERR_CANT_EQUIP_EVER = 10, // You can never use that item.
59  EQUIP_ERR_CANT_EQUIP_EVER_2 = 11, // You can never use that item.
60  EQUIP_ERR_NO_SLOT_AVAILABLE_2 = 12, // No equipment slot is available for that item.
61  EQUIP_ERR_2HANDED_EQUIPPED = 13, // Cannot equip that with a two-handed weapon.
62  EQUIP_ERR_2HSKILLNOTFOUND = 14, // You cannot dual-wield
63  EQUIP_ERR_WRONG_BAG_TYPE = 15, // That item doesn't go in that container.
64  EQUIP_ERR_WRONG_BAG_TYPE_2 = 16, // That item doesn't go in that container.
65  EQUIP_ERR_ITEM_MAX_COUNT = 17, // You can't carry any more of those items.
66  EQUIP_ERR_NO_SLOT_AVAILABLE_3 = 18, // No equipment slot is available for that item.
67  EQUIP_ERR_CANT_STACK = 19, // This item cannot stack.
68  EQUIP_ERR_NOT_EQUIPPABLE = 20, // This item cannot be equipped.
69  EQUIP_ERR_CANT_SWAP = 21, // These items can't be swapped.
70  EQUIP_ERR_SLOT_EMPTY = 22, // That slot is empty.
71  EQUIP_ERR_ITEM_NOT_FOUND = 23, // The item was not found.
72  EQUIP_ERR_DROP_BOUND_ITEM = 24, // You can't drop a soulbound item.
73  EQUIP_ERR_OUT_OF_RANGE = 25, // Out of range.
74  EQUIP_ERR_TOO_FEW_TO_SPLIT = 26, // Tried to split more than number in stack.
75  EQUIP_ERR_SPLIT_FAILED = 27, // Couldn't split those items.
76  EQUIP_ERR_SPELL_FAILED_REAGENTS_GENERIC = 28, // Missing reagent
77  EQUIP_ERR_NOT_ENOUGH_MONEY = 29, // You don't have enough money.
78  EQUIP_ERR_NOT_A_BAG = 30, // Not a bag.
79  EQUIP_ERR_DESTROY_NONEMPTY_BAG = 31, // You can only do that with empty bags.
80  EQUIP_ERR_NOT_OWNER = 32, // You don't own that item.
81  EQUIP_ERR_ONLY_ONE_QUIVER = 33, // You can only equip one quiver.
82  EQUIP_ERR_NO_BANK_SLOT = 34, // You must purchase that bag slot first
83  EQUIP_ERR_NO_BANK_HERE = 35, // You are too far away from a bank.
84  EQUIP_ERR_ITEM_LOCKED = 36, // Item is locked.
85  EQUIP_ERR_GENERIC_STUNNED = 37, // You are stunned
86  EQUIP_ERR_PLAYER_DEAD = 38, // You can't do that when you're dead.
87  EQUIP_ERR_CLIENT_LOCKED_OUT = 39, // You can't do that right now.
88  EQUIP_ERR_INTERNAL_BAG_ERROR = 40, // Internal Bag Error
89  EQUIP_ERR_ONLY_ONE_BOLT = 41, // You can only equip one quiver.
90  EQUIP_ERR_ONLY_ONE_AMMO = 42, // You can only equip one ammo pouch.
91  EQUIP_ERR_CANT_WRAP_STACKABLE = 43, // Stackable items can't be wrapped.
92  EQUIP_ERR_CANT_WRAP_EQUIPPED = 44, // Equipped items can't be wrapped.
93  EQUIP_ERR_CANT_WRAP_WRAPPED = 45, // Wrapped items can't be wrapped.
94  EQUIP_ERR_CANT_WRAP_BOUND = 46, // Bound items can't be wrapped.
95  EQUIP_ERR_CANT_WRAP_UNIQUE = 47, // Unique items can't be wrapped.
96  EQUIP_ERR_CANT_WRAP_BAGS = 48, // Bags can't be wrapped.
97  EQUIP_ERR_LOOT_GONE = 49, // Already looted
98  EQUIP_ERR_INV_FULL = 50, // Inventory is full.
99  EQUIP_ERR_BANK_FULL = 51, // Your bank is full
100  EQUIP_ERR_VENDOR_SOLD_OUT = 52, // That item is currently sold out.
101  EQUIP_ERR_BAG_FULL_2 = 53, // That bag is full.
102  EQUIP_ERR_ITEM_NOT_FOUND_2 = 54, // The item was not found.
103  EQUIP_ERR_CANT_STACK_2 = 55, // This item cannot stack.
104  EQUIP_ERR_BAG_FULL_3 = 56, // That bag is full.
105  EQUIP_ERR_VENDOR_SOLD_OUT_2 = 57, // That item is currently sold out.
106  EQUIP_ERR_OBJECT_IS_BUSY = 58, // That object is busy.
108  EQUIP_ERR_NOT_IN_COMBAT = 60, // You can't do that while in combat
109  EQUIP_ERR_NOT_WHILE_DISARMED = 61, // You can't do that while disarmed
110  EQUIP_ERR_BAG_FULL_4 = 62, // That bag is full.
111  EQUIP_ERR_CANT_EQUIP_RANK = 63, // You don't have the required rank for that item
112  EQUIP_ERR_CANT_EQUIP_REPUTATION = 64, // You don't have the required reputation for that item
113  EQUIP_ERR_TOO_MANY_SPECIAL_BAGS = 65, // You cannot equip another bag of that type
114  EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW = 66, // You can't loot that item now.
115  EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE = 67, // You cannot equip more than one of those.
116  EQUIP_ERR_VENDOR_MISSING_TURNINS = 68, // You do not have the required items for that purchase
117  EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS = 69, // You don't have enough honor points
118  EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS = 70, // You don't have enough arena points
119  EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED = 71, // You have the maximum number of those gems in your inventory or socketed into items.
120  EQUIP_ERR_MAIL_BOUND_ITEM = 72, // You can't mail soulbound items.
121  EQUIP_ERR_INTERNAL_BAG_ERROR_2 = 73, // Internal Bag Error
122  EQUIP_ERR_BAG_FULL_5 = 74, // That bag is full.
123  EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED = 75, // You have the maximum number of those gems socketed into equipped items.
124  EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED = 76, // You cannot socket more than one of those gems into a single item.
125  EQUIP_ERR_TOO_MUCH_GOLD = 77, // At gold limit
126  EQUIP_ERR_NOT_DURING_ARENA_MATCH = 78, // You can't do that while in an arena match
127  EQUIP_ERR_TRADE_BOUND_ITEM = 79, // You can't trade a soulbound item.
128  EQUIP_ERR_CANT_EQUIP_RATING = 80, // You don't have the personal, team, or battleground rating required to buy that item
130  EQUIP_ERR_NOT_SAME_ACCOUNT = 82, // Account-bound items can only be given to your own characters.
131  EQUIP_ERR_NO_OUTPUT = 83,
132  EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED_IS = 84, // You can only carry %d %s
133  EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED_IS = 85, // You can only equip %d |4item:items in the %s category
134  EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED = 86, // Your level is too high to use that item
135  EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW = 87, // You must reach level %d to purchase that item.
136  EQUIP_ERR_CANT_EQUIP_NEED_TALENT = 88, // You do not have the required talent to equip that.
137  EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED_IS = 89, // You can only equip %d |4item:items in the %s category
138  EQUIP_ERR_SHAPESHIFT_FORM_CANNOT_EQUIP = 90, // Cannot equip item in this form
139  EQUIP_ERR_ITEM_INVENTORY_FULL_SATCHEL = 91, // Your inventory is full. Your satchel has been delivered to your mailbox.
140  EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_TOO_LOW = 92, // Your level is too low to use that item
141  EQUIP_ERR_CANT_BUY_QUANTITY = 93, // You can't buy the specified quantity of that item.
142  EQUIP_ERR_ITEM_IS_BATTLE_PAY_LOCKED = 94, // Your purchased item is still waiting to be unlocked
143  EQUIP_ERR_REAGENT_BANK_FULL = 95, // Your reagent bank is full
146 };
Definition: Item.h:49
Definition: Item.h:96
Definition: Item.h:80
Definition: Item.h:98
Definition: Item.h:89
Definition: Item.h:56
Definition: Item.h:69
Definition: Item.h:82
Definition: Item.h:53
Definition: Item.h:58
Definition: Item.h:109
Definition: Item.h:107
Definition: Item.h:130
Definition: Item.h:128
Definition: Item.h:117
Definition: Item.h:93
Definition: Item.h:86
Definition: Item.h:62
Definition: Item.h:90
Definition: Item.h:106
Definition: Item.h:97
Definition: Item.h:63
Definition: Item.h:112
Definition: Item.h:135
Definition: Item.h:120
Definition: Item.h:85
Definition: Item.h:92
Definition: Item.h:108
Definition: Item.h:78
Definition: Item.h:127
Definition: Item.h:61
Definition: Item.h:100
Definition: Item.h:91
Definition: Item.h:48
Definition: Item.h:71
Definition: Item.h:141
Definition: Item.h:79
Definition: Item.h:143
Definition: Item.h:144
Definition: Item.h:73
Definition: Item.h:118
Definition: Item.h:77
Definition: Item.h:125
Definition: Item.h:136
Definition: Item.h:55
Definition: Item.h:88
Definition: Item.h:59
Definition: Item.h:54
Definition: Item.h:114
Definition: Item.h:122
Definition: Item.h:74
Definition: Item.h:50
Definition: Item.h:83
Definition: Item.h:66
Definition: Item.h:65
Definition: Item.h:110
Definition: Item.h:81
Definition: Item.h:57
Definition: Item.h:119
Definition: Item.h:60
Definition: Item.h:51
Definition: Item.h:75
Definition: Item.h:70
Definition: Item.h:102
Definition: Item.h:72
Definition: Item.h:64
Definition: Item.h:116
Definition: Item.h:95
Definition: Item.h:113
Definition: Item.h:87
Definition: Item.h:145
Definition: Item.h:84
Definition: Item.h:121
Definition: Item.h:131
Definition: Item.h:126
Definition: Item.h:111
Definition: Item.h:103
Definition: Item.h:99
Definition: Item.h:115
Definition: Item.h:104
Definition: Item.h:105
Definition: Item.h:52
Definition: Item.h:68
Definition: Item.h:101
Definition: Item.h:94
Definition: Item.h:67
Enumerator
ITEM_MODIFIER_TRANSMOG_APPEARANCE_MOD 
ITEM_MODIFIER_TRANSMOG_ITEM_ID 
ITEM_MODIFIER_UPGRADE_ID 
ITEM_MODIFIER_BATTLE_PET_SPECIES_ID 
ITEM_MODIFIER_BATTLE_PET_BREED_DATA 
ITEM_MODIFIER_BATTLE_PET_LEVEL 
ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID 
ITEM_MODIFIER_ENCHANT_ILLUSION 
MAX_ITEM_MODIFIERS 
223 {
228  ITEM_MODIFIER_BATTLE_PET_BREED_DATA = 4, // (breedId) | (breedQuality << 24)
232 
234 };
Definition: Item.h:225
Definition: Item.h:226
Definition: Item.h:229
Definition: Item.h:231
Definition: Item.h:233
Enumerator
ITEM_UNCHANGED 
ITEM_CHANGED 
ITEM_NEW 
ITEM_REMOVED 
215 {
216  ITEM_UNCHANGED = 0,
217  ITEM_CHANGED = 1,
218  ITEM_NEW = 2,
219  ITEM_REMOVED = 3
220 };
Definition: Item.h:216
Definition: Item.h:217
Definition: Item.h:219
Definition: Item.h:218
enum SellResult
Enumerator
SELL_ERR_CANT_FIND_ITEM 
SELL_ERR_CANT_SELL_ITEM 
SELL_ERR_CANT_FIND_VENDOR 
SELL_ERR_YOU_DONT_OWN_THAT_ITEM 
SELL_ERR_UNK 
SELL_ERR_ONLY_EMPTY_BAG 
162 {
164  SELL_ERR_CANT_SELL_ITEM = 2, // merchant doesn't like that item
165  SELL_ERR_CANT_FIND_VENDOR = 3, // merchant doesn't like you
166  SELL_ERR_YOU_DONT_OWN_THAT_ITEM = 4, // you don't own that item
167  SELL_ERR_UNK = 5, // nothing appears...
168  SELL_ERR_ONLY_EMPTY_BAG = 6 // can only do with empty bags
169 };
Definition: Item.h:167
Definition: Item.h:165
Definition: Item.h:166
Definition: Item.h:168
Definition: Item.h:164
Definition: Item.h:163

Function Documentation

bool ItemCanGoIntoBag ( ItemTemplate const proto,
ItemTemplate const pBagProto 
)
158 {
159  if (!pProto || !pBagProto)
160  return false;
161 
162  switch (pBagProto->GetClass())
163  {
165  switch (pBagProto->GetSubClass())
166  {
168  return true;
170  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_SOUL_SHARDS))
171  return false;
172  return true;
174  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_HERBS))
175  return false;
176  return true;
178  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_ENCHANTING_SUPP))
179  return false;
180  return true;
182  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_MINING_SUPP))
183  return false;
184  return true;
186  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_ENGINEERING_SUPP))
187  return false;
188  return true;
190  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_GEMS))
191  return false;
192  return true;
194  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_LEATHERWORKING_SUPP))
195  return false;
196  return true;
198  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_INSCRIPTION_SUPP))
199  return false;
200  return true;
202  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_FISHING_SUPP))
203  return false;
204  return true;
206  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_COOKING_SUPP))
207  return false;
208  return true;
209  default:
210  return false;
211  }
212  case ITEM_CLASS_QUIVER:
213  switch (pBagProto->GetSubClass())
214  {
216  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_ARROWS))
217  return false;
218  return true;
220  if (!(pProto->GetBagFamily() & BAG_FAMILY_MASK_BULLETS))
221  return false;
222  return true;
223  default:
224  return false;
225  }
226  }
227  return false;
228 }
Definition: ItemTemplate.h:411
Definition: ItemTemplate.h:410
Definition: ItemTemplate.h:315
Definition: ItemTemplate.h:405
Definition: ItemTemplate.h:309
Definition: ItemTemplate.h:303
Definition: ItemTemplate.h:563
Definition: ItemTemplate.h:304
Definition: ItemTemplate.h:299
Definition: ItemTemplate.h:414
Definition: ItemTemplate.h:409
Definition: ItemTemplate.h:308
Definition: ItemTemplate.h:406
Definition: ItemTemplate.h:412
Definition: ItemTemplate.h:300
Definition: ItemTemplate.h:368
Definition: ItemTemplate.h:408
Definition: ItemTemplate.h:301
Definition: ItemTemplate.h:306
Definition: ItemTemplate.h:378
Definition: ItemTemplate.h:302
Definition: ItemTemplate.h:413
Definition: ItemTemplate.h:415
Definition: ItemTemplate.h:305
Definition: ItemTemplate.h:314
Definition: ItemTemplate.h:562
Definition: ItemTemplate.h:407

+ Here is the call graph for this function: