TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
_SpellScript::EffectAuraNameCheck Class Reference

#include <SpellScript.h>

Public Member Functions

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

Private Attributes

uint16 effAurName
 

Constructor & Destructor Documentation

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

Member Function Documentation

bool _SpellScript::EffectAuraNameCheck::Check ( SpellInfo const spellInfo,
uint8  effIndex 
)
137 {
138  SpellEffectInfo const* effect = spellEntry->GetEffect(effIndex);
139  if (!effect)
140  return false;
141  if (!effect->ApplyAuraName && !effAurName)
142  return true;
143  if (!effect->ApplyAuraName)
144  return false;
145  return (effAurName == SPELL_AURA_ANY) || (effect->ApplyAuraName == effAurName);
146 }
uint32 ApplyAuraName
Definition: SpellInfo.h:244
uint16 effAurName
Definition: SpellScript.h:102
#define SPELL_AURA_ANY
Definition: SpellScript.h:43
Definition: SpellInfo.h:238

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string _SpellScript::EffectAuraNameCheck::ToString ( )
149 {
150  switch (effAurName)
151  {
152  case SPELL_AURA_ANY:
153  return "SPELL_AURA_ANY";
154  default:
155  char num[10];
156  sprintf (num, "%u", effAurName);
157  return num;
158  }
159 }
uint16 effAurName
Definition: SpellScript.h:102
#define SPELL_AURA_ANY
Definition: SpellScript.h:43
std::string sprintf(CStringRef format, ArgList args)
Definition: format.h:3096

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint16 _SpellScript::EffectAuraNameCheck::effAurName
private

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