diff options
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 0119d1ee0db..dfff664b31a 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16605,7 +16605,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, uint32 mount_i ModifyMoney(-(int32)totalcost); // prevent stealth flight - RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_STEALTH); + RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LOOT); WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); data << uint32(ERR_TAXIOK); @@ -18885,6 +18885,7 @@ bool Player::isAllowUseBattleGroundObject() { return ( //InBattleGround() && // in battleground - not need, check in other cases !IsMounted() && // not mounted + !isTotalImmunity() && // not totally immuned !HasStealthAura() && // not stealthed !HasInvisibilityAura() && // not invisible !HasAura(SPELL_RECENTLY_DROPPED_FLAG, 0) && // can't pickup @@ -18900,3 +18901,27 @@ bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const return false; } + +bool Player::isTotalImmunity() +{ + AuraList const& immune = GetAurasByType(SPELL_AURA_SCHOOL_IMMUNITY); + + for(AuraList::const_iterator itr = immune.begin(); itr != immune.end(); ++itr) + { + if (((*itr)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_ALL) !=0) // total immunity + { + return true; + } + if (((*itr)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_NORMAL) !=0) // physical damage immunity + { + for(AuraList::const_iterator i = immune.begin(); i != immune.end(); ++i) + { + if (((*i)->GetModifier()->m_miscvalue & SPELL_SCHOOL_MASK_MAGIC) !=0) // magic immunity + { + return true; + } + } + } + } + return false; +} |
