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

#include <SpellScript.h>

Public Member Functions

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

Private Attributes

uint16 effName
 

Constructor & Destructor Documentation

_SpellScript::EffectNameCheck::EffectNameCheck ( uint16  _effName)
inline
88 { effName = _effName; }
uint16 effName
Definition: SpellScript.h:92

Member Function Documentation

bool _SpellScript::EffectNameCheck::Check ( SpellInfo const spellInfo,
uint8  effIndex 
)
112 {
113  SpellEffectInfo const* effect = spellEntry->GetEffect(effIndex);
114  if (!effect)
115  return false;
116  if (!effect->Effect && !effName)
117  return true;
118  if (!effect->Effect)
119  return false;
120  return (effName == SPELL_EFFECT_ANY) || (effect->Effect == effName);
121 }
uint16 effName
Definition: SpellScript.h:92
#define SPELL_EFFECT_ANY
Definition: SpellScript.h:42
Definition: SpellInfo.h:238
uint32 Effect
Definition: SpellInfo.h:243

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string _SpellScript::EffectNameCheck::ToString ( )
124 {
125  switch (effName)
126  {
127  case SPELL_EFFECT_ANY:
128  return "SPELL_EFFECT_ANY";
129  default:
130  char num[10];
131  sprintf (num, "%u", effName);
132  return num;
133  }
134 }
uint16 effName
Definition: SpellScript.h:92
#define SPELL_EFFECT_ANY
Definition: SpellScript.h:42
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::EffectNameCheck::effName
private

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