fix(Scripts/Outland): add missing return if no target is found (#21731)

This commit is contained in:
Jelle Meeus
2025-03-18 16:39:55 +01:00
committed by GitHub
parent 3b90710e64
commit 7727a09dc8
2 changed files with 6 additions and 0 deletions

View File

@@ -184,7 +184,10 @@ struct npc_sunblade_scout : public ScriptedAI
protectors.remove_if([](Creature* trigger) {return !trigger->HasAura(SPELL_COSMETIC_STUN_IMMUNE_PERMANENT);});
protectors.sort(Acore::ObjectDistanceOrderPred(me));
if (protectors.empty())
{
ScheduleCombat();
return;
}
Creature* closestProtector = protectors.front();
me->GetMotionMaster()->MoveFollow(closestProtector, 0.0f, 0.0f);
_protectorGUID = closestProtector->GetGUID();