aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkaelima <kaelima@live.se>2012-10-17 00:43:57 +0200
committerkaelima <kaelima@live.se>2012-10-17 00:44:16 +0200
commit88ddc9662ee811ab39fe22ec2c536f5af0f71e11 (patch)
tree5349f1938e3ad8162505d3d26b1ac477cc161738 /src
parentfba9c0a82eb61980ffd3c7a912be9479ccad011c (diff)
Core/Battleground: Allow players to start capping flags stealthed or invisible - gameobject should remove the stealth/invis aura on use.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp16
1 files changed, 5 insertions, 11 deletions
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
);