mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[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:
parent
e47e9a2218
commit
01d326b90d
25 changed files with 68 additions and 67 deletions
|
|
@ -479,7 +479,7 @@ void Unit::RemoveSpellbyDamageTaken(AuraType auraType, uint32 damage)
|
|||
|
||||
void Unit::DealDamageMods(Unit *pVictim, uint32 &damage, uint32* absorb)
|
||||
{
|
||||
if (!pVictim->isAlive() || pVictim->isInFlight() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode())
|
||||
if (!pVictim->isAlive() || pVictim->IsTaxiFlying() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode())
|
||||
{
|
||||
if(absorb)
|
||||
*absorb += damage;
|
||||
|
|
@ -1288,7 +1288,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
|
|||
if(!this || !pVictim)
|
||||
return;
|
||||
|
||||
if (!pVictim->isAlive() || pVictim->isInFlight() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode())
|
||||
if (!pVictim->isAlive() || pVictim->IsTaxiFlying() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode())
|
||||
return;
|
||||
|
||||
SpellEntry const *spellProto = sSpellStore.LookupEntry(damageInfo->SpellID);
|
||||
|
|
@ -1599,7 +1599,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
|||
if(!this || !pVictim)
|
||||
return;
|
||||
|
||||
if (!pVictim->isAlive() || pVictim->isInFlight() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode())
|
||||
if (!pVictim->isAlive() || pVictim->IsTaxiFlying() || pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->IsInEvadeMode())
|
||||
return;
|
||||
|
||||
//You don't lose health from damage taken from another player while in a sanctuary
|
||||
|
|
@ -7504,7 +7504,7 @@ bool Unit::isTargetableForAttack(bool inverseAlive /*=false*/) const
|
|||
if (isAlive() == inverseAlive)
|
||||
return false;
|
||||
|
||||
return IsInWorld() && !hasUnitState(UNIT_STAT_DIED) && !isInFlight();
|
||||
return IsInWorld() && !hasUnitState(UNIT_STAT_DIED) && !IsTaxiFlying();
|
||||
}
|
||||
|
||||
int32 Unit::ModifyHealth(int32 dVal)
|
||||
|
|
@ -7616,7 +7616,7 @@ bool Unit::isVisibleForOrDetect(Unit const* u, WorldObject const* viewPoint, boo
|
|||
}
|
||||
|
||||
// different visible distance checks
|
||||
if (u->isInFlight()) // what see player in flight
|
||||
if (u->IsTaxiFlying()) // what see player in flight
|
||||
{
|
||||
// use object grey distance for all (only see objects any way)
|
||||
if (!IsWithinDistInMap(viewPoint,World::GetMaxVisibleDistanceInFlight()+(inVisibleList ? World::GetVisibleObjectGreyDistance() : 0.0f), is3dDistance))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue