diff options
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 4ca33c693ea..64234151fc7 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20104,15 +20104,23 @@ void Player::SetFarsightTarget(WorldObject* obj) SetFarSightGUID(obj->GetGUID()); } -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 - isAlive() // live player +bool Player::CanUseBattleGroundObject() +{ + return ( //InBattleGround() && // in battleground - not need, check in other cases + //!IsMounted() && - not correct, player is dismounted when he clicks on flag + !HasStealthAura() && // not stealthed + !HasInvisibilityAura() && // not invisible + !HasAura(SPELL_RECENTLY_DROPPED_FLAG, 0) && // can't pickup + //TODO player cannot use object when he is invulnerable (immune) - (ice block, divine shield, divine protection, divine intervention ...) + isAlive() // live player + ); +} + +bool Player::CanCaptureTowerPoint() +{ + return ( !HasStealthAura() && // not stealthed + !HasInvisibilityAura() && // not invisible + isAlive() // live player ); } |