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

Public Member Functions

 spell_halion_marks_AuraScript (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 ()
 

Public Attributes

uint32 _summonSpellId
 
uint32 _removeSpellId
 
- 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
 

Private Member Functions

 PrepareAuraScript (spell_halion_marks_AuraScript)
 

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)
 
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_AuraScript()

spell_halion_marks::spell_halion_marks_AuraScript::spell_halion_marks_AuraScript ( uint32  summonSpell,
uint32  removeSpell 
)
inline
987: AuraScript(), _summonSpellId(summonSpell), _removeSpellId(removeSpell) { }
AuraScript()
Definition: SpellScript.h:688
uint32 _removeSpellId
Definition: boss_halion.cpp:1016
uint32 _summonSpellId
Definition: boss_halion.cpp:1015

Member Function Documentation

◆ BeforeDispel()

void spell_halion_marks::spell_halion_marks_AuraScript::BeforeDispel ( DispelInfo dispelData)
inline
990 {
991 dispelData->SetRemovedCharges(0);
992
993 if (Unit* dispelledUnit = GetUnitOwner())
994 if (dispelledUnit->HasAura(_removeSpellId))
995 dispelledUnit->RemoveAurasDueToSpell(_removeSpellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_EXPIRE);
996 }
@ AURA_REMOVE_BY_EXPIRE
Definition: SpellAuraDefines.h:395
static ObjectGuid const Empty
Definition: ObjectGuid.h:122
void SetRemovedCharges(uint8 amount)
Definition: Unit.h:735
Definition: Unit.h:1290
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::spell_halion_marks_AuraScript::OnRemove ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inline
999 {
1000 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
1001 return;
1002
1003 if (!GetTarget()->GetInstanceScript() || !GetTarget()->GetInstanceScript()->IsEncounterInProgress() || GetTarget()->GetMapId() != 724)
1004 return;
1005
1007 }
@ 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:1226
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::spell_halion_marks_AuraScript::PrepareAuraScript ( spell_halion_marks_AuraScript  )
private

◆ Register()

void spell_halion_marks::spell_halion_marks_AuraScript::Register ( )
inlineoverridevirtual

Implements _SpellScript.

1010 {
1013 }
@ 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:30
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:753
HookList< AuraDispelHandler > OnDispel
Definition: SpellScript.h:727
void BeforeDispel(DispelInfo *dispelData)
Definition: boss_halion.cpp:989
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
Definition: boss_halion.cpp:998

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::spell_halion_marks_AuraScript::_removeSpellId

Referenced by BeforeDispel().

◆ _summonSpellId

uint32 spell_halion_marks::spell_halion_marks_AuraScript::_summonSpellId

Referenced by OnRemove().