diff options
author | Treeston <treeston.mmoc@gmail.com> | 2018-10-22 19:50:40 +0200 |
---|---|---|
committer | Treeston <treeston.mmoc@gmail.com> | 2018-10-22 19:50:40 +0200 |
commit | 5b99ce2f83036a685a93f597f63d4ec914be6970 (patch) | |
tree | cd1b25aa7fb7130a9f7a633281c31246fd4e39c8 | |
parent | 266a9c3d41d238f5176942ffdfc5c4adfe7e564a (diff) |
Core/Spell: Fixed an issue with Premeditation removing itself
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 45a9d4b35d3..76179ea4503 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -10290,10 +10290,6 @@ void Unit::AddComboPoints(Unit* target, int8 count) if (!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) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index e6955b24382..98bdfd7ce8c 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3645,7 +3645,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)) + unitCaster->RemoveAurasByType(SPELL_AURA_RETAIN_COMBO_POINTS); unitCaster->AddComboPoints(m_comboTarget, m_comboPointGain); + } if (unitCaster->m_extraAttacks && m_spellInfo->HasEffect(SPELL_EFFECT_ADD_EXTRA_ATTACKS)) { |