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/Player.cpp

    r212 r213  
    1660616606 
    1660716607    // prevent stealth flight 
    16608     RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_STEALTH); 
     16608    RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LOOT); 
    1660916609 
    1661016610    WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); 
     
    1888618886    return ( //InBattleGround() &&                            // in battleground - not need, check in other cases 
    1888718887             !IsMounted() &&                                  // not mounted 
     18888             !isTotalImmunity() &&                              // not totally immuned 
    1888818889             !HasStealthAura() &&                             // not stealthed 
    1888918890             !HasInvisibilityAura() &&                        // not invisible 
     
    1890118902    return false; 
    1890218903} 
     18904 
     18905bool Player::isTotalImmunity() 
     18906{ 
     18907    AuraList const& immune = GetAurasByType(SPELL_AURA_SCHOOL_IMMUNITY); 
     18908 
     18909    for(AuraList::const_iterator itr = immune.begin(); itr != immune.end(); ++itr) 
     18910    { 
     18911        if (((*itr)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_ALL) !=0)   // total immunity 
     18912        { 
     18913            return true; 
     18914        } 
     18915        if (((*itr)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_NORMAL) !=0)   // physical damage immunity 
     18916        { 
     18917            for(AuraList::const_iterator i = immune.begin(); i != immune.end(); ++i) 
     18918            { 
     18919                if (((*i)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_MAGIC) !=0)   // magic immunity 
     18920                { 
     18921                    return true; 
     18922                } 
     18923            } 
     18924        } 
     18925    } 
     18926    return false; 
     18927}