From c5593ef779a4ba7bbe9df391bc0defd3bf6c33a1 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 6 Dec 2008 14:01:44 -0600 Subject: *Update to Mangos 6880. Source: Mangos. *Skip 6878, 6871. *Main change: change cell size, add is3dDistance for IsWithinDistInMap and isVisibleForOrDetect. --HG-- branch : trunk --- src/game/Spell.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/game/Spell.cpp') 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::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; -- cgit v1.2.3