mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Movement: use better checks in GetCurrentSlot to get more reliable slot results
This commit is contained in:
@@ -152,10 +152,10 @@ void MotionMaster::MovementExpired(bool reset /*= true*/)
|
||||
|
||||
MovementSlot MotionMaster::GetCurrentSlot() const
|
||||
{
|
||||
if (empty() || !top())
|
||||
if (empty() || (_slot[MOTION_SLOT_IDLE] && !_slot[MOTION_SLOT_ACTIVE]))
|
||||
return MOTION_SLOT_IDLE;
|
||||
|
||||
if (top())
|
||||
if (_slot[MOTION_SLOT_ACTIVE])
|
||||
return MOTION_SLOT_ACTIVE;
|
||||
|
||||
return MAX_MOTION_SLOT;
|
||||
|
||||
Reference in New Issue
Block a user