mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Game/AI: SMART_ACTION_JUMP_TO_POS should resume path when reached jump location (#19029)
SmartAI NPCs using SMART_ACTION_JUMP_TO_POS
should resume their path when they have reached the jump location.
The changes in this PR makes the action work as intended.
Closes #18760
(cherry picked from commit 6e08051825)
This commit is contained in:
@@ -2341,12 +2341,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
if (Creature* creature = (*itr)->ToCreature())
|
||||
{
|
||||
creature->GetMotionMaster()->Clear();
|
||||
creature->GetMotionMaster()->MoveJump(e.target.x, e.target.y, e.target.z, 0.0f, (float)e.action.jump.speedxy, (float)e.action.jump.speedz); // @todo add optional jump orientation support?
|
||||
}
|
||||
}
|
||||
/// @todo Resume path when reached jump location
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
|
||||
@@ -149,8 +149,6 @@ void EffectMovementGenerator::Finalize(Unit* unit)
|
||||
{
|
||||
if (Unit* victim = unit->GetVictim())
|
||||
unit->GetMotionMaster()->MoveChase(victim);
|
||||
else
|
||||
unit->GetMotionMaster()->Initialize();
|
||||
}
|
||||
|
||||
if (unit->ToCreature()->AI())
|
||||
|
||||
Reference in New Issue
Block a user