character_pet
This table holds the pet data for each pet summoned by anyone in the game.
Structure
| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
|---|---|---|---|---|---|---|---|
| id | int | unsigned | PRI | NO | 0 | ||
| entry | int | unsigned | NO | 0 | |||
| owner | int | unsigned | MUL | NO | 0 | ||
| modelid | int | unsigned | YES | 0 | |||
| CreatedBySpell | mediumint | unsigned | NO | 0 | |||
| PetType | tinyint | unsigned | NO | 0 | |||
| level | smallint | unsigned | NO | 1 | |||
| exp | int | unsigned | NO | 0 | |||
| Reactstate | tinyint | unsigned | NO | 0 | |||
| name | varchar(21) | NO | Pet | ||||
| renamed | tinyint | unsigned | NO | 0 | |||
| slot | tinyint | unsigned | MUL | NO | 0 | ||
| curhealth | int | unsigned | NO | 1 | |||
| curmana | int | unsigned | NO | 0 | |||
| curhappiness | int | unsigned | NO | 0 | |||
| savetime | int | unsigned | NO | 0 | |||
| abdata | text | YES | NULL | ||||
Description of fields
id
The special pet ID. This is a unique identifier among all pets.
entry
The creature entry of this pet. See
owner
The character guid of the pet's owner.
modelid
The model id used to display the pet.
CreatedBySpell
The Spell ID that has created this pet. May be 0 if pet was tamed via command .pet create For hunters, this is Tame Beast or Call Pet. For warlocks, mages or death knight, it is the spell that summoned the creature.
PetType
The type of pet that this is.
| ID | Name | Comment |
|---|---|---|
| 0 | SUMMON_PET | Warlock, Mage, Death Knight |
| 1 | HUNTER_PET | Hunter tamed |
level
The current level of the pet.
exp
The current experience that this pet has. For summoned pets, this field is always 0.
Reactstate
The current reaction state of the pet.
| ID | Name | Comment |
|---|---|---|
| 0 | REACT_PASSIVE | attack when ordered |
| 1 | REACT_DEFENSIVE | attack when attacked |
| 2 | REACT_AGGRESSIVE | attack on sight |
name
The pet's name.
renamed
- 0: Pet has never been renamed and still uses the same name as the creature that was tamed.
- 1: Pet has been renamed.
slot
The pet slot that the pet is in.
- 0: pet is with the player and active
- 1 – 4: for pets in stable (slot 1 – 4)
- 100: pet is with the player but currently dismissed
curhealth
The current pet health at the time it was saved to DB.
curmana
The current pet mana at the time it was saved to DB.
curhappiness
The current pet happiness of tamed pets. Otherwise 0.
savetime
The time when the pet was last saved, in Unix time.
abdata
Pets Action Bar data.
10 space separated type-action pairs type1 action1 typeN actionN
| type | Name | Comment | action |
|---|---|---|---|
| 0x01 | ACT_PASSIVE | 0x01 - passive | Spell ID or 0 |
| 0x81 | ACT_DISABLED | 0x80 - castable | Spell ID |
| 0xC1 | ACT_ENABLED | 0x40 | 0x80 - auto cast + castable | Spell ID |
| 0x07 | ACT_COMMAND | 0x01 | 0x02 | 0x04 | COMMAND_ [STAY, FOLLOW, ATTACK] |
| 0x06 | ACT_REACTION | 0x02 | 0x04 | REACT_ [PASSIVE, DEFENSIVE, AGGRESSIVE] |
