[7426] Mounted players now can capture tower point in Eye of Storm. Author: Triply

Renamed function isAllowUseBattleGroundObject to CanUseBattleGroundObject

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-09 18:00:56 -06:00
parent a32382a5ec
commit 7a2f21a0b1
7 changed files with 26 additions and 17 deletions
+16 -8
View File
@@ -20104,15 +20104,23 @@ void Player::SetFarsightTarget(WorldObject* obj)
SetFarSightGUID(obj->GetGUID());
}
bool Player::isAllowUseBattleGroundObject()
bool Player::CanUseBattleGroundObject()
{
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
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
);
}