[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

@ -4300,7 +4300,7 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_TARGET_AURASTATE;
// Not allow casting on flying player
if (target->isInFlight())
if (target->IsTaxiFlying())
return SPELL_FAILED_BAD_TARGETS;
if(!m_IsTriggeredSpell && VMAP::VMapFactory::checkSpellForLoS(m_spellInfo->Id) && !m_caster->IsWithinLOSInMap(target))
@ -4495,7 +4495,7 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_caster->IsMounted() && m_caster->GetTypeId()==TYPEID_PLAYER && !m_IsTriggeredSpell &&
!IsPassiveSpell(m_spellInfo) && !(m_spellInfo->Attributes & SPELL_ATTR_CASTABLE_WHILE_MOUNTED))
{
if (m_caster->isInFlight())
if (m_caster->IsTaxiFlying())
return SPELL_FAILED_NOT_ON_TAXI;
else
return SPELL_FAILED_NOT_MOUNTED;