aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellScript.cpp
diff options
context:
space:
mode:
authorUnholychick <lucas__jensen@hotmail.com>2014-12-24 16:40:51 +0100
committerNayd <dnpd.dd@gmail.com>2014-12-25 21:33:02 +0000
commitd13036442e82f4fe8140db09707eaa37e2392160 (patch)
treeaf8493e0186540d5675f6df130184a3355a97a71 /src/server/game/Spells/SpellScript.cpp
parent3cb6ac02b2d9114ef493369b68afac1b355d81a4 (diff)
Core/Scripts: Add new SpellScript hook OnEffectSuccessfulDispel
Adds SpellScript hook to execute scripts after succesful dispels, example could be warlock pets Devour Magic, which should only trigger when succesfully dispelling an aura. (cherry picked from commit ebf95e7ed7f518c54d9c4044e050d50e0dcb0c57) Conflicts: src/server/game/Spells/SpellEffects.cpp
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rw-r--r--src/server/game/Spells/SpellScript.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index 8ab3a72b47e..fccdea7fde1 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -310,6 +310,10 @@ bool SpellScript::_Validate(SpellInfo const* entry)
if (!(*itr).GetAffectedEffectsMask(entry))
TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+ for (std::list<EffectHandler>::iterator itr = OnEffectSuccessfulDispel.begin(); itr != OnEffectSuccessfulDispel.end(); ++itr)
+ if (!(*itr).GetAffectedEffectsMask(entry))
+ TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectSuccessfulDispel` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
+
for (std::list<ObjectAreaTargetSelectHandler>::iterator itr = OnObjectAreaTargetSelect.begin(); itr != OnObjectAreaTargetSelect.end(); ++itr)
if (!(*itr).GetAffectedEffectsMask(entry))
TC_LOG_ERROR("scripts", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());