mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/SmartAI: ACTION_RANDOM_MOVE with distance = 0 should reset motion back to IDLE
--HG-- branch : trunk
This commit is contained in:
@@ -1155,7 +1155,12 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
|
||||
if (!targets) return;
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); itr++)
|
||||
if (IsCreature((*itr)))
|
||||
(*itr)->ToCreature()->GetMotionMaster()->MoveRandom((float)e.action.moveRandom.distance);
|
||||
{
|
||||
if (e.action.moveRandom.distance)
|
||||
(*itr)->ToCreature()->GetMotionMaster()->MoveRandom((float)e.action.moveRandom.distance);
|
||||
else
|
||||
(*itr)->ToCreature()->GetMotionMaster()->MoveIdle();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user