diff options
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rwxr-xr-x | src/server/game/Spells/SpellScript.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 35c05c87a44..4645a2564a7 100755 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -19,6 +19,7 @@ #include "Spell.h" #include "SpellAuras.h" #include "SpellScript.h" +#include "SpellMgr.h" bool _SpellScript::_Validate(SpellEntry const* entry) { @@ -468,6 +469,10 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result) bool AuraScript::_Validate(SpellEntry const * entry) { + for (std::list<CheckAreaTargetHandler>::iterator itr = DoCheckAreaTarget.begin(); itr != DoCheckAreaTarget.end(); ++itr) + if (!HasAreaAuraEffect(entry)) + sLog->outError("TSCR: Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str()); + for (std::list<EffectApplyHandler>::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); @@ -523,6 +528,16 @@ bool AuraScript::_Validate(SpellEntry const * entry) return _SpellScript::_Validate(entry); } +AuraScript::CheckAreaTargetHandler::CheckAreaTargetHandler(AuraCheckAreaTargetFnType _pHandlerScript) +{ + pHandlerScript = _pHandlerScript; +} + +bool AuraScript::CheckAreaTargetHandler::Call(AuraScript* auraScript, Unit * _target) +{ + return (auraScript->*pHandlerScript)(_target); +} + AuraScript::EffectBase::EffectBase(uint8 _effIndex, uint16 _effName) : _SpellScript::EffectAuraNameCheck(_effName), _SpellScript::EffectHook(_effIndex) { |