Show
Ignore:
Timestamp:
11/19/08 13:45:31 (17 years ago)
Author:
yumileroy
Message:

[svn] Merge from mangos:
Do not check LOS for triggered spells. Fri Nov 07 16:08:30 apoc
Fix reset combopoints on miss/parry/immune and etc. Sat Nov 08 14:53:03 DiSlord?

Original author: megamage
Date: 2008-11-08 17:43:22-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Spell.cpp

    r196 r197  
    27302730    // Clear combo at finish state 
    27312731    if(m_caster->GetTypeId() == TYPEID_PLAYER && NeedsComboPoints(m_spellInfo)) 
    2732         ((Player*)m_caster)->ClearComboPoints(); 
     2732    { 
     2733        // Not drop combopoints if any miss exist 
     2734        bool needDrop = true; 
     2735        for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit) 
     2736            if (ihit->missCondition != SPELL_MISS_NONE) 
     2737            { 
     2738                needDrop = false; 
     2739                break; 
     2740            } 
     2741        if (needDrop) 
     2742            ((Player*)m_caster)->ClearComboPoints(); 
     2743    } 
    27332744 
    27342745    // call triggered spell only at successful cast (after clear combo points -> for add some if need) 
     
    34123423                return SPELL_FAILED_BAD_TARGETS; 
    34133424 
    3414             if(VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target)) 
     3425            if(!m_IsTriggeredSpell && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target)) 
    34153426                return SPELL_FAILED_LINE_OF_SIGHT; 
    34163427