fix(Core/Spells): Fixed an issue with Premeditation removing itself. (#11093)

Co-authored-by: Treeston <Treeston@users.noreply.github.com>
This commit is contained in:
UltraNix
2022-03-27 06:50:29 +02:00
committed by GitHub
parent 7f4ff537b1
commit d195c09f56
2 changed files with 7 additions and 4 deletions

View File

@@ -16288,10 +16288,6 @@ void Unit::AddComboPoints(Unit* target, int8 count)
return;
}
// remove Premed-like effects
// (NB: this Aura removes the already-added CP when it expires from duration - now that we've added CP, this shouldn't happen anymore)
RemoveAurasByType(SPELL_AURA_RETAIN_COMBO_POINTS);
if (target && target != m_comboTarget)
{
if (m_comboTarget)

View File

@@ -4039,6 +4039,13 @@ void Spell::_handle_finish_phase()
// Real add combo points from effects
if (m_comboTarget && m_comboPointGain)
{
// remove Premed-like effects unless they were caused by ourselves
// (this Aura removes the already-added CP when it expires from duration - now that we've added CP, this shouldn't happen anymore!)
if (!m_spellInfo->HasAura(SPELL_AURA_RETAIN_COMBO_POINTS))
{
m_caster->RemoveAurasByType(SPELL_AURA_RETAIN_COMBO_POINTS);
}
m_caster->AddComboPoints(m_comboTarget, m_comboPointGain);
}