Core/Movement: enable item use and spell cast when dismounting

Remove error message and allow spell cast or item use from
mounted state on ground, especially when sitting on
a landed flying mount. Current behavior is that the player
will get the error message "You can't do that while moving"
when trying to cast a spell or pick up an item
while sitting on a flying mount after having landed.

By joschiwald, closes #6236

(cherry picked from commit 19aac66bc2)
This commit is contained in:
joschiwald
2016-04-13 20:47:57 +02:00
parent c4967d67bd
commit 71ffdccb5a
3 changed files with 10 additions and 19 deletions

View File

@@ -473,8 +473,11 @@ void MotionMaster::MoveFall(uint32 id /*=0*/)
if (std::fabs(_owner->GetPositionZ() - tz) < 0.1f)
return;
_owner->SetFall(true);
// don't run spline movement for players
if (_owner->GetTypeId() == TYPEID_PLAYER)
_owner->SetFall(true);
return;
Movement::MoveSplineInit init(_owner);
init.MoveTo(_owner->GetPositionX(), _owner->GetPositionY(), tz, false);