diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 4948f713f..3fe1bf6fa 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -872,7 +872,7 @@ void Player::HandleDrowning() return; //if player is GM, have waterbreath, is dead or if breathing is disabled then return - if(waterbreath || isGameMaster() || !isAlive() || GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_DISABLE_BREATHING)) + if(HasAuraType(SPELL_AURA_WATER_BREATHING) || isGameMaster() || !isAlive() || GetSession()->GetSecurity() >= sWorld.getConfig(CONFIG_DISABLE_BREATHING)) { StopMirrorTimer(BREATH_TIMER); m_isunderwater = 0; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 5dd05817f..6ec13e581 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2499,12 +2499,8 @@ void Aura::HandleAuraHover(bool apply, bool Real) void Aura::HandleWaterBreathing(bool apply, bool Real) { - if(apply) - m_target->waterbreath = true; - else if(m_target->GetAurasByType(SPELL_AURA_WATER_BREATHING).empty()) + if(!apply && m_target->GetAurasByType(SPELL_AURA_WATER_BREATHING).empty()) { - m_target->waterbreath = false; - // update for enable timer in case not moving target if(m_target->GetTypeId()==TYPEID_PLAYER && m_target->IsInWorld()) { diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 726e7d776..3dfffc4ef 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -102,7 +102,6 @@ Unit::Unit() //m_AurasCheck = 2000; //m_removeAuraTimer = 4; //tmpAura = NULL; - waterbreath = false; m_Visibility = VISIBILITY_ON; diff --git a/src/game/Unit.h b/src/game/Unit.h index 376e59cf8..6021c96c4 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1208,7 +1208,6 @@ class MANGOS_DLL_SPEC Unit : public WorldObject // function for low level grid visibility checks in player/creature cases virtual bool IsVisibleInGridForPlayer(Player* pl) const = 0; - bool waterbreath; AuraList & GetSingleCastAuras() { return m_scAuras; } AuraList const& GetSingleCastAuras() const { return m_scAuras; } SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY];