mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[11748] Replace SpellModifier struct by direct aura access (this should fix charge drops of 36032) also revert [11740]
This commit is contained in:
parent
c9a9179d89
commit
e178c79d51
10 changed files with 131 additions and 267 deletions
|
|
@ -3216,9 +3216,17 @@ void Spell::cast(bool skipCheck)
|
|||
m_immediateHandled = false;
|
||||
m_spellState = SPELL_STATE_DELAYED;
|
||||
SetDelayStart(0);
|
||||
|
||||
// on spell cast end proc,
|
||||
// critical hit related part is currently done on hit so proc there,
|
||||
// 0 damage since any damage based procs should be on hit
|
||||
// 0 victim proc since there is no victim proc dependent on successfull cast for caster
|
||||
m_caster->ProcDamageAndSpell(m_targets.getUnitTarget(), m_procAttacker, 0, PROC_EX_NORMAL_HIT, 0, m_attackType, m_spellInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_caster->ProcDamageAndSpell(m_targets.getUnitTarget(), m_procAttacker, 0, PROC_EX_NORMAL_HIT, 0, m_attackType, m_spellInfo);
|
||||
|
||||
// Immediate spell, no big deal
|
||||
handle_immediate();
|
||||
}
|
||||
|
|
@ -3500,18 +3508,8 @@ void Spell::finish(bool ok)
|
|||
if (m_spellState == SPELL_STATE_FINISHED)
|
||||
return;
|
||||
|
||||
// remove/restore spell mods before m_spellState update
|
||||
if (Player* modOwner = m_caster->GetSpellModOwner())
|
||||
{
|
||||
if (ok || m_spellState != SPELL_STATE_PREPARING) // fail after start channeling or throw to target not affect spell mods
|
||||
modOwner->RemoveSpellMods(this);
|
||||
else
|
||||
modOwner->ResetSpellModsDueToCanceledSpell(this);
|
||||
}
|
||||
|
||||
m_spellState = SPELL_STATE_FINISHED;
|
||||
|
||||
|
||||
// other code related only to successfully finished spells
|
||||
if (!ok)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue