TrinityCore
PetDefines.h File Reference
#include "Define.h"
#include "Optional.h"
#include <array>
#include <string>
#include <vector>
+ Include dependency graph for PetDefines.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PetStable
 
struct  PetStable::PetInfo
 

Macros

#define MAX_ACTIVE_PETS   5
 
#define MAX_PET_STABLES   200
 
#define PET_FOLLOW_DIST   1.0f
 
#define PET_FOLLOW_ANGLE   float(M_PI)
 

Enumerations

enum  PetType : uint8 { SUMMON_PET = 0, HUNTER_PET = 1, MAX_PET_TYPE = 4 }
 
enum  PetSaveMode : int16 {
  PET_SAVE_AS_DELETED = -2, PET_SAVE_AS_CURRENT = -3, PET_SAVE_FIRST_ACTIVE_SLOT = 0, PET_SAVE_LAST_ACTIVE_SLOT = PET_SAVE_FIRST_ACTIVE_SLOT + MAX_ACTIVE_PETS,
  PET_SAVE_FIRST_STABLE_SLOT = 5, PET_SAVE_LAST_STABLE_SLOT = PET_SAVE_FIRST_STABLE_SLOT + MAX_PET_STABLES, PET_SAVE_NOT_IN_SLOT = -1
}
 
enum  PetSpellState { PETSPELL_UNCHANGED = 0, PETSPELL_CHANGED = 1, PETSPELL_NEW = 2, PETSPELL_REMOVED = 3 }
 
enum  PetSpellType { PETSPELL_NORMAL = 0, PETSPELL_FAMILY = 1, PETSPELL_TALENT = 2 }
 
enum  PetActionFeedback : uint8 {
  PetActionFeedback::None = 0, PetActionFeedback::Dead = 1, PetActionFeedback::NoTarget = 2, PetActionFeedback::InvalidTarget = 3,
  PetActionFeedback::NoPath = 4
}
 
enum  PetTalk { PET_TALK_SPECIAL_SPELL = 0, PET_TALK_ATTACK = 1 }
 
enum  PetTameResult : uint8 {
  PetTameResult::Ok = 0, PetTameResult::InvalidCreature = 1, PetTameResult::TooMany = 2, PetTameResult::CreatureAlreadyOwned = 3,
  PetTameResult::NotTameable = 4, PetTameResult::AnotherSummonActive = 5, PetTameResult::UnitsCantTame = 6, PetTameResult::NoPetAvailable = 7,
  PetTameResult::InternalError = 8, PetTameResult::TooHighLevel = 9, PetTameResult::Dead = 10, PetTameResult::NotDead = 11,
  PetTameResult::CantControlExotic = 12, PetTameResult::InvalidSlot = 13, PetTameResult::EliteTooHighLevel = 14
}
 

Functions

constexpr bool IsActivePetSlot (PetSaveMode slot)
 
constexpr bool IsStabledPetSlot (PetSaveMode slot)
 

Variables

constexpr uint32 CALL_PET_SPELL_ID = 883
 

Macro Definition Documentation

◆ MAX_ACTIVE_PETS

#define MAX_ACTIVE_PETS   5

◆ MAX_PET_STABLES

#define MAX_PET_STABLES   200

◆ PET_FOLLOW_ANGLE

#define PET_FOLLOW_ANGLE   float(M_PI)

◆ PET_FOLLOW_DIST

#define PET_FOLLOW_DIST   1.0f

Enumeration Type Documentation

◆ PetActionFeedback

enum PetActionFeedback : uint8
strong
Enumerator
None 
Dead 
NoTarget 
InvalidTarget 
NoPath 
76  : uint8
77 {
78  None = 0,
79  Dead = 1,
80  NoTarget = 2,
81  InvalidTarget = 3,
82  NoPath = 4
83 };
uint8_t uint8
Definition: Define.h:145

◆ PetSaveMode

Enumerator
PET_SAVE_AS_DELETED 
PET_SAVE_AS_CURRENT 
PET_SAVE_FIRST_ACTIVE_SLOT 
PET_SAVE_LAST_ACTIVE_SLOT 
PET_SAVE_FIRST_STABLE_SLOT 
PET_SAVE_LAST_STABLE_SLOT 
PET_SAVE_NOT_IN_SLOT 
40  : int16
41 {
42  PET_SAVE_AS_DELETED = -2, // not saved in fact
43  PET_SAVE_AS_CURRENT = -3, // in current slot (with player)
47  PET_SAVE_LAST_STABLE_SLOT = PET_SAVE_FIRST_STABLE_SLOT + MAX_PET_STABLES, // last in DB stable slot index
48  PET_SAVE_NOT_IN_SLOT = -1 // for avoid conflict with stable size grow will use negative value
49 };
#define MAX_ACTIVE_PETS
Definition: PetDefines.h:36
Definition: PetDefines.h:47
#define MAX_PET_STABLES
Definition: PetDefines.h:37
Definition: PetDefines.h:48
Definition: PetDefines.h:46
Definition: PetDefines.h:42
Definition: PetDefines.h:44
Definition: PetDefines.h:45
Definition: PetDefines.h:43
int16_t int16
Definition: Define.h:140

◆ PetSpellState

Enumerator
PETSPELL_UNCHANGED 
PETSPELL_CHANGED 
PETSPELL_NEW 
PETSPELL_REMOVED 
62 {
64  PETSPELL_CHANGED = 1,
65  PETSPELL_NEW = 2,
67 };
Definition: PetDefines.h:65
Definition: PetDefines.h:64
Definition: PetDefines.h:66
Definition: PetDefines.h:63

◆ PetSpellType

Enumerator
PETSPELL_NORMAL 
PETSPELL_FAMILY 
PETSPELL_TALENT 
70 {
71  PETSPELL_NORMAL = 0,
72  PETSPELL_FAMILY = 1,
73  PETSPELL_TALENT = 2
74 };
Definition: PetDefines.h:71
Definition: PetDefines.h:73
Definition: PetDefines.h:72

◆ PetTalk

enum PetTalk
Enumerator
PET_TALK_SPECIAL_SPELL 
PET_TALK_ATTACK 
86 {
88  PET_TALK_ATTACK = 1
89 };
Definition: PetDefines.h:88
Definition: PetDefines.h:87

◆ PetTameResult

enum PetTameResult : uint8
strong
Enumerator
Ok 
InvalidCreature 
TooMany 
CreatureAlreadyOwned 
NotTameable 
AnotherSummonActive 
UnitsCantTame 
NoPetAvailable 
InternalError 
TooHighLevel 
Dead 
NotDead 
CantControlExotic 
InvalidSlot 
EliteTooHighLevel 

◆ PetType

enum PetType : uint8
Enumerator
SUMMON_PET 
HUNTER_PET 
MAX_PET_TYPE 
29  : uint8
30 {
31  SUMMON_PET = 0,
32  HUNTER_PET = 1,
33  MAX_PET_TYPE = 4
34 };
Definition: PetDefines.h:31
uint8_t uint8
Definition: Define.h:145
Definition: PetDefines.h:32
Definition: PetDefines.h:33

Function Documentation

◆ IsActivePetSlot()

constexpr bool IsActivePetSlot ( PetSaveMode  slot)
52 {
54 }
Definition: PetDefines.h:44
Definition: PetDefines.h:45
+ Here is the caller graph for this function:

◆ IsStabledPetSlot()

constexpr bool IsStabledPetSlot ( PetSaveMode  slot)
57 {
59 }
Definition: PetDefines.h:47
Definition: PetDefines.h:46
+ Here is the caller graph for this function:

Variable Documentation

◆ CALL_PET_SPELL_ID

constexpr uint32 CALL_PET_SPELL_ID = 883