Core/Spells: Fixed warlock's Banish cancel if target was already banished (#23697)

* Core/Spells: Add SpellMissInfo argument to BeforeHit hooks and call them also when the spell doesn't hit. (#17613)

(cherry picked from commit 8ff5b35be1)

# Conflicts:
#	src/server/game/Spells/Spell.cpp
#	src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
#	src/server/scripts/Spells/spell_warlock.cpp

* Core/Spells: Fixed warlock's Banish cancel if target was already banished (#17614)

(cherry picked from commit 4587b5d880)

# Conflicts:
#	src/server/scripts/Spells/spell_warlock.cpp
This commit is contained in:
ForesterDev
2019-08-23 21:24:56 +04:00
committed by Giacomo Pozzoni
parent 10f6e38185
commit 448facc5e7
13 changed files with 81 additions and 50 deletions

View File

@@ -220,6 +220,16 @@ void SpellScript::EffectHandler::Call(SpellScript* spellScript, SpellEffIndex ef
(spellScript->*pEffectHandlerScript)(effIndexToHandle);
}
SpellScript::BeforeHitHandler::BeforeHitHandler(SpellBeforeHitFnType pBeforeHitHandlerScript)
{
_pBeforeHitHandlerScript = pBeforeHitHandlerScript;
}
void SpellScript::BeforeHitHandler::Call(SpellScript* spellScript, SpellMissInfo missInfo)
{
(spellScript->*_pBeforeHitHandlerScript)(missInfo);
}
SpellScript::HitHandler::HitHandler(SpellHitFnType _pHitHandlerScript)
{
pHitHandlerScript = _pHitHandlerScript;