mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
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 commit8ff5b35be1) # 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 commit4587b5d880) # Conflicts: # src/server/scripts/Spells/spell_warlock.cpp
This commit is contained in:
committed by
Giacomo Pozzoni
parent
10f6e38185
commit
448facc5e7
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user