fix(CORE): Missing override on various functions (#2602)

This commit is contained in:
Nefertumm
2020-01-21 19:03:15 -03:00
committed by GitHub
parent b66ec5712e
commit 59234f8f4b
16 changed files with 193 additions and 166 deletions

View File

@@ -18477,6 +18477,20 @@ bool Unit::IsFalling() const
return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_FAR) || movespline->isFalling();
}
bool Unit::CanSwim() const
{
// Mirror client behavior, if this method returns false then client will not use swimming animation and for players will apply gravity as if there was no water
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CANNOT_SWIM))
return false;
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED)) // is player
return true;
if (HasFlag(UNIT_FIELD_FLAGS_2, 0x1000000))
return false;
if (IsPet() && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PET_IN_COMBAT))
return true;
return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_RENAME | UNIT_FLAG_UNK_15);
}
void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool casting /*= false*/, bool vehicleTeleport /*= false*/, bool withPet /*= false*/, bool removeTransport /*= false*/)
{
DisableSpline();