aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 23295db1bb4..9ab38ec9dec 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2902,14 +2902,14 @@ void Spell::finish(bool ok)
if(!m_caster->IsNonMeleeSpellCasted(false, false, true))
m_caster->clearUnitState(UNIT_STAT_CASTING);
- //remove spell mods
- if (m_caster->GetTypeId() == TYPEID_PLAYER)
- ((Player*)m_caster)->RemoveSpellMods(this);
-
// other code related only to successfully finished spells
if(!ok)
return;
+ //remove spell mods
+ if (m_caster->GetTypeId() == TYPEID_PLAYER)
+ ((Player*)m_caster)->RemoveSpellMods(this);
+
//handle SPELL_AURA_ADD_TARGET_TRIGGER auras
Unit::AuraList const& targetTriggers = m_caster->GetAurasByType(SPELL_AURA_ADD_TARGET_TRIGGER);
for(Unit::AuraList::const_iterator i = targetTriggers.begin(); i != targetTriggers.end(); ++i)
@@ -2958,10 +2958,11 @@ void Spell::finish(bool ok)
// Clear combo at finish state
if(m_caster->GetTypeId() == TYPEID_PLAYER && NeedsComboPoints(m_spellInfo))
{
- // Not drop combopoints if any miss exist
+ // Not drop combopoints if negative spell and if any miss on enemy exist
bool needDrop = true;
+ if (!IsPositiveSpell(m_spellInfo->Id))
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
- if (ihit->missCondition != SPELL_MISS_NONE)
+ if (ihit->missCondition != SPELL_MISS_NONE && ihit->targetGUID!=m_caster->GetGUID())
{
needDrop = false;
break;