fix(Core/Movement): Pass waypoint point ID to MovementInform (#25252)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: Rorschach91 <108557877+Rorschach91@users.noreply.github.com>
This commit is contained in:
blinkysc 2026-03-26 19:27:28 -05:00 committed by GitHub
parent 57a2d86862
commit d2dd5de351
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,21 +172,21 @@ void WaypointMovementGenerator<Creature>::ProcessWaypointArrival(Creature* creat
// Inform AI
if (CreatureAI* AI = creature->AI())
{
AI->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode);
AI->MovementInform(WAYPOINT_MOTION_TYPE, waypoint.Id);
AI->WaypointReached(waypoint.Id, i_path->Id);
}
if (Unit* owner = creature->GetCharmerOrOwner())
{
if (UnitAI* AI = owner->GetAI())
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, i_currentNode);
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, waypoint.Id);
}
else
{
if (TempSummon* tempSummon = creature->ToTempSummon())
if (Unit* owner2 = tempSummon->GetSummonerUnit())
if (UnitAI* AI = owner2->GetAI())
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, i_currentNode);
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, waypoint.Id);
}
// All hooks called and infos updated. Time to increment the waypoint node id
@ -391,7 +391,7 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
if (CreatureAI* AI = creature->AI())
{
AI->MovementInform(WAYPOINT_MOTION_TYPE, i_currentNode);
AI->MovementInform(WAYPOINT_MOTION_TYPE, passedWp.Id);
AI->WaypointReached(passedWp.Id, i_path->Id);
}