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

Private Member Functions

 PrepareAuraScript (spell_dru_omen_of_clarity)
 
bool Validate (SpellInfo const *) override
 
bool CheckProc (ProcEventInfo &eventInfo)
 
void HandleProc (AuraEffect const *aurEff, ProcEventInfo &)
 
void Register () override
 

Additional Inherited Members

- 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
 
Unit * GetCaster () const
 
WorldObject * GetOwner () const
 
Unit * GetUnitOwner () const
 
DynamicObject * GetDynobjOwner () const
 
void Remove (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
Aura * GetAura () 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
 
AuraEffect * GetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
Unit * GetTarget () 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 bool Load ()
 
virtual void Unload ()
 
- 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< CheckAreaTargetHandler > DoCheckAreaTarget
 
HookList< AuraDispelHandler > OnDispel
 
HookList< AuraDispelHandler > AfterDispel
 
HookList< EffectApplyHandler > OnEffectApply
 
HookList< EffectApplyHandler > AfterEffectApply
 
HookList< EffectApplyHandler > OnEffectRemove
 
HookList< EffectApplyHandler > AfterEffectRemove
 
HookList< EffectPeriodicHandler > OnEffectPeriodic
 
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
 
HookList< EffectCalcPeriodicHandler > DoEffectCalcPeriodic
 
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
 
HookList< EffectAbsorbHandler > OnEffectAbsorb
 
HookList< EffectAbsorbHandler > AfterEffectAbsorb
 
HookList< EffectManaShieldHandler > OnEffectManaShield
 
HookList< EffectManaShieldHandler > AfterEffectManaShield
 
HookList< EffectSplitHandler > OnEffectSplit
 
HookList< CheckProcHandler > DoCheckProc
 
HookList< CheckEffectProcHandler > DoCheckEffectProc
 
HookList< AfterCheckProcHandler > DoAfterCheckProc
 
HookList< AuraProcHandler > DoPrepareProc
 
HookList< AuraProcHandler > OnProc
 
HookList< AuraProcHandler > AfterProc
 
HookList< EffectProcHandler > OnEffectProc
 
HookList< EffectProcHandler > AfterEffectProc
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ CheckProc()

bool spell_dru_omen_of_clarity::CheckProc ( ProcEventInfo &  eventInfo)
inlineprivate
244 {
245 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
246 if (!spellInfo)
247 return true;
248
249 if (spellInfo->IsPassive())
250 return false;
251
252 if (spellInfo->HasEffect(SPELL_EFFECT_CREATE_ITEM))
253 return false;
254
255 // Reject energize spells (e.g. Furor) - they are not real casts
256 if (spellInfo->HasEffect(SPELL_EFFECT_ENERGIZE))
257 return false;
258
261
262 // Non-damaged/Non-healing spells - only druid abilities
264 {
265 if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID)
266 return !spellInfo->HasAura(SPELL_AURA_MOD_SHAPESHIFT);
267
268 return false;
269 }
270
271 if (spellInfo->SpellIconID == SPELL_ICON_REVITALIZE)
272 return false;
273
274 return true;
275 }
@ SPELL_EFFECT_ENERGIZE
Definition SharedDefines.h:796
@ SPELL_EFFECT_CREATE_ITEM
Definition SharedDefines.h:790
@ SPELLFAMILY_DRUID
Definition SharedDefines.h:3791
@ SPELL_ATTR0_ON_NEXT_SWING
Definition SharedDefines.h:380
@ SPELL_ATTR0_ON_NEXT_SWING_NO_DAMAGE
Definition SharedDefines.h:372
@ SPELL_AURA_MOD_SHAPESHIFT
Definition SpellAuraDefines.h:99
SpellCustomAttributes
Definition SpellInfo.h:176
@ SPELL_ATTR0_CU_DIRECT_DAMAGE
Definition SpellInfo.h:185
@ SPELL_ATTR0_CU_NO_INITIAL_THREAT
Definition SpellInfo.h:181
@ PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS
Definition SpellMgr.h:116
uint32 GetTypeMask() const
Definition Unit.h:463
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:301
Definition SpellInfo.h:340
bool IsPassive() const
Definition SpellInfo.cpp:1143
bool HasAttribute(SpellAttr0 attribute) const
Definition SpellInfo.h:441
uint32 SpellIconID
Definition SpellInfo.h:404
bool HasEffect(SpellEffects effect) const
Definition SpellInfo.cpp:889
bool HasAura(AuraType aura) const
Definition SpellInfo.cpp:906
uint32 SpellFamilyName
Definition SpellInfo.h:411
@ SPELL_ICON_REVITALIZE
Definition spell_druid.cpp:108

References ProcEventInfo::GetSpellInfo(), ProcEventInfo::GetTypeMask(), SpellInfo::HasAttribute(), SpellInfo::HasAura(), SpellInfo::HasEffect(), SpellInfo::IsPassive(), PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS, SPELL_ATTR0_CU_DIRECT_DAMAGE, SPELL_ATTR0_CU_NO_INITIAL_THREAT, SPELL_ATTR0_ON_NEXT_SWING, SPELL_ATTR0_ON_NEXT_SWING_NO_DAMAGE, SPELL_AURA_MOD_SHAPESHIFT, SPELL_EFFECT_CREATE_ITEM, SPELL_EFFECT_ENERGIZE, SPELL_ICON_REVITALIZE, SPELLFAMILY_DRUID, SpellInfo::SpellFamilyName, and SpellInfo::SpellIconID.

Referenced by Register().

◆ HandleProc()

void spell_dru_omen_of_clarity::HandleProc ( AuraEffect const *  aurEff,
ProcEventInfo &   
)
inlineprivate
278 {
279 Unit* target = GetTarget();
281 target->CastSpell(nullptr, SPELL_DRUID_BALANCE_T10_BONUS_PROC, true, nullptr, aurEff);
282 }
Unit * GetTarget() const
Definition SpellScript.cpp:1185
Definition Unit.h:665
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5764
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1372
@ SPELL_DRUID_BALANCE_T10_BONUS_PROC
Definition spell_druid.cpp:91
@ SPELL_DRUID_BALANCE_T10_BONUS
Definition spell_druid.cpp:90

References Unit::CastSpell(), AuraScript::GetTarget(), Unit::HasAura(), SPELL_DRUID_BALANCE_T10_BONUS, and SPELL_DRUID_BALANCE_T10_BONUS_PROC.

Referenced by Register().

◆ PrepareAuraScript()

spell_dru_omen_of_clarity::PrepareAuraScript ( spell_dru_omen_of_clarity  )
private

◆ Register()

void spell_dru_omen_of_clarity::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

285 {
288 }
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELL_AURA_PROC_TRIGGER_SPELL
Definition SpellAuraDefines.h:105
#define AuraEffectProcFn(F, I, N)
Definition SpellScript.h:868
#define AuraCheckProcFn(F)
Definition SpellScript.h:831
HookList< CheckProcHandler > DoCheckProc
Definition SpellScript.h:830
HookList< EffectProcHandler > OnEffectProc
Definition SpellScript.h:863
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_druid.cpp:243
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
Definition spell_druid.cpp:277

References AuraCheckProcFn, AuraEffectProcFn, CheckProc(), AuraScript::DoCheckProc, EFFECT_0, HandleProc(), AuraScript::OnEffectProc, and SPELL_AURA_PROC_TRIGGER_SPELL.

◆ Validate()

bool spell_dru_omen_of_clarity::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

239 {
241 }
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition SpellScript.h:125

References SPELL_DRUID_BALANCE_T10_BONUS, SPELL_DRUID_BALANCE_T10_BONUS_PROC, and _SpellScript::ValidateSpellInfo().


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