AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
spell_halion_marks_aura Class Reference
Inheritance diagram for spell_halion_marks_aura:
AuraScript _SpellScript

Public Member Functions

 spell_halion_marks_aura (uint32 summonSpell, uint32 removeSpell)
 
void BeforeDispel (DispelInfo *dispelData)
 
void OnRemove (AuraEffect const *, AuraEffectHandleModes)
 
void Register () override
 
- Public Member Functions inherited from AuraScript
 AuraScript ()
 
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Aura *aura)
 
void _PrepareScriptCall (AuraScriptHookType hookType, AuraApplication const *aurApp=nullptr)
 
void _FinishScriptCall ()
 
bool _IsDefaultActionPrevented ()
 
void PreventDefaultAction ()
 
SpellInfo const * GetSpellInfo () const
 
uint32 GetId () const
 
ObjectGuid GetCasterGUID () const
 
UnitGetCaster () const
 
WorldObjectGetOwner () const
 
UnitGetUnitOwner () const
 
DynamicObjectGetDynobjOwner () const
 
void Remove (uint32 removeMode=0)
 
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
 
- Public Member Functions inherited from _SpellScript
 _SpellScript ()
 
virtual ~_SpellScript ()
 
virtual void _Register ()
 
virtual void _Unload ()
 
virtual void _Init (std::string const *scriptname, uint32 spellId)
 
std::string const * _GetScriptName () const
 
virtual void Register ()=0
 
virtual bool Validate (SpellInfo const *)
 
virtual bool Load ()
 
virtual void Unload ()
 

Private Member Functions

 PrepareAuraScript (spell_halion_marks_aura)
 

Private Attributes

uint32 _summonSpellId
 
uint32 _removeSpellId
 

Additional Inherited Members

- Static Public Member Functions inherited from _SpellScript
static bool ValidateSpellInfo (std::initializer_list< uint32 > spellIds)
 
template<class T >
static bool ValidateSpellInfo (T const &spellIds)
 
- 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< EffectAbsorbHandlerOnEffectAbsorb
 
HookList< EffectAbsorbHandlerAfterEffectAbsorb
 
HookList< EffectManaShieldHandlerOnEffectManaShield
 
HookList< EffectManaShieldHandlerAfterEffectManaShield
 
HookList< EffectSplitHandlerOnEffectSplit
 
HookList< CheckProcHandlerDoCheckProc
 
HookList< AfterCheckProcHandlerDoAfterCheckProc
 
HookList< AuraProcHandlerDoPrepareProc
 
HookList< AuraProcHandlerOnProc
 
HookList< AuraProcHandlerAfterProc
 
HookList< EffectProcHandlerOnEffectProc
 
HookList< EffectProcHandlerAfterEffectProc
 
virtual bool _Validate (SpellInfo const *entry)
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Constructor & Destructor Documentation

◆ spell_halion_marks_aura()

spell_halion_marks_aura::spell_halion_marks_aura ( uint32  summonSpell,
uint32  removeSpell 
)
inline
936: AuraScript(), _summonSpellId(summonSpell), _removeSpellId(removeSpell) { }
AuraScript()
Definition: SpellScript.h:688
uint32 _summonSpellId
Definition: boss_halion.cpp:965
uint32 _removeSpellId
Definition: boss_halion.cpp:966

Member Function Documentation

◆ BeforeDispel()

void spell_halion_marks_aura::BeforeDispel ( DispelInfo dispelData)
inline
939 {
940 dispelData->SetRemovedCharges(0);
941
942 if (Unit* dispelledUnit = GetUnitOwner())
943 if (dispelledUnit->HasAura(_removeSpellId))
944 dispelledUnit->RemoveAurasDueToSpell(_removeSpellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_EXPIRE);
945 }
@ AURA_REMOVE_BY_EXPIRE
Definition: SpellAuraDefines.h:395
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
void SetRemovedCharges(uint8 amount)
Definition: Unit.h:304
Definition: Unit.h:630
Unit * GetUnitOwner() const
Definition: SpellScript.cpp:1030

References _removeSpellId, AURA_REMOVE_BY_EXPIRE, ObjectGuid::Empty, AuraScript::GetUnitOwner(), and DispelInfo::SetRemovedCharges().

Referenced by Register().

◆ OnRemove()

void spell_halion_marks_aura::OnRemove ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inline
948 {
949 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
950 return;
951
952 if (!GetTarget()->GetInstanceScript() || !GetTarget()->GetInstanceScript()->IsEncounterInProgress() || GetTarget()->GetMapId() != 724)
953 return;
954
956 }
@ SPELLVALUE_BASE_POINT1
Definition: SpellDefines.h:115
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition: SpellDefines.h:148
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1225
AuraApplication const * GetTargetApplication() const
Definition: SpellScript.cpp:1194
Aura * GetAura() const
Definition: SpellScript.cpp:1045
Unit * GetTarget() const
Definition: SpellScript.cpp:1165
ObjectGuid GetCasterGUID() const
Definition: SpellScript.cpp:1015
uint8 GetStackAmount() const
Definition: SpellScript.cpp:1125

References _summonSpellId, AURA_REMOVE_BY_EXPIRE, Unit::CastCustomSpell(), AuraScript::GetAura(), AuraScript::GetCasterGUID(), AuraScript::GetStackAmount(), AuraScript::GetTarget(), AuraScript::GetTargetApplication(), SPELLVALUE_BASE_POINT1, and TRIGGERED_FULL_MASK.

Referenced by Register().

◆ PrepareAuraScript()

spell_halion_marks_aura::PrepareAuraScript ( spell_halion_marks_aura  )
private

◆ Register()

void spell_halion_marks_aura::Register ( )
inlineoverridevirtual

Implements _SpellScript.

959 {
962 }
@ SPELL_AURA_DUMMY
Definition: SpellAuraDefines.h:67
@ AURA_EFFECT_HANDLE_REAL
Definition: SpellAuraDefines.h:42
#define AuraDispelFn(F)
Definition: SpellScript.h:732
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:754
@ EFFECT_0
Definition: SharedDefines.h:31
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:753
HookList< AuraDispelHandler > OnDispel
Definition: SpellScript.h:727
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
Definition: boss_halion.cpp:947
void BeforeDispel(DispelInfo *dispelData)
Definition: boss_halion.cpp:938

References AuraScript::AfterEffectRemove, AURA_EFFECT_HANDLE_REAL, AuraDispelFn, AuraEffectRemoveFn, BeforeDispel(), EFFECT_0, AuraScript::OnDispel, OnRemove(), and SPELL_AURA_DUMMY.

Member Data Documentation

◆ _removeSpellId

uint32 spell_halion_marks_aura::_removeSpellId
private

Referenced by BeforeDispel().

◆ _summonSpellId

uint32 spell_halion_marks_aura::_summonSpellId
private

Referenced by OnRemove().