AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
PetScript Class Reference

#include "PetScript.h"

Inheritance diagram for PetScript:
ScriptObject

Public Member Functions

bool IsDatabaseBound () const override
 
virtual void OnInitStatsForLevel (Guardian *, uint8)
 
virtual void OnCalculateMaxTalentPointsForLevel (Pet *, uint8, uint8 &)
 
virtual bool CanUnlearnSpellSet (Pet *, uint32, uint32)
 
virtual bool CanUnlearnSpellDefault (Pet *, SpellInfo const *)
 
virtual bool CanResetTalents (Pet *)
 
virtual void OnPetAddToWorld (Pet *)
 This hook called after add pet in world. More...
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Protected Member Functions

 PetScript (const char *name, std::vector< uint16 > enabledHooks=std::vector< uint16 >())
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ PetScript()

PetScript::PetScript ( const char *  name,
std::vector< uint16 enabledHooks = std::vector<uint16>() 
)
protected
56{
57 // If empty - enable all available hooks.
58 if (enabledHooks.empty())
59 for (uint16 i = 0; i < PETHOOK_END; ++i)
60 enabledHooks.emplace_back(i);
61
62 ScriptRegistry<PetScript>::AddScript(this, std::move(enabledHooks));
63}
std::uint16_t uint16
Definition: Define.h:108
@ PETHOOK_END
Definition: PetScript.h:32
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:737
Definition: ScriptObject.h:44

References ScriptRegistry< TScript >::AddScript(), and PETHOOK_END.

Member Function Documentation

◆ CanResetTalents()

virtual bool PetScript::CanResetTalents ( Pet )
inlinevirtual
51{ return true; }

◆ CanUnlearnSpellDefault()

virtual bool PetScript::CanUnlearnSpellDefault ( Pet ,
SpellInfo const *   
)
inlinevirtual
49{ return true; }

◆ CanUnlearnSpellSet()

virtual bool PetScript::CanUnlearnSpellSet ( Pet ,
uint32  ,
uint32   
)
inlinevirtual
47{ return true; }

◆ IsDatabaseBound()

bool PetScript::IsDatabaseBound ( ) const
inlineoverridevirtual

Reimplemented from ScriptObject.

41{ return false; }

◆ OnCalculateMaxTalentPointsForLevel()

virtual void PetScript::OnCalculateMaxTalentPointsForLevel ( Pet ,
uint8  ,
uint8  
)
inlinevirtual
45{ }

◆ OnInitStatsForLevel()

virtual void PetScript::OnInitStatsForLevel ( Guardian ,
uint8   
)
inlinevirtual
43{ }

◆ OnPetAddToWorld()

virtual void PetScript::OnPetAddToWorld ( Pet )
inlinevirtual

This hook called after add pet in world.

Parameters
petContains information about the Pet
58{ }