Core/Movement: Enable MotionMaster::MovePath for players

This commit is contained in:
Shauren
2026-01-05 14:18:45 +01:00
parent 1f1c859a47
commit 1db1a0e57f
10 changed files with 197 additions and 146 deletions

View File

@@ -171,7 +171,7 @@ public:
return false;
}
if (!pathid)
if (!pathid || !sWaypointMgr->GetPath(pathid))
{
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "No valid path number provided.");
return true;

View File

@@ -782,7 +782,7 @@ class boss_flame_leviathan_overload_device : public CreatureScript
if (Unit* player = me->GetVehicle()->GetPassenger(SEAT_PLAYER))
{
me->GetVehicleBase()->CastSpell(player, SPELL_SMOKE_TRAIL, true);
player->GetMotionMaster()->MoveKnockbackFrom(me->GetVehicleBase()->GetPosition(), 30, 30);
player->KnockbackFrom(me->GetVehicleBase()->GetPosition(), 30, 30);
player->ExitVehicle();
}
}