Revert "feat(Core/Spells): improve SpellCheckRange(), spell cast when dismounting, falling or levitating spells (#3384)" (#5052)

This reverts commit b424273574.
This commit is contained in:
Stefano Borzì
2021-03-30 12:55:07 +02:00
committed by GitHub
parent c053e111d3
commit d4b8defcd8
3 changed files with 54 additions and 128 deletions

View File

@@ -607,19 +607,15 @@ void MotionMaster::MoveFall(uint32 id /*=0*/, bool addFlagForNPC)
// Abort too if the ground is very near
if (fabs(_owner->GetPositionZ() - tz) < 0.1f)
{
return;
}
_owner->AddUnitMovementFlag(MOVEMENTFLAG_FALLING);
_owner->m_movementInfo.SetFallTime(0);
// don't run spline movement for players
if (_owner->GetTypeId() == TYPEID_PLAYER)
{
return;
_owner->AddUnitMovementFlag(MOVEMENTFLAG_FALLING);
_owner->m_movementInfo.SetFallTime(0);
_owner->ToPlayer()->SetFallInformation(time(nullptr), _owner->GetPositionZ());
}
if (_owner->GetTypeId() == TYPEID_UNIT && addFlagForNPC) // pussywizard
else if (_owner->GetTypeId() == TYPEID_UNIT && addFlagForNPC) // pussywizard
{
_owner->RemoveUnitMovementFlag(MOVEMENTFLAG_MASK_MOVING);
_owner->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING | MOVEMENTFLAG_CAN_FLY);