forked from mirror/azerothcore-wotlk
fix(Core/Movement): Pass waypoint point ID to MovementInform (#25252)
Co-authored-by: blinkysc <[email protected]> Co-authored-by: Rorschach91 <[email protected]>
This commit is contained in:
co-authored by
blinkysc
Rorschach91
parent
57a2d86862
commit
d2dd5de351
@@ -172,21 +172,21 @@ void WaypointMovementGenerator<Creature>::ProcessWaypointArrival(Creature* creat
|
|||||||
// Inform AI
|
// Inform AI
|
||||||
if (CreatureAI* AI = creature->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);
|
AI->WaypointReached(waypoint.Id, i_path->Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Unit* owner = creature->GetCharmerOrOwner())
|
if (Unit* owner = creature->GetCharmerOrOwner())
|
||||||
{
|
{
|
||||||
if (UnitAI* AI = owner->GetAI())
|
if (UnitAI* AI = owner->GetAI())
|
||||||
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, i_currentNode);
|
AI->SummonMovementInform(creature, WAYPOINT_MOTION_TYPE, waypoint.Id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (TempSummon* tempSummon = creature->ToTempSummon())
|
if (TempSummon* tempSummon = creature->ToTempSummon())
|
||||||
if (Unit* owner2 = tempSummon->GetSummonerUnit())
|
if (Unit* owner2 = tempSummon->GetSummonerUnit())
|
||||||
if (UnitAI* AI = owner2->GetAI())
|
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
|
// 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())
|
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);
|
AI->WaypointReached(passedWp.Id, i_path->Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user