Core/Misc: waypoint movement

Port From (https://github.com/TrinityCore/TrinityCore/commit/bf12bae46746149d870cd3e52ccd610f0a975047)
This commit is contained in:
hondacrx
2021-02-04 10:32:48 -05:00
parent bd80c99864
commit 0e77439e20
10 changed files with 130 additions and 55 deletions
+6 -4
View File
@@ -137,15 +137,17 @@ namespace Game.Movement
public MovementGeneratorType GetMotionSlotType(MovementSlot slot)
{
if (_slot[(int)slot] == null)
if (Empty() || slot >= MovementSlot.Max || _slot[(int)slot] == null)
return MovementGeneratorType.Max;
else
return _slot[(int)slot].GetMovementGeneratorType();
return _slot[(int)slot].GetMovementGeneratorType();
}
public IMovementGenerator GetMotionSlot(MovementSlot slot)
{
Cypher.Assert((int)slot >= 0);
if (Empty() || slot >= MovementSlot.Max || _slot[(int)slot] == null)
return null;
return _slot[(int)slot];
}