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

Private Member Functions

 PrepareAuraScript (spell_item_meteoric_inspiration)
 
bool Validate (SpellInfo const *) override
 
bool CheckProc (ProcEventInfo &eventInfo)
 
void Register () override
 

Static Private Member Functions

static bool HasManaCost (SpellInfo const *spellInfo)
 
static bool IsPenanceChannel (SpellInfo const *spellInfo)
 

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
 
GameObject * GetGObjCaster () 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< 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_item_meteoric_inspiration::CheckProc ( ProcEventInfo &  eventInfo)
inlineprivate
6113 {
6114 Spell const* spell = eventInfo.GetProcSpell();
6115 if (!spell)
6116 return false;
6117
6118 SpellInfo const* spellInfo = spell->GetSpellInfo();
6119
6120 // totems cast by Call of the Elements are triggered
6121 if (!spell->IsTriggered() || spellInfo->HasAttribute(SPELL_ATTR7_CAN_BE_MULTI_CAST))
6122 return HasManaCost(spellInfo);
6123
6124 if (!spellInfo->HasAttribute(SPELL_ATTR3_NOT_A_PROC))
6125 return false;
6126
6127 switch (spellInfo->Id)
6128 {
6132 {
6133 // copy is cast inside the source heal's hit, so the generic slot still holds that heal.
6134 // 53654 also copies Lay on Hands, so the copy's id alone can't tell
6135 Spell const* origin = eventInfo.GetActor()->GetCurrentSpell(CURRENT_GENERIC_SPELL);
6136 return origin && HasManaCost(origin->GetSpellInfo());
6137 }
6138 default:
6139 break;
6140 }
6141
6142 SpellInfo const* channel = spell->GetTriggeredByAuraSpellInfo();
6143 return channel && channel->IsChanneled() && (HasManaCost(channel) || IsPenanceChannel(channel));
6144 }
@ SPELL_ATTR7_CAN_BE_MULTI_CAST
Definition SharedDefines.h:634
@ SPELL_ATTR3_NOT_A_PROC
Definition SharedDefines.h:490
@ CURRENT_GENERIC_SPELL
Definition Unit.h:564
Spell const * GetProcSpell() const
Definition Unit.h:477
Unit * GetActor()
Definition Unit.h:468
Definition SpellInfo.h:340
uint32 Id
Definition SpellInfo.h:344
bool IsChanneled() const
Definition SpellInfo.cpp:1301
bool HasAttribute(SpellAttr0 attribute) const
Definition SpellInfo.h:441
Definition Spell.h:298
SpellInfo const * GetSpellInfo() const
Definition Spell.h:601
SpellInfo const * GetTriggeredByAuraSpellInfo() const
Definition Spell.h:616
bool IsTriggered() const
Definition Spell.h:568
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition Unit.h:1593
static bool HasManaCost(SpellInfo const *spellInfo)
Definition spell_item.cpp:6100
static bool IsPenanceChannel(SpellInfo const *spellInfo)
Definition spell_item.cpp:6106
@ SPELL_BEACON_OF_LIGHT_FLASH_OF_LIGHT
Definition spell_item.cpp:198
@ SPELL_BEACON_OF_LIGHT_HOLY_LIGHT
Definition spell_item.cpp:197
@ SPELL_BEACON_OF_LIGHT_HOLY_SHOCK
Definition spell_item.cpp:199

References CURRENT_GENERIC_SPELL, ProcEventInfo::GetActor(), Unit::GetCurrentSpell(), ProcEventInfo::GetProcSpell(), Spell::GetSpellInfo(), Spell::GetTriggeredByAuraSpellInfo(), SpellInfo::HasAttribute(), HasManaCost(), SpellInfo::Id, SpellInfo::IsChanneled(), IsPenanceChannel(), Spell::IsTriggered(), SPELL_ATTR3_NOT_A_PROC, SPELL_ATTR7_CAN_BE_MULTI_CAST, SPELL_BEACON_OF_LIGHT_FLASH_OF_LIGHT, SPELL_BEACON_OF_LIGHT_HOLY_LIGHT, and SPELL_BEACON_OF_LIGHT_HOLY_SHOCK.

Referenced by Register().

◆ HasManaCost()

static bool spell_item_meteoric_inspiration::HasManaCost ( SpellInfo const *  spellInfo)
inlinestaticprivate
6101 {
6102 return spellInfo->PowerType == POWER_MANA && (spellInfo->ManaCost || spellInfo->ManaCostPercentage);
6103 }
@ POWER_MANA
Definition SharedDefines.h:257

References SpellInfo::ManaCost, SpellInfo::ManaCostPercentage, POWER_MANA, and SpellInfo::PowerType.

Referenced by CheckProc().

◆ IsPenanceChannel()

static bool spell_item_meteoric_inspiration::IsPenanceChannel ( SpellInfo const *  spellInfo)
inlinestaticprivate
6107 {
6108 return spellInfo->IsRankOf(sSpellMgr->AssertSpellInfo(SPELL_PENANCE_R1_HEAL_CHANNEL)) ||
6109 spellInfo->IsRankOf(sSpellMgr->AssertSpellInfo(SPELL_PENANCE_R1_DAMAGE_CHANNEL));
6110 }
#define sSpellMgr
Definition SpellMgr.h:851
@ SPELL_PENANCE_R1_DAMAGE_CHANNEL
Definition spell_item.cpp:196
@ SPELL_PENANCE_R1_HEAL_CHANNEL
Definition spell_item.cpp:195

References SpellInfo::IsRankOf(), SPELL_PENANCE_R1_DAMAGE_CHANNEL, SPELL_PENANCE_R1_HEAL_CHANNEL, and sSpellMgr.

Referenced by CheckProc().

◆ PrepareAuraScript()

spell_item_meteoric_inspiration::PrepareAuraScript ( spell_item_meteoric_inspiration  )
private

◆ Register()

void spell_item_meteoric_inspiration::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

6147 {
6149 }
#define AuraCheckProcFn(F)
Definition SpellScript.h:820
HookList< CheckProcHandler > DoCheckProc
Definition SpellScript.h:819
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_item.cpp:6112

References AuraCheckProcFn, CheckProc(), and AuraScript::DoCheckProc.

◆ Validate()

bool spell_item_meteoric_inspiration::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

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