From 88ddc9662ee811ab39fe22ec2c536f5af0f71e11 Mon Sep 17 00:00:00 2001 From: kaelima Date: Wed, 17 Oct 2012 00:43:57 +0200 Subject: Core/Battleground: Allow players to start capping flags stealthed or invisible - gameobject should remove the stealth/invis aura on use. --- src/server/game/Entities/Player/Player.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 0d31c40f3a1..0f01e6c129e 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -23590,21 +23590,15 @@ bool Player::CanUseBattlegroundObject() // TODO : some spells gives player ForceReaction to one faction (ReputationMgr::ApplyForceReaction) // maybe gameobject code should handle that ForceReaction usage // BUG: sometimes when player clicks on flag in AB - client won't send gameobject_use, only gameobject_report_use packet - return (//InBattleground() && // in battleground - not need, check in other cases - //!IsMounted() && - not correct, player is dismounted when he clicks on flag - //player cannot use object when he is invulnerable (immune) - !isTotalImmune() && // not totally immune - //i'm not sure if these two are correct, because invisible players should get visible when they click on flag - !HasStealthAura() && // not stealthed - !HasInvisibilityAura() && // not invisible - !HasAura(SPELL_RECENTLY_DROPPED_FLAG) && // can't pickup - isAlive() // live player -); + // Note: Mount, stealth and invisibility will be removed when used + return (!isTotalImmune() && // Damage immune + !HasAura(SPELL_RECENTLY_DROPPED_FLAG) && // Still has recently held flag debuff + isAlive()); // Alive } bool Player::CanCaptureTowerPoint() { - return (!HasStealthAura() && // not stealthed + return (!HasStealthAura() && // not stealthed !HasInvisibilityAura() && // not invisible isAlive() // live player ); -- cgit v1.2.3