TrinityCore
Loading...
Searching...
No Matches
spell_yogg_saron_empowered::spell_yogg_saron_empowered_AuraScript Class Reference

Private Member Functions

bool Validate (SpellInfo const *) override
 
void OnApply (AuraEffect const *, AuraEffectHandleModes)
 
void OnPeriodic (AuraEffect const *)
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from AuraScript
 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 ()
 
- 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)
 
- Public Attributes inherited from AuraScript
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
 
- 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 2497 of file boss_yogg_saron.cpp.

Member Function Documentation

◆ OnApply()

void spell_yogg_saron_empowered::spell_yogg_saron_empowered_AuraScript::OnApply ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inlineprivate

Definition at line 2504 of file boss_yogg_saron.cpp.

2505 {
2507 args.AddSpellMod(SPELLVALUE_AURA_STACK, 9);
2509 }
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
Definition: SpellDefines.h:266
@ SPELLVALUE_AURA_STACK
Definition: SpellDefines.h:231
@ SPELL_EMPOWERED_BUFF
Unit * GetTarget() const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2883
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OnPeriodic()

void spell_yogg_saron_empowered::spell_yogg_saron_empowered_AuraScript::OnPeriodic ( AuraEffect const *  )
inlineprivate

Definition at line 2511 of file boss_yogg_saron.cpp.

2512 {
2513 Unit* target = GetTarget();
2514 float stack = std::ceil((target->GetHealthPct() / 10) - 1);
2516
2517 if (stack)
2518 {
2521 args.AddSpellMod(SPELLVALUE_AURA_STACK, stack);
2522 target->CastSpell(target, SPELL_EMPOWERED_BUFF, args);
2523 }
2524 else if (!target->HealthAbovePct(1) && !target->HasAura(SPELL_WEAKENED))
2525 target->CastSpell(target, SPELL_WEAKENED, true);
2526 }
@ SPELL_WEAKENED
Definition: Unit.h:747
bool HealthAbovePct(int32 pct) const
Definition: Unit.h:902
float GetHealthPct() const
Definition: Unit.h:904
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4573
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3740
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Register()

void spell_yogg_saron_empowered::spell_yogg_saron_empowered_AuraScript::Register ( )
inlineoverrideprivatevirtual

Implements SpellScriptBase.

Definition at line 2528 of file boss_yogg_saron.cpp.

2529 {
2532 }
@ EFFECT_0
Definition: SharedDefines.h:30
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DUMMY
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:2028
void OnApply(AuraEffect const *, AuraEffectHandleModes)
+ Here is the call graph for this function:

◆ Validate()

bool spell_yogg_saron_empowered::spell_yogg_saron_empowered_AuraScript::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Reimplemented from SpellScriptBase.

Definition at line 2499 of file boss_yogg_saron.cpp.

2500 {
2502 }
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition: SpellScript.h:162
+ Here is the call graph for this function:

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