mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Auras: Implemented Aura::GetScriptByName.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user