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  PetStableFlags : uint8 { PET_STABLE_ACTIVE = 0x1 , PET_STABLE_INACTIVE = 0x2 }
 
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 class  PetActionFeedback : uint8 {
  None = 0 , Dead = 1 , NoTarget = 2 , InvalidTarget = 3 ,
  NoPath = 4
}
 
enum  PetTalk { PET_TALK_SPECIAL_SPELL = 0 , PET_TALK_ATTACK = 1 }
 
enum class  PetTameResult : uint8 {
  Ok = 0 , InvalidCreature = 1 , TooMany = 2 , CreatureAlreadyOwned = 3 ,
  NotTameable = 4 , AnotherSummonActive = 5 , UnitsCantTame = 6 , NoPetAvailable = 7 ,
  InternalError = 8 , TooHighLevel = 9 , Dead = 10 , NotDead = 11 ,
  CantControlExotic = 12 , InvalidSlot = 13 , EliteTooHighLevel = 14
}
 
enum class  StableResult : uint8 {
  NotEnoughMoney = 1 , InvalidSlot = 3 , StableSuccess = 8 , UnstableSuccess = 9 ,
  BuySlotSuccess = 10 , CantControlExotic = 11 , InternalError = 12
}
 

Functions

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

Variables

constexpr uint32 CALL_PET_SPELL_ID = 883
 
constexpr uint32 PET_SUMMONING_DISORIENTATION = 32752
 

Macro Definition Documentation

◆ MAX_ACTIVE_PETS

#define MAX_ACTIVE_PETS   5

Definition at line 36 of file PetDefines.h.

◆ MAX_PET_STABLES

#define MAX_PET_STABLES   200

Definition at line 37 of file PetDefines.h.

◆ PET_FOLLOW_ANGLE

#define PET_FOLLOW_ANGLE   float(M_PI)

Definition at line 98 of file PetDefines.h.

◆ PET_FOLLOW_DIST

#define PET_FOLLOW_DIST   1.0f

Definition at line 97 of file PetDefines.h.

Enumeration Type Documentation

◆ PetActionFeedback

enum class PetActionFeedback : uint8
strong
Enumerator
None 
Dead 
NoTarget 
InvalidTarget 
NoPath 

Definition at line 82 of file PetDefines.h.

◆ 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 

Definition at line 40 of file PetDefines.h.

41{
42 PET_SAVE_AS_DELETED = -2, // not saved in fact
43 PET_SAVE_AS_CURRENT = -3, // in current slot (with player)
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
#define MAX_PET_STABLES
Definition: PetDefines.h:37
@ PET_SAVE_FIRST_STABLE_SLOT
Definition: PetDefines.h:46
@ PET_SAVE_LAST_STABLE_SLOT
Definition: PetDefines.h:47
@ PET_SAVE_LAST_ACTIVE_SLOT
Definition: PetDefines.h:45
@ PET_SAVE_FIRST_ACTIVE_SLOT
Definition: PetDefines.h:44
@ PET_SAVE_AS_DELETED
Definition: PetDefines.h:42
@ PET_SAVE_NOT_IN_SLOT
Definition: PetDefines.h:48
@ PET_SAVE_AS_CURRENT
Definition: PetDefines.h:43

◆ PetSpellState

Enumerator
PETSPELL_UNCHANGED 
PETSPELL_CHANGED 
PETSPELL_NEW 
PETSPELL_REMOVED 

Definition at line 67 of file PetDefines.h.

68{
71 PETSPELL_NEW = 2,
73};
@ PETSPELL_NEW
Definition: PetDefines.h:71
@ PETSPELL_UNCHANGED
Definition: PetDefines.h:69
@ PETSPELL_CHANGED
Definition: PetDefines.h:70
@ PETSPELL_REMOVED
Definition: PetDefines.h:72

◆ PetSpellType

Enumerator
PETSPELL_NORMAL 
PETSPELL_FAMILY 
PETSPELL_TALENT 

Definition at line 75 of file PetDefines.h.

76{
80};
@ PETSPELL_TALENT
Definition: PetDefines.h:79
@ PETSPELL_NORMAL
Definition: PetDefines.h:77
@ PETSPELL_FAMILY
Definition: PetDefines.h:78

◆ PetStableFlags

Enumerator
PET_STABLE_ACTIVE 
PET_STABLE_INACTIVE 

Definition at line 61 of file PetDefines.h.

62{
65};
@ PET_STABLE_INACTIVE
Definition: PetDefines.h:64
@ PET_STABLE_ACTIVE
Definition: PetDefines.h:63

◆ PetTalk

enum PetTalk
Enumerator
PET_TALK_SPECIAL_SPELL 
PET_TALK_ATTACK 

Definition at line 91 of file PetDefines.h.

92{
95};
@ PET_TALK_SPECIAL_SPELL
Definition: PetDefines.h:93
@ PET_TALK_ATTACK
Definition: PetDefines.h:94

◆ PetTameResult

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

Definition at line 100 of file PetDefines.h.

101{
102 Ok = 0,
103 InvalidCreature = 1,
104 TooMany = 2,
106 NotTameable = 4,
108 UnitsCantTame = 6,
109 NoPetAvailable = 7,
110 InternalError = 8,
111 TooHighLevel = 9,
112 Dead = 10,
113 NotDead = 11,
115 InvalidSlot = 13,
117};

◆ PetType

enum PetType : uint8
Enumerator
SUMMON_PET 
HUNTER_PET 
MAX_PET_TYPE 

Definition at line 29 of file PetDefines.h.

30{
31 SUMMON_PET = 0,
32 HUNTER_PET = 1,
33 MAX_PET_TYPE = 4
34};
@ SUMMON_PET
Definition: PetDefines.h:31
@ HUNTER_PET
Definition: PetDefines.h:32
@ MAX_PET_TYPE
Definition: PetDefines.h:33

◆ StableResult

enum class StableResult : uint8
strong
Enumerator
NotEnoughMoney 
InvalidSlot 
StableSuccess 
UnstableSuccess 
BuySlotSuccess 
CantControlExotic 
InternalError 

Definition at line 119 of file PetDefines.h.

120{
121 NotEnoughMoney = 1, // "you don't have enough money"
122 InvalidSlot = 3, // "That slot is locked"
123 StableSuccess = 8, // stable success
124 UnstableSuccess = 9, // unstable/swap success
125 BuySlotSuccess = 10, // buy slot success
126 CantControlExotic = 11, // "you are unable to control exotic creatures"
127 InternalError = 12, // "Internal pet error"
128};

Function Documentation

◆ IsActivePetSlot()

constexpr bool IsActivePetSlot ( PetSaveMode  slot)
constexpr

Definition at line 51 of file PetDefines.h.

52{
54}
+ Here is the caller graph for this function:

◆ IsStabledPetSlot()

constexpr bool IsStabledPetSlot ( PetSaveMode  slot)
constexpr

Definition at line 56 of file PetDefines.h.

57{
59}
+ Here is the caller graph for this function:

Variable Documentation

◆ CALL_PET_SPELL_ID

constexpr uint32 CALL_PET_SPELL_ID = 883
constexpr

Definition at line 130 of file PetDefines.h.

◆ PET_SUMMONING_DISORIENTATION

constexpr uint32 PET_SUMMONING_DISORIENTATION = 32752
constexpr

Definition at line 131 of file PetDefines.h.