diff options
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 8 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 2acf9087c06..65b644fa082 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -347,6 +347,14 @@ m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false) // m_casterLevel = cast item level/caster level, caster level should be saved to db, confirmed with sniffs } +AuraScript* Aura::GetScriptByName(std::string const& scriptName) const +{ + for (std::list<AuraScript*>::const_iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end(); ++itr) + if ((*itr)->_GetScriptName()->compare(scriptName) == 0) + return *itr; + return NULL; +} + void Aura::_InitEffects(uint8 effMask, Unit* caster, int32 *baseAmount) { // shouldn't be in constructor - functions in AuraEffect::AuraEffect use polymorphism diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index 56927a09ae6..e865d415438 100644 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -234,6 +234,8 @@ class Aura bool CallScriptEffectProcHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, ProcEventInfo& eventInfo); void CallScriptAfterEffectProcHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, ProcEventInfo& eventInfo); + AuraScript* GetScriptByName(std::string const& scriptName) const; + std::list<AuraScript*> m_loadedScripts; private: void _DeleteRemovedApplications(); |