Skip to content

Item_instance

insuna edited this page Feb 7, 2021 · 3 revisions

Back to characters database list of tables.

The `item_instance` table

This table holds individual item instance information for all items currently equipped or in some kind of character bag or bank.

Structure

Deprecated:

Field Type Null Key Default Extra
guid int(11) unsigned NO PRI 0
owner_guid int(11) unsigned NO MUL 0
data longtext YES

Current:

Field Type Null Key Default Extra
guid int(11) unsigned NO PRI 0
owner_guid int(11) unsigned NO MUL 0
itemEntry mediumint(8) unsigned NO 0
creatorGuid int(10) unsigned NO 0
giftCreatorGuid int(10) unsigned NO 0
count int(10) unsigned NO 1
duration int(10) unsigned NO 0
charges text NO NULL
flags int(8) unsigned NO 0
enchantments text NO NULL
randomPropertyId smallint(5) NO 0
durability int(5) unsigned NO 0
itemTextId mediumint(8) unsigned NO 0

Description of the fields

guid

The GUID of the item. This number is unique for each item instance.

owner_guid

The GUID of the character who has ownership of this item. See character.guid

itemEntry

The entry of the item from `item_template`

creatorGuid

The GUID of the item creator

giftCreatorGuid

N/A

count

Count of item

duration

Time until item expires

charges

Number of uses left?

flags

Itemflags

enchantments

Enchanments present on the item

randomPropertyId

N/A

durability

Item durability

itemTextId

ID for flavor text

data (deprecated)

Much like the data field in the character table, this field has many number fields all separated by a space which contain specific individual item information like any enchantments applied to the item, etc.

Index Value Name Comments
0 OBJECT_FIELD_GUID Item GUID
2 OBJECT_FIELD_TYPE Should be 3 (TYPE_OBJECT + TYPE_ITEM)
3 OBJECT_FIELD_ENTRY entry
4 OBJECT_FIELD_SCALE_X 1.0
5 OBJECT_FIELD_PADDING
6 ITEM_FIELD_OWNER owner_guid
8 ITEM_FIELD_CONTAINED If the item is in a bag, the GUID of the bag item; otherwise owner GUID.
10 ITEM_FIELD_CREATOR GUID of character who created the item.
12 ITEM_FIELD_GIFTCREATOR GUID of character who created the item.
14 ITEM_FIELD_STACK_COUNT Current number of item copies in the stack.
15 ITEM_FIELD_DURATION Current duration (in milliseconds)
16 ITEM_FIELD_SPELL_CHARGES
21 ITEM_FIELD_FLAGS Flags (from item_template)
22 ITEM_FIELD_ENCHANTMENT
55 ITEM_FIELD_PROPERTY_SEED Also called ITEM_FIELD_SUFFIX_FACTOR
56 ITEM_FIELD_RANDOM_PROPERTIES_ID
57 ITEM_FIELD_ITEM_TEXT_ID Text id used and shown by the item.
58 ITEM_FIELD_DURABILITY Current item durability.
59 ITEM_FIELD_MAXDURABILITY Maximum item durability.
Clone this wiki locally