diff options
| author | megamage <none@none> | 2008-12-06 14:01:44 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2008-12-06 14:01:44 -0600 |
| commit | c5593ef779a4ba7bbe9df391bc0defd3bf6c33a1 (patch) | |
| tree | ae0cb37bc8f5de0d33bddae95747d7d2162cd8ce /src/game/Spell.cpp | |
| parent | 72edfea129c244cde9a18b3227f775250197ec99 (diff) | |
*Update to Mangos 6880. Source: Mangos.
*Skip 6878, 6871.
*Main change: change cell size, add is3dDistance for IsWithinDistInMap and isVisibleForOrDetect.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
| -rw-r--r-- | src/game/Spell.cpp | 13 |
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; |
