OregonCore  revision be9e804-git
Your Favourite TBC server
Pet.h File Reference
#include "ObjectGuid.h"
#include "Unit.h"
#include "TemporarySummon.h"

Go to the source code of this file.

Classes

struct  PetSpell
 
class  Pet
 

Macros

#define HAPPINESS_LEVEL_SIZE   333000
 
#define ACTIVE_SPELLS_MAX   4
 

Typedefs

typedef UNORDERED_MAP< uint16, PetSpellPetSpellMap
 
typedef std::map< uint32, uint32TeachSpellMap
 
typedef std::vector< uint32AutoSpellList
 

Enumerations

enum  PetType { SUMMON_PET = 0, HUNTER_PET = 1, CLASS_PET = 2, MAX_PET_TYPE = 4 }
 
enum  PetSaveMode {
  PET_SAVE_AS_DELETED = -1, PET_SAVE_AS_CURRENT = 0, PET_SAVE_IN_STABLE_SLOT_1 = 1, PET_SAVE_IN_STABLE_SLOT_2 = 2,
  PET_SAVE_NOT_IN_SLOT = 3
}
 
enum  PetStatus {
  PET_STATUS_NONE = 0, PET_STATUS_CURRENT = 1, PET_STATUS_DEAD = 2, PET_STATUS_DISMISSED = 3,
  PET_STATUS_DEAD_AND_REMOVED = 4
}
 
enum  PetModeFlags { PET_MODE_UNKNOWN_0 = 0x0000001, PET_MODE_UNKNOWN_2 = 0x0000100, PET_MODE_DISABLE_ACTIONS = 0x8000000, PET_MODE_DEFAULT = PET_MODE_UNKNOWN_0 | PET_MODE_UNKNOWN_2 }
 
enum  HappinessState { UNHAPPY = 1, CONTENT = 2, HAPPY = 3 }
 
enum  LoyaltyLevel {
  REBELLIOUS = 1, UNRULY = 2, SUBMISSIVE = 3, DEPENDABLE = 4,
  FAITHFUL = 5, BEST_FRIEND = 6
}
 
enum  PetSpellState { PETSPELL_UNCHANGED = 0, PETSPELL_CHANGED = 1, PETSPELL_NEW = 2, PETSPELL_REMOVED = 3 }
 
enum  PetSpellType { PETSPELL_NORMAL = 0, PETSPELL_FAMILY = 1 }
 
enum  ActionFeedback { FEEDBACK_NONE = 0, FEEDBACK_PET_DEAD = 1, FEEDBACK_NOTHING_TO_ATT = 2, FEEDBACK_CANT_ATT_TARGET = 3 }
 
enum  PetTalk { PET_TALK_SPECIAL_SPELL = 0, PET_TALK_ATTACK = 1 }
 
enum  PetNameInvalidReason {
  PET_NAME_INVALID = 1, PET_NAME_NO_NAME = 2, PET_NAME_TOO_SHORT = 3, PET_NAME_TOO_LONG = 4,
  PET_NAME_MIXED_LANGUAGES = 6, PET_NAME_PROFANE = 7, PET_NAME_RESERVED = 8, PET_NAME_THREE_CONSECUTIVE = 11,
  PET_NAME_INVALID_SPACE = 12, PET_NAME_CONSECUTIVE_SPACES = 13, PET_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 14, PET_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 15,
  PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 16
}
 

Variables

const uint32 LevelUpLoyalty [6]
 
const uint32 LevelStartLoyalty [6]
 

Macro Definition Documentation

#define ACTIVE_SPELLS_MAX   4

Definition at line 142 of file Pet.h.

Referenced by Pet::CanTakeMoreActiveSpells().

#define HAPPINESS_LEVEL_SIZE   333000

Definition at line 137 of file Pet.h.

Referenced by Spell::EffectScriptEffect(), Pet::GetHappinessState(), and Pet::setDeathState().

Typedef Documentation

typedef std::vector<uint32> AutoSpellList

Definition at line 135 of file Pet.h.

Definition at line 133 of file Pet.h.

typedef std::map<uint32, uint32> TeachSpellMap

Definition at line 134 of file Pet.h.

Enumeration Type Documentation

Enumerator
FEEDBACK_NONE 
FEEDBACK_PET_DEAD 
FEEDBACK_NOTHING_TO_ATT 
FEEDBACK_CANT_ATT_TARGET 

Definition at line 102 of file Pet.h.

Enumerator
UNHAPPY 
CONTENT 
HAPPY 

Definition at line 63 of file Pet.h.

64 {
65  UNHAPPY = 1,
66  CONTENT = 2,
67  HAPPY = 3
68 };
Definition: Pet.h:67
Definition: Pet.h:65
Definition: Pet.h:66
Enumerator
REBELLIOUS 
UNRULY 
SUBMISSIVE 
DEPENDABLE 
FAITHFUL 
BEST_FRIEND 

Definition at line 70 of file Pet.h.

71 {
72  REBELLIOUS = 1,
73  UNRULY = 2,
74  SUBMISSIVE = 3,
75  DEPENDABLE = 4,
76  FAITHFUL = 5,
77  BEST_FRIEND = 6
78 };
Definition: Pet.h:74
Definition: Pet.h:75
Definition: Pet.h:73
Definition: Pet.h:76
Definition: Pet.h:72
Enumerator
PET_MODE_UNKNOWN_0 
PET_MODE_UNKNOWN_2 
PET_MODE_DISABLE_ACTIONS 
PET_MODE_DEFAULT 

Definition at line 53 of file Pet.h.

54 {
55  PET_MODE_UNKNOWN_0 = 0x0000001,
56  PET_MODE_UNKNOWN_2 = 0x0000100,
57  PET_MODE_DISABLE_ACTIONS = 0x8000000,
58 
59  // autoset in client at summon
61 };
Enumerator
PET_NAME_INVALID 
PET_NAME_NO_NAME 
PET_NAME_TOO_SHORT 
PET_NAME_TOO_LONG 
PET_NAME_MIXED_LANGUAGES 
PET_NAME_PROFANE 
PET_NAME_RESERVED 
PET_NAME_THREE_CONSECUTIVE 
PET_NAME_INVALID_SPACE 
PET_NAME_CONSECUTIVE_SPACES 
PET_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS 
PET_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END 
PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME 

Definition at line 116 of file Pet.h.

Enumerator
PET_SAVE_AS_DELETED 
PET_SAVE_AS_CURRENT 
PET_SAVE_IN_STABLE_SLOT_1 
PET_SAVE_IN_STABLE_SLOT_2 
PET_SAVE_NOT_IN_SLOT 

Definition at line 33 of file Pet.h.

Enumerator
PETSPELL_UNCHANGED 
PETSPELL_CHANGED 
PETSPELL_NEW 
PETSPELL_REMOVED 

Definition at line 80 of file Pet.h.

81 {
83  PETSPELL_CHANGED = 1,
84  PETSPELL_NEW = 2,
86 };
Enumerator
PETSPELL_NORMAL 
PETSPELL_FAMILY 

Definition at line 88 of file Pet.h.

89 {
90  PETSPELL_NORMAL = 0,
91  PETSPELL_FAMILY = 1,
92 };
enum PetStatus
Enumerator
PET_STATUS_NONE 
PET_STATUS_CURRENT 
PET_STATUS_DEAD 
PET_STATUS_DISMISSED 
PET_STATUS_DEAD_AND_REMOVED 

Definition at line 44 of file Pet.h.

45 {
46  PET_STATUS_NONE = 0, // No pet available
47  PET_STATUS_CURRENT = 1, // Pet is currently active and alive
48  PET_STATUS_DEAD = 2, // Pet is dead, but active in the world
49  PET_STATUS_DISMISSED = 3, // Pet has been dismissed
50  PET_STATUS_DEAD_AND_REMOVED = 4 // Pet is dead and it's corpse removed from the world
51 };
enum PetTalk
Enumerator
PET_TALK_SPECIAL_SPELL 
PET_TALK_ATTACK 

Definition at line 110 of file Pet.h.

111 {
113  PET_TALK_ATTACK = 1
114 };
enum PetType
Enumerator
SUMMON_PET 
HUNTER_PET 
CLASS_PET 
MAX_PET_TYPE 

Definition at line 25 of file Pet.h.

26 {
27  SUMMON_PET = 0,
28  HUNTER_PET = 1,
29  CLASS_PET = 2,
30  MAX_PET_TYPE = 4
31 };
Definition: Pet.h:28
Definition: Pet.h:27
Definition: Pet.h:29

Variable Documentation

const uint32 LevelStartLoyalty[6]

Definition at line 44 of file Pet.cpp.

Referenced by Pet::GetStartLoyaltyPoints().

const uint32 LevelUpLoyalty[6]

Definition at line 34 of file Pet.cpp.

Referenced by Pet::GetMaxLoyaltyPoints().