TrinityCore
AuraScript Class Reference

#include <SpellScript.h>

Classes

class  AuraDispelHandler
 
class  AuraProcHandler
 
class  CheckAreaTargetHandler
 
class  CheckEffectProcHandler
 
class  CheckProcHandler
 
class  EffectAbsorbHandler
 
class  EffectAbsorbHealHandler
 
class  EffectApplyHandler
 
class  EffectBase
 
class  EffectCalcAmountHandler
 
class  EffectCalcCritChanceHandler
 
class  EffectCalcDamageAndHealingHandler
 
class  EffectCalcPeriodicHandler
 
class  EffectCalcSpellModHandler
 
class  EffectPeriodicHandler
 
class  EffectProcHandler
 
class  EffectUpdatePeriodicHandler
 
class  EnterLeaveCombatHandler
 
class  ScriptStateStore
 

Public Member Functions

 AuraScript ()
 
 ~AuraScript ()
 
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Aura *aura)
 
void _PrepareScriptCall (AuraScriptHookType hookType, AuraApplication const *aurApp=nullptr)
 
void _FinishScriptCall ()
 
bool _IsDefaultActionPrevented () const
 
void PreventDefaultAction ()
 
SpellInfo const * GetSpellInfo () const
 
SpellEffectInfo const & GetEffectInfo (SpellEffIndex effIndex) const
 
uint32 GetId () const
 
ObjectGuid GetCasterGUID () const
 
UnitGetCaster () const
 
GameObjectGetGObjCaster () const
 
WorldObjectGetOwner () const
 
UnitGetUnitOwner () const
 
DynamicObjectGetDynobjOwner () const
 
void Remove (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
AuraGetAura () const
 
AuraObjectType GetType () const
 
int32 GetDuration () const
 
void SetDuration (int32 duration, bool withMods=false)
 
void RefreshDuration ()
 
time_t GetApplyTime () const
 
int32 GetMaxDuration () const
 
void SetMaxDuration (int32 duration)
 
int32 CalcMaxDuration () const
 
bool IsExpired () const
 
bool IsPermanent () const
 
uint8 GetCharges () const
 
void SetCharges (uint8 charges)
 
uint8 CalcMaxCharges () const
 
bool ModCharges (int8 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool DropCharge (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
uint8 GetStackAmount () const
 
void SetStackAmount (uint8 num)
 
bool ModStackAmount (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool IsPassive () const
 
bool IsDeathPersistent () const
 
bool HasEffect (uint8 effIndex) const
 
AuraEffectGetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
UnitGetTarget () const
 
AuraApplication const * GetTargetApplication () const
 
Difficulty GetCastDifficulty () const
 
- Public Member Functions inherited from SpellScriptBase
 SpellScriptBase ()
 
virtual ~SpellScriptBase ()
 
 SpellScriptBase (SpellScriptBase const &right)=delete
 
 SpellScriptBase (SpellScriptBase &&right)=delete
 
SpellScriptBaseoperator= (SpellScriptBase const &right)=delete
 
SpellScriptBaseoperator= (SpellScriptBase &&right)=delete
 
void _Register ()
 
void _Unload ()
 
void _Init (std::string const &scriptname, uint32 spellId)
 
std::string_view GetScriptName () const
 
virtual void Register ()=0
 
virtual bool Validate (SpellInfo const *spellInfo)
 
virtual bool Load ()
 
virtual void Unload ()
 

Public Attributes

HookList< CheckAreaTargetHandlerDoCheckAreaTarget
 
HookList< AuraDispelHandlerOnDispel
 
HookList< AuraDispelHandlerAfterDispel
 
HookList< EffectApplyHandlerOnEffectApply
 
HookList< EffectApplyHandlerAfterEffectApply
 
HookList< EffectApplyHandlerOnEffectRemove
 
HookList< EffectApplyHandlerAfterEffectRemove
 
HookList< EffectPeriodicHandlerOnEffectPeriodic
 
HookList< EffectUpdatePeriodicHandlerOnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandlerDoEffectCalcAmount
 
HookList< EffectCalcPeriodicHandlerDoEffectCalcPeriodic
 
HookList< EffectCalcSpellModHandlerDoEffectCalcSpellMod
 
HookList< EffectCalcCritChanceHandlerDoEffectCalcCritChance
 
HookList< EffectCalcDamageAndHealingHandlerDoEffectCalcDamageAndHealing
 
HookList< EffectAbsorbHandlerOnEffectAbsorb
 
HookList< EffectAbsorbHandlerAfterEffectAbsorb
 
HookList< EffectAbsorbHealHandlerOnEffectAbsorbHeal
 
HookList< EffectAbsorbHealHandlerAfterEffectAbsorbHeal
 
HookList< EffectAbsorbHandlerOnEffectManaShield
 
HookList< EffectAbsorbHandlerAfterEffectManaShield
 
HookList< EffectAbsorbHandlerOnEffectSplit
 
HookList< CheckProcHandlerDoCheckProc
 
HookList< CheckEffectProcHandlerDoCheckEffectProc
 
HookList< AuraProcHandlerDoPrepareProc
 
HookList< AuraProcHandlerOnProc
 
HookList< AuraProcHandlerAfterProc
 
HookList< EffectProcHandlerOnEffectProc
 
HookList< EffectProcHandlerAfterEffectProc
 
HookList< EnterLeaveCombatHandlerOnEnterLeaveCombat
 

Private Types

typedef std::stack< ScriptStateStoreScriptStateStack
 

Private Attributes

Auram_aura
 
AuraApplication const * m_auraApplication
 
bool m_defaultActionPrevented
 
ScriptStateStack m_scriptStates
 

Additional Inherited Members

- Static Public Member Functions inherited from SpellScriptBase
static bool ValidateSpellInfo (std::initializer_list< uint32 > spellIds)
 
template<class T >
static bool ValidateSpellInfo (T const &spellIds)
 
static bool ValidateSpellEffect (std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
 
template<class T >
static bool ValidateSpellEffect (T const &spellEffects)
 
- Protected Types inherited from SpellScriptBase
template<typename ScriptFunc >
using GetScriptClass_t = typename GetScriptClass< ScriptFunc >::type
 
virtual bool _Validate (SpellInfo const *entry)
 
- Protected Attributes inherited from SpellScriptBase
uint8 m_currentScriptState
 
std::string_view m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Definition at line 1068 of file SpellScript.h.

Member Typedef Documentation

◆ ScriptStateStack

typedef std::stack<ScriptStateStore> AuraScript::ScriptStateStack
private

Definition at line 1996 of file SpellScript.h.

Constructor & Destructor Documentation

◆ AuraScript()

AuraScript::AuraScript ( )

Definition at line 915 of file SpellScript.cpp.

916{
917}
AuraApplication const * m_auraApplication
Definition: SpellScript.h:1983
bool m_defaultActionPrevented
Definition: SpellScript.h:1984
Aura * m_aura
Definition: SpellScript.h:1982

◆ ~AuraScript()

AuraScript::~AuraScript ( )
default

Member Function Documentation

◆ _FinishScriptCall()

void AuraScript::_FinishScriptCall ( )

Definition at line 938 of file SpellScript.cpp.

939{
940 ScriptStateStore stateStore = m_scriptStates.top();
941 m_currentScriptState = stateStore._currentScriptState;
942 m_auraApplication = stateStore._auraApplication;
943 m_defaultActionPrevented = stateStore._defaultActionPrevented;
944 m_scriptStates.pop();
945}
ScriptStateStack m_scriptStates
Definition: SpellScript.h:1997
uint8 m_currentScriptState
Definition: SpellScript.h:132
+ Here is the caller graph for this function:

◆ _IsDefaultActionPrevented()

bool AuraScript::_IsDefaultActionPrevented ( ) const

Definition at line 947 of file SpellScript.cpp.

948{
949 switch (m_currentScriptState)
950 {
960 default:
961 ABORT_MSG("AuraScript::_IsDefaultActionPrevented is called in a wrong place");
962 return false;
963 }
964}
#define ABORT_MSG
Definition: Errors.h:75
@ AURA_SCRIPT_HOOK_EFFECT_REMOVE
Definition: SpellScript.h:1034
@ AURA_SCRIPT_HOOK_PREPARE_PROC
Definition: SpellScript.h:1055
@ AURA_SCRIPT_HOOK_PROC
Definition: SpellScript.h:1056
@ AURA_SCRIPT_HOOK_EFFECT_APPLY
Definition: SpellScript.h:1032
@ AURA_SCRIPT_HOOK_EFFECT_PERIODIC
Definition: SpellScript.h:1036
@ AURA_SCRIPT_HOOK_EFFECT_ABSORB
Definition: SpellScript.h:1043
@ AURA_SCRIPT_HOOK_EFFECT_PROC
Definition: SpellScript.h:1057
@ AURA_SCRIPT_HOOK_EFFECT_SPLIT
Definition: SpellScript.h:1047

◆ _Load()

bool AuraScript::_Load ( Aura aura)

Definition at line 921 of file SpellScript.cpp.

922{
923 m_aura = aura;
925 bool load = Load();
927 return load;
928}
AuraScriptHookType
Definition: SpellScript.h:1031
@ SPELL_SCRIPT_STATE_LOADING
Definition: SpellScript.h:65
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const *aurApp=nullptr)
void _FinishScriptCall()
virtual bool Load()
Definition: SpellScript.h:157
+ Here is the call graph for this function:

◆ _PrepareScriptCall()

void AuraScript::_PrepareScriptCall ( AuraScriptHookType  hookType,
AuraApplication const *  aurApp = nullptr 
)

Definition at line 930 of file SpellScript.cpp.

931{
933 m_currentScriptState = hookType;
935 m_auraApplication = aurApp;
936}
+ Here is the caller graph for this function:

◆ _Validate()

bool AuraScript::_Validate ( SpellInfo const *  entry)
overridevirtual

Reimplemented from SpellScriptBase.

Definition at line 776 of file SpellScript.cpp.

777{
778 for (auto itr = DoCheckAreaTarget.begin(); itr != DoCheckAreaTarget.end(); ++itr)
779 if (!entry->HasAreaAuraEffect() && !entry->HasEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA) && !entry->HasEffect(SPELL_EFFECT_APPLY_AURA))
780 TC_LOG_ERROR("scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName);
781
782 for (auto itr = OnDispel.begin(); itr != OnDispel.end(); ++itr)
783 if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
784 TC_LOG_ERROR("scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName);
785
786 for (auto itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr)
787 if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
788 TC_LOG_ERROR("scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName);
789
790 for (auto itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr)
791 if (!itr->GetAffectedEffectsMask(entry))
792 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
793
794 for (auto itr = OnEffectRemove.begin(); itr != OnEffectRemove.end(); ++itr)
795 if (!itr->GetAffectedEffectsMask(entry))
796 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
797
798 for (auto itr = AfterEffectApply.begin(); itr != AfterEffectApply.end(); ++itr)
799 if (!itr->GetAffectedEffectsMask(entry))
800 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
801
802 for (auto itr = AfterEffectRemove.begin(); itr != AfterEffectRemove.end(); ++itr)
803 if (!itr->GetAffectedEffectsMask(entry))
804 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
805
806 for (auto itr = OnEffectPeriodic.begin(); itr != OnEffectPeriodic.end(); ++itr)
807 if (!itr->GetAffectedEffectsMask(entry))
808 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
809
810 for (auto itr = OnEffectUpdatePeriodic.begin(); itr != OnEffectUpdatePeriodic.end(); ++itr)
811 if (!itr->GetAffectedEffectsMask(entry))
812 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
813
814 for (auto itr = DoEffectCalcAmount.begin(); itr != DoEffectCalcAmount.end(); ++itr)
815 if (!itr->GetAffectedEffectsMask(entry))
816 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
817
818 for (auto itr = DoEffectCalcPeriodic.begin(); itr != DoEffectCalcPeriodic.end(); ++itr)
819 if (!itr->GetAffectedEffectsMask(entry))
820 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
821
822 for (auto itr = DoEffectCalcSpellMod.begin(); itr != DoEffectCalcSpellMod.end(); ++itr)
823 if (!itr->GetAffectedEffectsMask(entry))
824 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
825
826 for (auto itr = DoEffectCalcCritChance.begin(); itr != DoEffectCalcCritChance.end(); ++itr)
827 if (!itr->GetAffectedEffectsMask(entry))
828 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcCritChance` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
829
830 for (EffectCalcDamageAndHealingHandler const& hook : DoEffectCalcDamageAndHealing)
831 if (!hook.GetAffectedEffectsMask(entry))
832 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcDamageAndHealing` of AuraScript won't be executed", entry->Id, hook.ToString(), m_scriptName);
833
834 for (auto itr = OnEffectAbsorb.begin(); itr != OnEffectAbsorb.end(); ++itr)
835 if (!itr->GetAffectedEffectsMask(entry))
836 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
837
838 for (auto itr = AfterEffectAbsorb.begin(); itr != AfterEffectAbsorb.end(); ++itr)
839 if (!itr->GetAffectedEffectsMask(entry))
840 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
841
842 for (auto itr = OnEffectManaShield.begin(); itr != OnEffectManaShield.end(); ++itr)
843 if (!itr->GetAffectedEffectsMask(entry))
844 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
845
846 for (auto itr = AfterEffectManaShield.begin(); itr != AfterEffectManaShield.end(); ++itr)
847 if (!itr->GetAffectedEffectsMask(entry))
848 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
849
850 for (auto itr = OnEffectSplit.begin(); itr != OnEffectSplit.end(); ++itr)
851 if (!itr->GetAffectedEffectsMask(entry))
852 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
853
854 for (auto itr = DoCheckProc.begin(); itr != DoCheckProc.end(); ++itr)
855 if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
856 TC_LOG_ERROR("scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName);
857
858 for (auto itr = DoCheckEffectProc.begin(); itr != DoCheckEffectProc.end(); ++itr)
859 if (!itr->GetAffectedEffectsMask(entry))
860 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoCheckEffectProc` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
861
862 for (auto itr = DoPrepareProc.begin(); itr != DoPrepareProc.end(); ++itr)
863 if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
864 TC_LOG_ERROR("scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->Id, m_scriptName);
865
866 for (auto itr = OnProc.begin(); itr != OnProc.end(); ++itr)
867 if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
868 TC_LOG_ERROR("scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->Id, m_scriptName);
869
870 for (auto itr = AfterProc.begin(); itr != AfterProc.end(); ++itr)
871 if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
872 TC_LOG_ERROR("scripts", "Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->Id, m_scriptName);
873
874 for (auto itr = OnEffectProc.begin(); itr != OnEffectProc.end(); ++itr)
875 if (!itr->GetAffectedEffectsMask(entry))
876 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
877
878 for (auto itr = AfterEffectProc.begin(); itr != AfterEffectProc.end(); ++itr)
879 if (!itr->GetAffectedEffectsMask(entry))
880 TC_LOG_ERROR("scripts", "Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->Id, itr->ToString(), m_scriptName);
881
882 return SpellScriptBase::_Validate(entry);
883}
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:165
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
@ SPELL_EFFECT_APPLY_AURA
HookList< EffectAbsorbHandler > OnEffectManaShield
Definition: SpellScript.h:2112
HookList< EffectCalcDamageAndHealingHandler > DoEffectCalcDamageAndHealing
Definition: SpellScript.h:2082
HookList< EffectCalcPeriodicHandler > DoEffectCalcPeriodic
Definition: SpellScript.h:2063
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:2039
HookList< CheckEffectProcHandler > DoCheckEffectProc
Definition: SpellScript.h:2135
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
HookList< EffectProcHandler > AfterEffectProc
Definition: SpellScript.h:2159
HookList< EffectAbsorbHandler > AfterEffectAbsorb
Definition: SpellScript.h:2096
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Definition: SpellScript.h:2057
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
Definition: SpellScript.h:2051
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
Definition: SpellScript.h:2069
HookList< EffectAbsorbHandler > OnEffectAbsorb
Definition: SpellScript.h:2089
HookList< EffectCalcCritChanceHandler > DoEffectCalcCritChance
Definition: SpellScript.h:2075
HookList< EffectAbsorbHandler > AfterEffectManaShield
Definition: SpellScript.h:2118
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
Definition: SpellScript.h:2007
HookList< AuraProcHandler > AfterProc
Definition: SpellScript.h:2149
HookList< AuraDispelHandler > OnDispel
Definition: SpellScript.h:2013
HookList< CheckProcHandler > DoCheckProc
Definition: SpellScript.h:2129
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:2035
HookList< AuraDispelHandler > AfterDispel
Definition: SpellScript.h:2017
HookList< EffectProcHandler > OnEffectProc
Definition: SpellScript.h:2155
HookList< AuraProcHandler > DoPrepareProc
Definition: SpellScript.h:2141
HookList< AuraProcHandler > OnProc
Definition: SpellScript.h:2145
HookList< EffectApplyHandler > OnEffectApply
Definition: SpellScript.h:2024
HookList< EffectAbsorbHandler > OnEffectSplit
Definition: SpellScript.h:2123
std::string_view m_scriptName
Definition: SpellScript.h:133
virtual bool _Validate(SpellInfo const *entry)
Definition: SpellScript.cpp:28
+ Here is the call graph for this function:

◆ CalcMaxCharges()

uint8 AuraScript::CalcMaxCharges ( ) const

Definition at line 1105 of file SpellScript.cpp.

1106{
1107 return m_aura->CalcMaxCharges();
1108}
uint8 CalcMaxCharges(Unit *caster) const
Definition: SpellAuras.cpp:958
+ Here is the call graph for this function:

◆ CalcMaxDuration()

int32 AuraScript::CalcMaxDuration ( ) const

Definition at line 1080 of file SpellScript.cpp.

1081{
1082 return m_aura->CalcMaxDuration();
1083}
int32 CalcMaxDuration() const
Definition: SpellAuras.h:169
+ Here is the call graph for this function:

◆ DropCharge()

bool AuraScript::DropCharge ( AuraRemoveMode  removeMode = AURA_REMOVE_BY_DEFAULT)

Definition at line 1115 of file SpellScript.cpp.

1116{
1117 return m_aura->DropCharge(removeMode);
1118}
bool DropCharge(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: SpellAuras.h:184
+ Here is the call graph for this function:

◆ GetApplyTime()

time_t AuraScript::GetApplyTime ( ) const

Definition at line 1065 of file SpellScript.cpp.

1066{
1067 return m_aura->GetApplyTime();
1068}
time_t GetApplyTime() const
Definition: SpellAuras.h:166
+ Here is the call graph for this function:

◆ GetAura()

Aura * AuraScript::GetAura ( ) const

Definition at line 1040 of file SpellScript.cpp.

1041{
1042 return m_aura;
1043}
+ Here is the caller graph for this function:

◆ GetCastDifficulty()

Difficulty AuraScript::GetCastDifficulty ( ) const

Definition at line 1197 of file SpellScript.cpp.

1198{
1199 return GetAura()->GetCastDifficulty();
1200}
Aura * GetAura() const
Difficulty GetCastDifficulty() const
Definition: SpellAuras.h:135
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCaster()

Unit * AuraScript::GetCaster ( ) const

Definition at line 1006 of file SpellScript.cpp.

1007{
1008 if (WorldObject* caster = m_aura->GetCaster())
1009 return caster->ToUnit();
1010 return nullptr;
1011}
Unit * GetCaster() const
Definition: SpellAuras.cpp:513
+ Here is the call graph for this function:

◆ GetCasterGUID()

ObjectGuid AuraScript::GetCasterGUID ( ) const

Definition at line 1001 of file SpellScript.cpp.

1002{
1003 return m_aura->GetCasterGUID();
1004}
ObjectGuid GetCasterGUID() const
Definition: SpellAuras.h:138
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCharges()

uint8 AuraScript::GetCharges ( ) const

Definition at line 1095 of file SpellScript.cpp.

1096{
1097 return m_aura->GetCharges();
1098}
uint8 GetCharges() const
Definition: SpellAuras.h:179
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDuration()

int32 AuraScript::GetDuration ( ) const

Definition at line 1050 of file SpellScript.cpp.

1051{
1052 return m_aura->GetDuration();
1053}
int32 GetDuration() const
Definition: SpellAuras.h:172
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDynobjOwner()

DynamicObject * AuraScript::GetDynobjOwner ( ) const

Definition at line 1030 of file SpellScript.cpp.

1031{
1032 return m_aura->GetDynobjOwner();
1033}
DynamicObject * GetDynobjOwner() const
Definition: SpellAuras.h:147
+ Here is the call graph for this function:

◆ GetEffect()

AuraEffect * AuraScript::GetEffect ( uint8  effIndex) const

Definition at line 1150 of file SpellScript.cpp.

1151{
1152 return m_aura->GetEffect(effIndex);
1153}
AuraEffect * GetEffect(uint32 index) const
Definition: SpellAuras.cpp:529
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEffectInfo()

SpellEffectInfo const & AuraScript::GetEffectInfo ( SpellEffIndex  effIndex) const

Definition at line 991 of file SpellScript.cpp.

992{
993 return m_aura->GetSpellInfo()->GetEffect(effIndex);
994}
SpellInfo const * GetSpellInfo() const
Definition: SpellAuras.h:133
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:577
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGObjCaster()

GameObject * AuraScript::GetGObjCaster ( ) const

Definition at line 1013 of file SpellScript.cpp.

1014{
1015 if (WorldObject* caster = m_aura->GetCaster())
1016 return caster->ToGameObject();
1017 return nullptr;
1018}
+ Here is the call graph for this function:

◆ GetId()

uint32 AuraScript::GetId ( ) const

Definition at line 996 of file SpellScript.cpp.

997{
998 return m_aura->GetId();
999}
uint32 GetId() const
Definition: SpellAuras.h:134
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMaxDuration()

int32 AuraScript::GetMaxDuration ( ) const

Definition at line 1070 of file SpellScript.cpp.

1071{
1072 return m_aura->GetMaxDuration();
1073}
int32 GetMaxDuration() const
Definition: SpellAuras.h:167
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetOwner()

WorldObject * AuraScript::GetOwner ( ) const

Definition at line 1020 of file SpellScript.cpp.

1021{
1022 return m_aura->GetOwner();
1023}
WorldObject * GetOwner() const
Definition: SpellAuras.h:145
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSpellInfo()

SpellInfo const * AuraScript::GetSpellInfo ( ) const

Definition at line 986 of file SpellScript.cpp.

987{
988 return m_aura->GetSpellInfo();
989}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetStackAmount()

uint8 AuraScript::GetStackAmount ( ) const

Definition at line 1120 of file SpellScript.cpp.

1121{
1122 return m_aura->GetStackAmount();
1123}
uint8 GetStackAmount() const
Definition: SpellAuras.h:188
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTarget()

Unit * AuraScript::GetTarget ( ) const

Definition at line 1160 of file SpellScript.cpp.

1161{
1162 switch (m_currentScriptState)
1163 {
1184 return m_auraApplication->GetTarget();
1185 default:
1186 TC_LOG_ERROR("scripts", "Script: `{}` Spell: `{}` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName, m_scriptSpellId);
1187 }
1188
1189 return nullptr;
1190}
@ AURA_SCRIPT_HOOK_CHECK_EFFECT_PROC
Definition: SpellScript.h:1054
@ AURA_SCRIPT_HOOK_EFFECT_CALC_DAMAGE_AND_HEALING
Definition: SpellScript.h:1042
@ AURA_SCRIPT_HOOK_EFFECT_CALC_CRIT_CHANCE
Definition: SpellScript.h:1041
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD
Definition: SpellScript.h:1046
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_APPLY
Definition: SpellScript.h:1033
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_REMOVE
Definition: SpellScript.h:1035
@ AURA_SCRIPT_HOOK_AFTER_PROC
Definition: SpellScript.h:1059
@ AURA_SCRIPT_HOOK_EFFECT_MANASHIELD
Definition: SpellScript.h:1045
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB
Definition: SpellScript.h:1044
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC
Definition: SpellScript.h:1058
@ AURA_SCRIPT_HOOK_CHECK_PROC
Definition: SpellScript.h:1053
@ AURA_SCRIPT_HOOK_ENTER_LEAVE_COMBAT
Definition: SpellScript.h:1051
Unit * GetTarget() const
Definition: SpellAuras.h:76
uint32 m_scriptSpellId
Definition: SpellScript.h:134
+ Here is the call graph for this function:

◆ GetTargetApplication()

AuraApplication const * AuraScript::GetTargetApplication ( ) const

Definition at line 1192 of file SpellScript.cpp.

1193{
1194 return m_auraApplication;
1195}
+ Here is the caller graph for this function:

◆ GetType()

AuraObjectType AuraScript::GetType ( ) const

Definition at line 1045 of file SpellScript.cpp.

1046{
1047 return m_aura->GetType();
1048}
AuraObjectType GetType() const
Definition: SpellAuras.cpp:537
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetUnitOwner()

Unit * AuraScript::GetUnitOwner ( ) const

Definition at line 1025 of file SpellScript.cpp.

1026{
1027 return m_aura->GetUnitOwner();
1028}
Unit * GetUnitOwner() const
Definition: SpellAuras.h:146
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasEffect()

bool AuraScript::HasEffect ( uint8  effIndex) const

Definition at line 1145 of file SpellScript.cpp.

1146{
1147 return m_aura->HasEffect(effIndex);
1148}
bool HasEffect(uint8 effIndex) const
Definition: SpellAuras.h:224
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasEffectType()

bool AuraScript::HasEffectType ( AuraType  type) const

Definition at line 1155 of file SpellScript.cpp.

1156{
1157 return m_aura->HasEffectType(type);
1158}
bool HasEffectType(AuraType type) const
+ Here is the call graph for this function:

◆ IsDeathPersistent()

bool AuraScript::IsDeathPersistent ( ) const

Definition at line 1140 of file SpellScript.cpp.

1141{
1142 return m_aura->IsDeathPersistent();
1143}
bool IsDeathPersistent() const
+ Here is the call graph for this function:

◆ IsExpired()

bool AuraScript::IsExpired ( ) const

Definition at line 1085 of file SpellScript.cpp.

1086{
1087 return m_aura->IsExpired();
1088}
bool IsExpired() const
Definition: SpellAuras.h:176
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsPassive()

bool AuraScript::IsPassive ( ) const

Definition at line 1135 of file SpellScript.cpp.

1136{
1137 return m_aura->IsPassive();
1138}
bool IsPassive() const
+ Here is the call graph for this function:

◆ IsPermanent()

bool AuraScript::IsPermanent ( ) const

Definition at line 1090 of file SpellScript.cpp.

1091{
1092 return m_aura->IsPermanent();
1093}
bool IsPermanent() const
Definition: SpellAuras.h:177
+ Here is the call graph for this function:

◆ ModCharges()

bool AuraScript::ModCharges ( int8  num,
AuraRemoveMode  removeMode = AURA_REMOVE_BY_DEFAULT 
)

Definition at line 1110 of file SpellScript.cpp.

1111{
1112 return m_aura->ModCharges(num, removeMode);
1113}
bool ModCharges(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: SpellAuras.cpp:971
+ Here is the call graph for this function:

◆ ModStackAmount()

bool AuraScript::ModStackAmount ( int32  num,
AuraRemoveMode  removeMode = AURA_REMOVE_BY_DEFAULT 
)

Definition at line 1130 of file SpellScript.cpp.

1131{
1132 return m_aura->ModStackAmount(num, removeMode);
1133}
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool resetPeriodicTimer=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PreventDefaultAction()

void AuraScript::PreventDefaultAction ( )

Definition at line 966 of file SpellScript.cpp.

967{
968 switch (m_currentScriptState)
969 {
979 break;
980 default:
981 TC_LOG_ERROR("scripts", "Script: `{}` Spell: `{}` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName, m_scriptSpellId);
982 break;
983 }
984}

◆ RefreshDuration()

void AuraScript::RefreshDuration ( )

Definition at line 1060 of file SpellScript.cpp.

1061{
1063}
void RefreshDuration(bool withMods=false)
Definition: SpellAuras.cpp:901
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Remove()

void AuraScript::Remove ( AuraRemoveMode  removeMode = AURA_REMOVE_BY_DEFAULT)

Definition at line 1035 of file SpellScript.cpp.

1036{
1037 m_aura->Remove(removeMode);
1038}
virtual void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)=0
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCharges()

void AuraScript::SetCharges ( uint8  charges)

Definition at line 1100 of file SpellScript.cpp.

1101{
1102 m_aura->SetCharges(charges);
1103}
void SetCharges(uint8 charges)
Definition: SpellAuras.cpp:948
+ Here is the call graph for this function:

◆ SetDuration()

void AuraScript::SetDuration ( int32  duration,
bool  withMods = false 
)

Definition at line 1055 of file SpellScript.cpp.

1056{
1057 m_aura->SetDuration(duration, withMods);
1058}
void SetDuration(int32 duration, bool withMods=false)
Definition: SpellAuras.cpp:890
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetMaxDuration()

void AuraScript::SetMaxDuration ( int32  duration)

Definition at line 1075 of file SpellScript.cpp.

1076{
1077 m_aura->SetMaxDuration(duration);
1078}
void SetMaxDuration(int32 duration)
Definition: SpellAuras.h:168
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetStackAmount()

void AuraScript::SetStackAmount ( uint8  num)

Definition at line 1125 of file SpellScript.cpp.

1126{
1127 m_aura->SetStackAmount(num);
1128}
void SetStackAmount(uint8 num)
+ Here is the call graph for this function:

Member Data Documentation

◆ AfterDispel

HookList<AuraDispelHandler> AuraScript::AfterDispel

Definition at line 2017 of file SpellScript.h.

◆ AfterEffectAbsorb

HookList<EffectAbsorbHandler> AuraScript::AfterEffectAbsorb

Definition at line 2096 of file SpellScript.h.

◆ AfterEffectAbsorbHeal

HookList<EffectAbsorbHealHandler> AuraScript::AfterEffectAbsorbHeal

Definition at line 2107 of file SpellScript.h.

◆ AfterEffectApply

HookList<EffectApplyHandler> AuraScript::AfterEffectApply

Definition at line 2028 of file SpellScript.h.

◆ AfterEffectManaShield

HookList<EffectAbsorbHandler> AuraScript::AfterEffectManaShield

Definition at line 2118 of file SpellScript.h.

◆ AfterEffectProc

HookList<EffectProcHandler> AuraScript::AfterEffectProc

Definition at line 2159 of file SpellScript.h.

◆ AfterEffectRemove

HookList<EffectApplyHandler> AuraScript::AfterEffectRemove

Definition at line 2039 of file SpellScript.h.

◆ AfterProc

HookList<AuraProcHandler> AuraScript::AfterProc

Definition at line 2149 of file SpellScript.h.

◆ DoCheckAreaTarget

HookList<CheckAreaTargetHandler> AuraScript::DoCheckAreaTarget

Definition at line 2007 of file SpellScript.h.

◆ DoCheckEffectProc

HookList<CheckEffectProcHandler> AuraScript::DoCheckEffectProc

Definition at line 2135 of file SpellScript.h.

◆ DoCheckProc

HookList<CheckProcHandler> AuraScript::DoCheckProc

Definition at line 2129 of file SpellScript.h.

◆ DoEffectCalcAmount

HookList<EffectCalcAmountHandler> AuraScript::DoEffectCalcAmount

Definition at line 2057 of file SpellScript.h.

◆ DoEffectCalcCritChance

HookList<EffectCalcCritChanceHandler> AuraScript::DoEffectCalcCritChance

Definition at line 2075 of file SpellScript.h.

◆ DoEffectCalcDamageAndHealing

HookList<EffectCalcDamageAndHealingHandler> AuraScript::DoEffectCalcDamageAndHealing

Definition at line 2082 of file SpellScript.h.

◆ DoEffectCalcPeriodic

HookList<EffectCalcPeriodicHandler> AuraScript::DoEffectCalcPeriodic

Definition at line 2063 of file SpellScript.h.

◆ DoEffectCalcSpellMod

HookList<EffectCalcSpellModHandler> AuraScript::DoEffectCalcSpellMod

Definition at line 2069 of file SpellScript.h.

◆ DoPrepareProc

HookList<AuraProcHandler> AuraScript::DoPrepareProc

Definition at line 2141 of file SpellScript.h.

◆ m_aura

Aura* AuraScript::m_aura
private

Definition at line 1982 of file SpellScript.h.

◆ m_auraApplication

AuraApplication const* AuraScript::m_auraApplication
private

Definition at line 1983 of file SpellScript.h.

◆ m_defaultActionPrevented

bool AuraScript::m_defaultActionPrevented
private

Definition at line 1984 of file SpellScript.h.

◆ m_scriptStates

ScriptStateStack AuraScript::m_scriptStates
private

Definition at line 1997 of file SpellScript.h.

◆ OnDispel

HookList<AuraDispelHandler> AuraScript::OnDispel

Definition at line 2013 of file SpellScript.h.

◆ OnEffectAbsorb

HookList<EffectAbsorbHandler> AuraScript::OnEffectAbsorb

Definition at line 2089 of file SpellScript.h.

◆ OnEffectAbsorbHeal

HookList<EffectAbsorbHealHandler> AuraScript::OnEffectAbsorbHeal

Definition at line 2101 of file SpellScript.h.

◆ OnEffectApply

HookList<EffectApplyHandler> AuraScript::OnEffectApply

Definition at line 2024 of file SpellScript.h.

◆ OnEffectManaShield

HookList<EffectAbsorbHandler> AuraScript::OnEffectManaShield

Definition at line 2112 of file SpellScript.h.

◆ OnEffectPeriodic

HookList<EffectPeriodicHandler> AuraScript::OnEffectPeriodic

Definition at line 2045 of file SpellScript.h.

◆ OnEffectProc

HookList<EffectProcHandler> AuraScript::OnEffectProc

Definition at line 2155 of file SpellScript.h.

◆ OnEffectRemove

HookList<EffectApplyHandler> AuraScript::OnEffectRemove

Definition at line 2035 of file SpellScript.h.

◆ OnEffectSplit

HookList<EffectAbsorbHandler> AuraScript::OnEffectSplit

Definition at line 2123 of file SpellScript.h.

◆ OnEffectUpdatePeriodic

HookList<EffectUpdatePeriodicHandler> AuraScript::OnEffectUpdatePeriodic

Definition at line 2051 of file SpellScript.h.

◆ OnEnterLeaveCombat

HookList<EnterLeaveCombatHandler> AuraScript::OnEnterLeaveCombat

Definition at line 2165 of file SpellScript.h.

◆ OnProc

HookList<AuraProcHandler> AuraScript::OnProc

Definition at line 2145 of file SpellScript.h.


The documentation for this class was generated from the following files: