AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
_SpellScript::EffectAuraNameCheck Class Reference

#include "SpellScript.h"

Inheritance diagram for _SpellScript::EffectAuraNameCheck:
AuraScript::EffectBase AuraScript::EffectAbsorbHandler AuraScript::EffectApplyHandler AuraScript::EffectCalcAmountHandler AuraScript::EffectCalcPeriodicHandler AuraScript::EffectCalcSpellModHandler AuraScript::EffectManaShieldHandler AuraScript::EffectPeriodicHandler AuraScript::EffectProcHandler AuraScript::EffectSplitHandler AuraScript::EffectUpdatePeriodicHandler

Public Member Functions

 EffectAuraNameCheck (uint16 _effAurName)
 
bool Check (SpellInfo const *spellInfo, uint8 effIndex)
 
std::string ToString ()
 

Private Attributes

uint16 effAurName
 

Detailed Description

Constructor & Destructor Documentation

◆ EffectAuraNameCheck()

_SpellScript::EffectAuraNameCheck::EffectAuraNameCheck ( uint16  _effAurName)
inline
98{ effAurName = _effAurName; }
uint16 effAurName
Definition: SpellScript.h:102

References effAurName.

Member Function Documentation

◆ Check()

bool _SpellScript::EffectAuraNameCheck::Check ( SpellInfo const *  spellInfo,
uint8  effIndex 
)
145{
146 if (!spellInfo->Effects[effIndex].ApplyAuraName && !effAurName)
147 return true;
148 if (!spellInfo->Effects[effIndex].ApplyAuraName)
149 return false;
150 return (effAurName == SPELL_AURA_ANY) || (spellInfo->Effects[effIndex].ApplyAuraName == effAurName);
151}
#define SPELL_AURA_ANY
Definition: SpellScript.h:43

References SpellInfo::Effects, and SPELL_AURA_ANY.

Referenced by AuraScript::EffectBase::CheckEffect().

◆ ToString()

std::string _SpellScript::EffectAuraNameCheck::ToString ( )
154{
155 switch (effAurName)
156 {
157 case SPELL_AURA_ANY:
158 return "SPELL_AURA_ANY";
159 default:
160 char num[10];
161 snprintf(num, sizeof(num), "%u", effAurName);
162 return num;
163 }
164}

References SPELL_AURA_ANY.

Referenced by AuraScript::EffectBase::ToString().

Member Data Documentation

◆ effAurName

uint16 _SpellScript::EffectAuraNameCheck::effAurName
private

Referenced by EffectAuraNameCheck().