mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
fix(Scripts/Outland): add missing return if no target is found (#21731)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -757,7 +757,10 @@ struct npc_amanishi_scout : public ScriptedAI
|
||||
triggers.remove_if([](Creature* trigger) {return !IsDrum(trigger);});
|
||||
triggers.sort(Acore::ObjectDistanceOrderPred(me));
|
||||
if (triggers.empty())
|
||||
{
|
||||
ScheduleCombat();
|
||||
return;
|
||||
}
|
||||
Creature* closestDrum = triggers.front();
|
||||
me->GetMotionMaster()->MoveFollow(closestDrum, 0.0f, 0.0f);
|
||||
_drumGUID = closestDrum->GetGUID();
|
||||
|
||||
Reference in New Issue
Block a user