AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Item.h File Reference
#include "Common.h"
#include "DatabaseEnv.h"
#include "ItemTemplate.h"
#include "LootMgr.h"
#include "Object.h"

Go to the source code of this file.

Classes

struct  ItemSetEffect
 
class  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  InventorySlot {
  NULL_BAG = 0 ,
  NULL_SLOT = 255
}
 
enum  InventoryResult : uint8 {
  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 ,
  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
}
 
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 ,
  SELL_ERR_CANT_SELL_TO_THIS_MERCHANT = 7 ,
  SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE = 8 ,
  SELL_INTERNAL_BAG_ERROR = 9
}
 
enum  EnchantmentSlot : uint8 {
  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 ,
  MAX_INSPECTED_ENCHANTMENT_SLOT = 7 ,
  PROP_ENCHANTMENT_SLOT_0 = 7 ,
  PROP_ENCHANTMENT_SLOT_1 = 8 ,
  PROP_ENCHANTMENT_SLOT_2 = 9 ,
  PROP_ENCHANTMENT_SLOT_3 = 10 ,
  PROP_ENCHANTMENT_SLOT_4 = 11 ,
  MAX_ENCHANTMENT_SLOT = 12
}
 
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
}
 

Functions

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

Macro Definition Documentation

◆ MAX_ENCHANTMENT_OFFSET

#define MAX_ENCHANTMENT_OFFSET   3

◆ MAX_GEM_SOCKETS

#define MAX_GEM_SOCKETS   MAX_ITEM_PROTO_SOCKETS

◆ MAX_ITEM_SPELLS

#define MAX_ITEM_SPELLS   5

◆ MAX_VISIBLE_ITEM_OFFSET

#define MAX_VISIBLE_ITEM_OFFSET   2

Enumeration Type Documentation

◆ BuyResult

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 
140{
150};
@ BUY_ERR_RANK_REQUIRE
Definition: Item.h:148
@ BUY_ERR_SELLER_DONT_LIKE_YOU
Definition: Item.h:144
@ BUY_ERR_CANT_FIND_ITEM
Definition: Item.h:141
@ BUY_ERR_DISTANCE_TOO_FAR
Definition: Item.h:145
@ BUY_ERR_NOT_ENOUGHT_MONEY
Definition: Item.h:143
@ BUY_ERR_ITEM_SOLD_OUT
Definition: Item.h:146
@ BUY_ERR_REPUTATION_REQUIRE
Definition: Item.h:149
@ BUY_ERR_ITEM_ALREADY_SOLD
Definition: Item.h:142
@ BUY_ERR_CANT_CARRY_MORE
Definition: Item.h:147

◆ EnchantmentOffset

Enumerator
ENCHANTMENT_ID_OFFSET 
ENCHANTMENT_DURATION_OFFSET 
ENCHANTMENT_CHARGES_OFFSET 
191{
194 ENCHANTMENT_CHARGES_OFFSET = 2 // now here not only charges, but something new in wotlk
195};
@ ENCHANTMENT_ID_OFFSET
Definition: Item.h:192
@ ENCHANTMENT_CHARGES_OFFSET
Definition: Item.h:194
@ ENCHANTMENT_DURATION_OFFSET
Definition: Item.h:193

◆ EnchantmentSlot

Enumerator
PERM_ENCHANTMENT_SLOT 
TEMP_ENCHANTMENT_SLOT 
SOCK_ENCHANTMENT_SLOT 
SOCK_ENCHANTMENT_SLOT_2 
SOCK_ENCHANTMENT_SLOT_3 
BONUS_ENCHANTMENT_SLOT 
PRISMATIC_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 
168{
175 PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment
177
178 PROP_ENCHANTMENT_SLOT_0 = 7, // used with RandomSuffix and RandomProperty
179 PROP_ENCHANTMENT_SLOT_1 = 8, // used with RandomSuffix and RandomProperty
180 PROP_ENCHANTMENT_SLOT_2 = 9, // used with RandomSuffix and RandomProperty
181 PROP_ENCHANTMENT_SLOT_3 = 10, // used with RandomSuffix and RandomProperty
182 PROP_ENCHANTMENT_SLOT_4 = 11, // used with RandomSuffix and RandomProperty
184};
@ PERM_ENCHANTMENT_SLOT
Definition: Item.h:169
@ SOCK_ENCHANTMENT_SLOT_3
Definition: Item.h:173
@ PROP_ENCHANTMENT_SLOT_0
Definition: Item.h:178
@ MAX_ENCHANTMENT_SLOT
Definition: Item.h:183
@ PROP_ENCHANTMENT_SLOT_2
Definition: Item.h:180
@ TEMP_ENCHANTMENT_SLOT
Definition: Item.h:170
@ SOCK_ENCHANTMENT_SLOT_2
Definition: Item.h:172
@ PRISMATIC_ENCHANTMENT_SLOT
Definition: Item.h:175
@ PROP_ENCHANTMENT_SLOT_1
Definition: Item.h:179
@ SOCK_ENCHANTMENT_SLOT
Definition: Item.h:171
@ BONUS_ENCHANTMENT_SLOT
Definition: Item.h:174
@ MAX_INSPECTED_ENCHANTMENT_SLOT
Definition: Item.h:176
@ PROP_ENCHANTMENT_SLOT_4
Definition: Item.h:182
@ PROP_ENCHANTMENT_SLOT_3
Definition: Item.h:181

◆ EnchantmentSlotMask

Enumerator
ENCHANTMENT_CAN_SOULBOUND 
ENCHANTMENT_UNK1 
ENCHANTMENT_UNK2 
ENCHANTMENT_UNK3 
200{
202 ENCHANTMENT_UNK1 = 0x02,
203 ENCHANTMENT_UNK2 = 0x04,
204 ENCHANTMENT_UNK3 = 0x08
205};
@ ENCHANTMENT_UNK1
Definition: Item.h:202
@ ENCHANTMENT_UNK2
Definition: Item.h:203
@ ENCHANTMENT_CAN_SOULBOUND
Definition: Item.h:201
@ ENCHANTMENT_UNK3
Definition: Item.h:204

◆ InventoryResult

Enumerator
EQUIP_ERR_OK 
EQUIP_ERR_CANT_EQUIP_LEVEL_I 
EQUIP_ERR_CANT_EQUIP_SKILL 
EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT 
EQUIP_ERR_BAG_FULL 
EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG 
EQUIP_ERR_CANT_TRADE_EQUIP_BAGS 
EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE 
EQUIP_ERR_NO_REQUIRED_PROFICIENCY 
EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE 
EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM 
EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2 
EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2 
EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED 
EQUIP_ERR_CANT_DUAL_WIELD 
EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG 
EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2 
EQUIP_ERR_CANT_CARRY_MORE_OF_THIS 
EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3 
EQUIP_ERR_ITEM_CANT_STACK 
EQUIP_ERR_ITEM_CANT_BE_EQUIPPED 
EQUIP_ERR_ITEMS_CANT_BE_SWAPPED 
EQUIP_ERR_SLOT_IS_EMPTY 
EQUIP_ERR_ITEM_NOT_FOUND 
EQUIP_ERR_CANT_DROP_SOULBOUND 
EQUIP_ERR_OUT_OF_RANGE 
EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT 
EQUIP_ERR_COULDNT_SPLIT_ITEMS 
EQUIP_ERR_MISSING_REAGENT 
EQUIP_ERR_NOT_ENOUGH_MONEY 
EQUIP_ERR_NOT_A_BAG 
EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS 
EQUIP_ERR_DONT_OWN_THAT_ITEM 
EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER 
EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT 
EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK 
EQUIP_ERR_ITEM_LOCKED 
EQUIP_ERR_YOU_ARE_STUNNED 
EQUIP_ERR_YOU_ARE_DEAD 
EQUIP_ERR_CANT_DO_RIGHT_NOW 
EQUIP_ERR_INT_BAG_ERROR 
EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT 
EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH 
EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED 
EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED 
EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED 
EQUIP_ERR_BOUND_CANT_BE_WRAPPED 
EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED 
EQUIP_ERR_BAGS_CANT_BE_WRAPPED 
EQUIP_ERR_ALREADY_LOOTED 
EQUIP_ERR_INVENTORY_FULL 
EQUIP_ERR_BANK_FULL 
EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT 
EQUIP_ERR_BAG_FULL3 
EQUIP_ERR_ITEM_NOT_FOUND2 
EQUIP_ERR_ITEM_CANT_STACK2 
EQUIP_ERR_BAG_FULL4 
EQUIP_ERR_ITEM_SOLD_OUT 
EQUIP_ERR_OBJECT_IS_BUSY 
EQUIP_ERR_NONE 
EQUIP_ERR_NOT_IN_COMBAT 
EQUIP_ERR_NOT_WHILE_DISARMED 
EQUIP_ERR_BAG_FULL6 
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_EQUIPABLE 
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_NO_SPLIT_WHILE_PROSPECTING 
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_CANNOT_TRADE_THAT 
EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW 
EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM 
EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS 
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED 
EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED 
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 
46{
47 EQUIP_ERR_OK = 0,
106 EQUIP_ERR_NONE = 59,
129 // no output = 83,
136};
@ EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_COUNT_EXCEEDED
Definition: Item.h:130
@ EQUIP_ERR_BAG_FULL
Definition: Item.h:51
@ EQUIP_ERR_CANT_EQUIP_RANK
Definition: Item.h:110
@ EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED
Definition: Item.h:135
@ EQUIP_ERR_TOO_MUCH_GOLD
Definition: Item.h:123
@ EQUIP_ERR_CAN_EQUIP_ONLY1_AMMOPOUCH
Definition: Item.h:89
@ EQUIP_ERR_NO_SPLIT_WHILE_PROSPECTING
Definition: Item.h:120
@ EQUIP_ERR_MISSING_REAGENT
Definition: Item.h:75
@ EQUIP_ERR_NOT_A_BAG
Definition: Item.h:77
@ EQUIP_ERR_BAGS_CANT_BE_WRAPPED
Definition: Item.h:95
@ EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM2
Definition: Item.h:58
@ EQUIP_ERR_CANT_TRADE_EQUIP_BAGS
Definition: Item.h:53
@ EQUIP_ERR_BAG_FULL4
Definition: Item.h:103
@ EQUIP_ERR_MAIL_BOUND_ITEM
Definition: Item.h:119
@ EQUIP_ERR_CANNOT_TRADE_THAT
Definition: Item.h:125
@ EQUIP_ERR_ALREADY_LOOTED
Definition: Item.h:96
@ EQUIP_ERR_STACKABLE_CANT_BE_WRAPPED
Definition: Item.h:90
@ EQUIP_ERR_CANT_DUAL_WIELD
Definition: Item.h:61
@ EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE
Definition: Item.h:114
@ EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED
Definition: Item.h:121
@ EQUIP_ERR_DONT_OWN_THAT_ITEM
Definition: Item.h:79
@ EQUIP_ERR_ITEM_CANT_BE_EQUIPPED
Definition: Item.h:67
@ EQUIP_ERR_MUST_PURCHASE_THAT_BAG_SLOT
Definition: Item.h:81
@ EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS
Definition: Item.h:78
@ EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS
Definition: Item.h:116
@ EQUIP_ERR_UNIQUE_CANT_BE_WRAPPED
Definition: Item.h:94
@ EQUIP_ERR_CAN_EQUIP_ONLY1_BOLT
Definition: Item.h:88
@ EQUIP_ERR_ITEM_MAX_COUNT_SOCKETED
Definition: Item.h:118
@ EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE
Definition: Item.h:56
@ EQUIP_ERR_NOT_DURING_ARENA_MATCH
Definition: Item.h:124
@ EQUIP_ERR_OUT_OF_RANGE
Definition: Item.h:72
@ EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED
Definition: Item.h:131
@ EQUIP_ERR_ITEM_CANT_STACK2
Definition: Item.h:102
@ EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG
Definition: Item.h:52
@ EQUIP_ERR_ITEM_SOLD_OUT
Definition: Item.h:104
@ EQUIP_ERR_BANK_FULL
Definition: Item.h:98
@ EQUIP_ERR_NOT_IN_COMBAT
Definition: Item.h:107
@ EQUIP_ERR_COULDNT_SPLIT_ITEMS
Definition: Item.h:74
@ EQUIP_ERR_ITEM_LOCKED
Definition: Item.h:83
@ EQUIP_ERR_OBJECT_IS_BUSY
Definition: Item.h:105
@ EQUIP_ERR_CANT_EQUIP_LEVEL_I
Definition: Item.h:48
@ EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED
Definition: Item.h:92
@ EQUIP_ERR_CANT_EQUIP_WITH_TWOHANDED
Definition: Item.h:60
@ EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM
Definition: Item.h:127
@ EQUIP_ERR_CANT_EQUIP_NEED_TALENT
Definition: Item.h:134
@ EQUIP_ERR_CANT_DROP_SOULBOUND
Definition: Item.h:71
@ EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE2
Definition: Item.h:59
@ EQUIP_ERR_NOT_WHILE_DISARMED
Definition: Item.h:108
@ EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW
Definition: Item.h:133
@ EQUIP_ERR_YOU_ARE_DEAD
Definition: Item.h:85
@ EQUIP_ERR_BAG_FULL3
Definition: Item.h:100
@ EQUIP_ERR_ITEM_NOT_FOUND
Definition: Item.h:70
@ EQUIP_ERR_CANT_DO_RIGHT_NOW
Definition: Item.h:86
@ EQUIP_ERR_CANT_EQUIP_REPUTATION
Definition: Item.h:111
@ EQUIP_ERR_OK
Definition: Item.h:47
@ EQUIP_ERR_ONLY_AMMO_CAN_GO_HERE
Definition: Item.h:54
@ EQUIP_ERR_CAN_EQUIP_ONLY1_QUIVER
Definition: Item.h:80
@ EQUIP_ERR_TOO_FAR_AWAY_FROM_BANK
Definition: Item.h:82
@ EQUIP_ERR_YOU_ARE_STUNNED
Definition: Item.h:84
@ EQUIP_ERR_CANT_EQUIP_SKILL
Definition: Item.h:49
@ EQUIP_ERR_ITEM_IS_CURRENTLY_SOLD_OUT
Definition: Item.h:99
@ EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT
Definition: Item.h:50
@ EQUIP_ERR_NOT_ENOUGH_MONEY
Definition: Item.h:76
@ EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED
Definition: Item.h:122
@ EQUIP_ERR_TRIED_TO_SPLIT_MORE_THAN_COUNT
Definition: Item.h:73
@ EQUIP_ERR_NO_REQUIRED_PROFICIENCY
Definition: Item.h:55
@ EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG
Definition: Item.h:62
@ EQUIP_ERR_VENDOR_MISSING_TURNINS
Definition: Item.h:115
@ EQUIP_ERR_ITEM_CANT_STACK
Definition: Item.h:66
@ EQUIP_ERR_CANT_CARRY_MORE_OF_THIS
Definition: Item.h:64
@ EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2
Definition: Item.h:63
@ EQUIP_ERR_BOUND_CANT_BE_WRAPPED
Definition: Item.h:93
@ EQUIP_ERR_ITEM_NOT_FOUND2
Definition: Item.h:101
@ EQUIP_ERR_LOOT_CANT_LOOT_THAT_NOW
Definition: Item.h:113
@ EQUIP_ERR_ITEMS_CANT_BE_SWAPPED
Definition: Item.h:68
@ EQUIP_ERR_BAG_FULL6
Definition: Item.h:109
@ EQUIP_ERR_NONE
Definition: Item.h:106
@ EQUIP_ERR_ARTEFACTS_ONLY_FOR_OWN_CHARACTERS
Definition: Item.h:128
@ EQUIP_ERR_TOO_MANY_SPECIAL_BAGS
Definition: Item.h:112
@ EQUIP_ERR_INVENTORY_FULL
Definition: Item.h:97
@ EQUIP_ERR_EQUIPPED_CANT_BE_WRAPPED
Definition: Item.h:91
@ EQUIP_ERR_SCALING_STAT_ITEM_LEVEL_EXCEEDED
Definition: Item.h:132
@ EQUIP_ERR_PERSONAL_ARENA_RATING_TOO_LOW
Definition: Item.h:126
@ EQUIP_ERR_SLOT_IS_EMPTY
Definition: Item.h:69
@ EQUIP_ERR_INT_BAG_ERROR
Definition: Item.h:87
@ EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM
Definition: Item.h:57
@ EQUIP_ERR_NO_EQUIPMENT_SLOT_AVAILABLE3
Definition: Item.h:65
@ EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS
Definition: Item.h:117

◆ InventorySlot

Enumerator
NULL_BAG 
NULL_SLOT 
39{
40 NULL_BAG = 0,
41 NULL_SLOT = 255
42};
@ NULL_BAG
Definition: Item.h:40
@ NULL_SLOT
Definition: Item.h:41

◆ ItemUpdateState

Enumerator
ITEM_UNCHANGED 
ITEM_CHANGED 
ITEM_NEW 
ITEM_REMOVED 
208{
209 ITEM_UNCHANGED = 0,
210 ITEM_CHANGED = 1,
211 ITEM_NEW = 2,
212 ITEM_REMOVED = 3
213};
@ ITEM_CHANGED
Definition: Item.h:210
@ ITEM_REMOVED
Definition: Item.h:212
@ ITEM_NEW
Definition: Item.h:211
@ ITEM_UNCHANGED
Definition: Item.h:209

◆ SellResult

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 
SELL_ERR_CANT_SELL_TO_THIS_MERCHANT 
SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE 
SELL_INTERNAL_BAG_ERROR 
154{
155 SELL_ERR_CANT_FIND_ITEM = 1, // The item was not found.
156 SELL_ERR_CANT_SELL_ITEM = 2, // The merchant doesn't want that item.
157 SELL_ERR_CANT_FIND_VENDOR = 3, // The merchant doesn't like you.
158 SELL_ERR_YOU_DONT_OWN_THAT_ITEM = 4, // You don't own that item.
159 SELL_ERR_UNK = 5, // Nothing appears...
160 SELL_ERR_ONLY_EMPTY_BAG = 6, // You can only do that with empty bags.
161 SELL_ERR_CANT_SELL_TO_THIS_MERCHANT = 7, // You cannot sell items to this merchant.
162 SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE = 8, // You must repair that item's durability to use it.
163 SELL_INTERNAL_BAG_ERROR = 9 // Internal Bag Error
164};
@ SELL_ERR_CANT_FIND_VENDOR
Definition: Item.h:157
@ SELL_ERR_UNK
Definition: Item.h:159
@ SELL_INTERNAL_BAG_ERROR
Definition: Item.h:163
@ SELL_ERR_CANT_SELL_TO_THIS_MERCHANT
Definition: Item.h:161
@ SELL_ERR_CANT_FIND_ITEM
Definition: Item.h:155
@ SELL_ERR_MUST_REPAIR_ITEM_DURABILITY_TO_USE
Definition: Item.h:162
@ SELL_ERR_CANT_SELL_ITEM
Definition: Item.h:156
@ SELL_ERR_YOU_DONT_OWN_THAT_ITEM
Definition: Item.h:158
@ SELL_ERR_ONLY_EMPTY_BAG
Definition: Item.h:160

Function Documentation

◆ ItemCanGoIntoBag()

bool ItemCanGoIntoBag ( ItemTemplate const *  proto,
ItemTemplate const *  pBagProto 
)
177{
178 if (!pProto || !pBagProto)
179 return false;
180
181 switch (pBagProto->Class)
182 {
184 {
185 if (pBagProto->SubClass == ITEM_SUBCLASS_CONTAINER)
186 {
187 return true;
188 }
189 else
190 {
191 if (pProto->Class == ITEM_CLASS_CONTAINER)
192 {
193 return false;
194 }
195
196 switch (pBagProto->SubClass)
197 {
199 if (!(pProto->BagFamily & BAG_FAMILY_MASK_SOUL_SHARDS))
200 return false;
201 return true;
203 if (!(pProto->BagFamily & BAG_FAMILY_MASK_HERBS))
204 return false;
205 return true;
207 if (!(pProto->BagFamily & BAG_FAMILY_MASK_ENCHANTING_SUPP))
208 return false;
209 return true;
211 if (!(pProto->BagFamily & BAG_FAMILY_MASK_MINING_SUPP))
212 return false;
213 return true;
215 if (!(pProto->BagFamily & BAG_FAMILY_MASK_ENGINEERING_SUPP))
216 return false;
217 return true;
219 if (!(pProto->BagFamily & BAG_FAMILY_MASK_GEMS))
220 return false;
221 return true;
223 if (!(pProto->BagFamily & BAG_FAMILY_MASK_LEATHERWORKING_SUPP))
224 return false;
225 return true;
227 if (!(pProto->BagFamily & BAG_FAMILY_MASK_INSCRIPTION_SUPP))
228 return false;
229 return true;
230 default:
231 return false;
232 }
233 }
234 }
236 {
237 if (pProto->Class == ITEM_CLASS_QUIVER)
238 {
239 return false;
240 }
241
242 switch (pBagProto->SubClass)
243 {
245 if (!(pProto->BagFamily & BAG_FAMILY_MASK_ARROWS))
246 return false;
247 return true;
249 if (!(pProto->BagFamily & BAG_FAMILY_MASK_BULLETS))
250 return false;
251 return true;
252 default:
253 return false;
254 }
255 }
256 }
257
258 return false;
259}
@ BAG_FAMILY_MASK_MINING_SUPP
Definition: ItemTemplate.h:237
@ BAG_FAMILY_MASK_HERBS
Definition: ItemTemplate.h:232
@ BAG_FAMILY_MASK_ENCHANTING_SUPP
Definition: ItemTemplate.h:233
@ BAG_FAMILY_MASK_SOUL_SHARDS
Definition: ItemTemplate.h:229
@ BAG_FAMILY_MASK_INSCRIPTION_SUPP
Definition: ItemTemplate.h:231
@ BAG_FAMILY_MASK_GEMS
Definition: ItemTemplate.h:236
@ BAG_FAMILY_MASK_ARROWS
Definition: ItemTemplate.h:227
@ BAG_FAMILY_MASK_BULLETS
Definition: ItemTemplate.h:228
@ BAG_FAMILY_MASK_ENGINEERING_SUPP
Definition: ItemTemplate.h:234
@ BAG_FAMILY_MASK_LEATHERWORKING_SUPP
Definition: ItemTemplate.h:230
@ ITEM_SUBCLASS_CONTAINER
Definition: ItemTemplate.h:329
@ ITEM_SUBCLASS_INSCRIPTION_CONTAINER
Definition: ItemTemplate.h:337
@ ITEM_SUBCLASS_LEATHERWORKING_CONTAINER
Definition: ItemTemplate.h:336
@ ITEM_SUBCLASS_GEM_CONTAINER
Definition: ItemTemplate.h:334
@ ITEM_SUBCLASS_SOUL_CONTAINER
Definition: ItemTemplate.h:330
@ ITEM_SUBCLASS_ENCHANTING_CONTAINER
Definition: ItemTemplate.h:332
@ ITEM_SUBCLASS_MINING_CONTAINER
Definition: ItemTemplate.h:335
@ ITEM_SUBCLASS_HERB_CONTAINER
Definition: ItemTemplate.h:331
@ ITEM_SUBCLASS_ENGINEERING_CONTAINER
Definition: ItemTemplate.h:333
@ ITEM_SUBCLASS_QUIVER
Definition: ItemTemplate.h:480
@ ITEM_SUBCLASS_AMMO_POUCH
Definition: ItemTemplate.h:481
@ ITEM_CLASS_QUIVER
Definition: ItemTemplate.h:302
@ ITEM_CLASS_CONTAINER
Definition: ItemTemplate.h:292

References BAG_FAMILY_MASK_ARROWS, BAG_FAMILY_MASK_BULLETS, BAG_FAMILY_MASK_ENCHANTING_SUPP, BAG_FAMILY_MASK_ENGINEERING_SUPP, BAG_FAMILY_MASK_GEMS, BAG_FAMILY_MASK_HERBS, BAG_FAMILY_MASK_INSCRIPTION_SUPP, BAG_FAMILY_MASK_LEATHERWORKING_SUPP, BAG_FAMILY_MASK_MINING_SUPP, BAG_FAMILY_MASK_SOUL_SHARDS, ItemTemplate::BagFamily, ItemTemplate::Class, ITEM_CLASS_CONTAINER, ITEM_CLASS_QUIVER, ITEM_SUBCLASS_AMMO_POUCH, ITEM_SUBCLASS_CONTAINER, ITEM_SUBCLASS_ENCHANTING_CONTAINER, ITEM_SUBCLASS_ENGINEERING_CONTAINER, ITEM_SUBCLASS_GEM_CONTAINER, ITEM_SUBCLASS_HERB_CONTAINER, ITEM_SUBCLASS_INSCRIPTION_CONTAINER, ITEM_SUBCLASS_LEATHERWORKING_CONTAINER, ITEM_SUBCLASS_MINING_CONTAINER, ITEM_SUBCLASS_QUIVER, ITEM_SUBCLASS_SOUL_CONTAINER, and ItemTemplate::SubClass.

Referenced by Player::CanStoreItem_InBag(), Player::CanStoreItem_InSpecificSlot(), Player::CanStoreItems(), and Player::SwapItem().