Core/Spells: Removed SpellEffIndex effIndex argument from spell effect handlers

This commit is contained in:
Shauren
2021-08-29 23:28:28 +02:00
parent 462e11c96f
commit 7440c9cf19
11 changed files with 501 additions and 478 deletions

View File

@@ -584,6 +584,7 @@ m_caster((info->HasAttribute(SPELL_ATTR6_CAST_BY_CHARMER) && caster->GetCharmerO
damage = 0;
targetMissInfo = SPELL_MISS_NONE;
effectHandleMode = SPELL_EFFECT_HANDLE_LAUNCH;
effectInfo = nullptr;
m_damage = 0;
m_healing = 0;
m_procAttacker = 0;
@@ -5081,6 +5082,7 @@ void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGoT
gameObjTarget = pGoTarget;
m_corpseTarget = pCorpseTarget;
destTarget = &m_destTargets[spellEffectInfo.EffectIndex]._position;
effectInfo = &spellEffectInfo;
// we do not need DamageMultiplier here.
damage = CalculateDamage(spellEffectInfo);
@@ -5088,7 +5090,7 @@ void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGoT
bool preventDefault = CallScriptEffectHandlers(spellEffectInfo.EffectIndex, mode);
if (!preventDefault)
(this->*SpellEffectHandlers[spellEffectInfo.Effect])(spellEffectInfo.EffectIndex);
(this->*SpellEffectHandlers[spellEffectInfo.Effect])();
}
SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint32* param2 /*= nullptr*/)