[10202] Rename isInFlight() to IsTaxiFlying() and UNIT_STAT_IN_FLIGHT to UNIT_STAT_TAXI_FLIGHT.

Also add IsFreeFlying() function to Player class.
This commit is contained in:
Lynx3d 2010-07-17 01:37:40 +02:00
parent e47e9a2218
commit 01d326b90d
25 changed files with 68 additions and 67 deletions

View file

@ -2229,7 +2229,7 @@ void Player::RegenerateHealth(uint32 diff)
Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask)
{
// some basic checks
if (guid.IsEmpty() || !IsInWorld() || isInFlight())
if (guid.IsEmpty() || !IsInWorld() || IsTaxiFlying())
return NULL;
// not in interactive state
@ -2283,7 +2283,7 @@ Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask)
GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, uint32 gameobject_type) const
{
// some basic checks
if (guid.IsEmpty() || !IsInWorld() || isInFlight())
if (guid.IsEmpty() || !IsInWorld() || IsTaxiFlying())
return NULL;
// not in interactive state
@ -6119,7 +6119,7 @@ void Player::CheckAreaExploreAndOutdoor()
if (!isAlive())
return;
if (isInFlight())
if (IsTaxiFlying())
return;
bool isOutdoor;
@ -19468,7 +19468,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
// SMSG_POWER_UPDATE
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
if(HasAuraType(SPELL_AURA_MOD_FLIGHT_SPEED_MOUNTED) || HasAuraType(SPELL_AURA_FLY) || isInFlight())
if(HasAuraType(SPELL_AURA_MOD_FLIGHT_SPEED_MOUNTED) || HasAuraType(SPELL_AURA_FLY) || IsTaxiFlying())
m_movementInfo.AddMovementFlag(MOVEFLAG_FLYING);
SetMover(this);
@ -20012,7 +20012,7 @@ void Player::SummonIfPossible(bool agree)
return;
// stop taxi flight at summon
if(isInFlight())
if(IsTaxiFlying())
{
GetMotionMaster()->MovementExpired();
m_taxi.ClearTaxiDestinations();
@ -20590,7 +20590,7 @@ void Player::UpdateUnderwaterState( Map* m, float x, float y, float z )
}
// Allow travel in dark water on taxi or transport
if ((liquid_status.type & MAP_LIQUID_TYPE_DARK_WATER) && !isInFlight() && !GetTransport())
if ((liquid_status.type & MAP_LIQUID_TYPE_DARK_WATER) && !IsTaxiFlying() && !GetTransport())
m_MirrorTimerFlags |= UNDERWATER_INDARKWATER;
else
m_MirrorTimerFlags &= ~UNDERWATER_INDARKWATER;