Changeset 213 for trunk/src/game/Player.cpp
- Timestamp:
- 11/19/08 13:47:00 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Player.cpp
r212 r213 16606 16606 16607 16607 // prevent stealth flight 16608 RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ STEALTH);16608 RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LOOT); 16609 16609 16610 16610 WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); … … 18886 18886 return ( //InBattleGround() && // in battleground - not need, check in other cases 18887 18887 !IsMounted() && // not mounted 18888 !isTotalImmunity() && // not totally immuned 18888 18889 !HasStealthAura() && // not stealthed 18889 18890 !HasInvisibilityAura() && // not invisible … … 18901 18902 return false; 18902 18903 } 18904 18905 bool 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 }