Core/Misc: movement cleanup
Port From (https://github.com/TrinityCore/TrinityCore/commit/4793b073eec2af32622ff703911721100730e868)
This commit is contained in:
@@ -97,10 +97,11 @@ namespace Game.AI
|
||||
return new NullCreatureAI(creature);
|
||||
}
|
||||
|
||||
public static IMovementGenerator SelectMovementAI(Creature creature)
|
||||
public static IMovementGenerator SelectMovementAI(Unit unit)
|
||||
{
|
||||
MovementGeneratorType type = MovementGeneratorType.Idle;
|
||||
if (creature.GetPlayerMovingMe() == null)
|
||||
MovementGeneratorType type = unit.GetDefaultMovementType();
|
||||
Creature creature = unit.ToCreature();
|
||||
if (creature != null && creature.GetPlayerMovingMe() == null)
|
||||
type = creature.GetDefaultMovementType();
|
||||
|
||||
return type switch
|
||||
|
||||
Reference in New Issue
Block a user