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

[svn] Fix some aura_interrupt_flag to correctly remove auras.
Add interrupt_flag_unattackable. Source: mangos forum. Adapted by F636y623.
Add function CombatStart?().

Original author: megamage
Date: 2008-11-11 17:49:51-06:00

Files:
1 modified

Legend:

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

    r203 r213  
    957957                unit->SetStandState(PLAYER_STATE_NONE); 
    958958 
    959             if(!unit->isInCombat() && unit->GetTypeId() != TYPEID_PLAYER && ((Creature*)unit)->AI()) 
    960                 ((Creature*)unit)->AI()->AttackStart(m_caster); 
    961  
    962             unit->SetInCombatWith(m_caster); 
    963             m_caster->SetInCombatWith(unit); 
    964  
    965             if(Player *attackedPlayer = unit->GetCharmerOrOwnerPlayerOrPlayerItself()) 
    966                 m_caster->SetContestedPvP(attackedPlayer); 
     959            m_caster->CombatStart(unit); 
    967960        } 
    968961    } 
     
    1003996            } 
    1004997 
    1005             //if(!IsPositiveSpell(m_spellInfo->Id)) 
    1006             { 
    1007                 //do not remove feign death 
    1008                 unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_STEALTH + AURA_INTERRUPT_FLAG_DAMAGE); 
    1009             } 
     998            unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL); 
    1010999        } 
    10111000        else 
     
    22482237    if ( !m_IsTriggeredSpell && isSpellBreakStealth(m_spellInfo) ) 
    22492238    { 
    2250         m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_STEALTH); 
     2239        m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST); 
    22512240    } 
    22522241