Core/Formations: update codestyle and fix crash

Closes #21288

(cherry picked from commit 73cc613dc86d7d72d78f22affe2faba6786bccc5)
This commit is contained in:
ariel-
2021-06-16 19:26:32 +02:00
committed by Shauren
parent 0c56ec914f
commit 861cf261c5
8 changed files with 207 additions and 146 deletions
+2 -2
View File
@@ -548,14 +548,14 @@ void SmartAI::JustReachedHome()
GetScript()->ProcessEventsFor(SMART_EVENT_REACHED_HOME);
CreatureGroup* formation = me->GetFormation();
if (!formation || formation->getLeader() == me || !formation->isFormed())
if (!formation || formation->GetLeader() == me || !formation->IsFormed())
{
if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_IDLE) != WAYPOINT_MOTION_TYPE && me->GetWaypointPath())
me->GetMotionMaster()->MovePath(me->GetWaypointPath(), true);
else
me->ResumeMovement();
}
else if (formation->isFormed())
else if (formation->IsFormed())
me->GetMotionMaster()->MoveIdle(); // wait the order of leader
}