18#ifndef TRINITYCORE_PET_H
19#define TRINITYCORE_PET_H
24#define HAPPINESS_LEVEL_SIZE 333000
56 bool IsPermanentPetFor(
Player* owner)
const;
59 bool CreateBaseAtCreature(
Creature* creature);
64 bool IsLoading()
const override {
return m_loading;}
76 if (pos >= m_autospells.size())
79 return m_autospells[pos];
83 void GivePetLevel(
uint8 level);
86 void SynchronizeLevelWithOwner();
106 void LearnPetPassives();
107 void CastPetAuras(
bool current);
108 void CastPetAura(
PetAura const* aura);
109 bool IsPetAura(
Aura const* aura);
117 bool learnSpell(
uint32 spell_id);
118 void learnSpells(std::vector<uint32>
const& spellIds);
119 void learnSpellHighRank(
uint32 spellid);
120 void InitLevelupSpellsForLevel();
121 bool unlearnSpell(
uint32 spell_id,
bool learn_prev,
bool clear_ab =
true);
122 void unlearnSpells(std::vector<uint32>
const& spellIds,
bool learn_prev,
bool clear_ab =
true);
123 bool removeSpell(
uint32 spell_id,
bool learn_prev,
bool clear_ab =
true);
124 void CleanupActionBar();
125 std::string GenerateActionBarData()
const;
130 void InitPetCreateSpells();
133 void SetSpecialization(
uint16 spec);
134 void LearnSpecializationSpells();
135 void RemoveSpecializationSpells(
bool clearActionBar);
138 void SetGroupUpdateFlag(
uint32 flag);
139 void ResetGroupUpdateFlag();
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
std::shared_ptr< PreparedResultSet > PreparedQueryResult
std::optional< T > Optional
Optional helper class to wrap optional values within.
std::unordered_map< uint32, PetSpell > PetSpellMap
std::vector< uint32 > AutoSpellList
bool HasSpell(uint32 spellID) const override
bool Create(ObjectGuid::LowType guidlow, Map *map, uint32 entry, Position const &pos, CreatureData const *data, uint32 vehId, bool dynamic=false)
void AddToWorld() override
static bool DeleteFromDB(ObjectGuid::LowType spawnId)
float GetNativeObjectScale() const override
void SetDisplayId(uint32 displayId, bool setNative=false) override
std::string GetDebugInfo() const override
void setDeathState(DeathState s) override
void RemoveFromWorld() override
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
uint16 GetSpecialization() const
void SetDuration(int32 dur)
uint16 m_petSpecialization
void setPetType(PetType type)
PetType getPetType() const
std::unique_ptr< DeclinedName > m_declinedname
uint32 GetPetAutoSpellOnPos(uint8 pos) const override
AutoSpellList m_autospells
void SetPetExperience(uint32 xp)
DeclinedName const * GetDeclinedNames() const
bool isTemporarySummoned() const
int32 GetDuration() const
bool isControlled() const
bool IsLoading() const override
void SetPetNextLevelExperience(uint32 xp)
uint32 GetGroupUpdateFlag() const
void SaveToDB(uint32, std::vector< Difficulty > const &) override
uint8 GetPetAutoSpellSize() const override
void Update(uint32 diff) override
UF::UpdateField< UF::UnitData, int32(WowCS::EntityFragment::CGObject), TYPEID_UNIT > m_unitData
void Remove(VignetteData &vignette, WorldObject const *owner)
UpdateField< uint32, 64, 71 > PetNextLevelExperience
UpdateField< uint32, 64, 70 > PetExperience