fix(Scripts/IcecrownCitadel): fix Lord Marrowgar MaxDistance bonestorm (#25906)

This commit is contained in:
EricksOliveira
2026-05-30 00:13:56 +00:00
committed by GitHub
parent 4f1745483d
commit e675151983
@@ -217,16 +217,21 @@ public:
break;
}
events.Repeat(5s);
Unit* unit = SelectTarget(SelectTargetMethod::Random, 0, BoneStormMoveTargetSelector(me));
if (!unit)
std::list<Unit*> targets;
SelectTargetList(targets, Is25ManRaid() ? 2 : 1, SelectTargetMethod::MaxDistance, 0, BoneStormMoveTargetSelector(me));
Unit* unit = nullptr;
if (!targets.empty())
unit = targets.size() == 1 ? targets.front() : Acore::Containers::SelectRandomContainerElement(targets);
else if ((unit = SelectTarget(SelectTargetMethod::MaxThreat, 0, 175.0f, true)))
{
if ((unit = SelectTarget(SelectTargetMethod::MaxThreat, 0, 175.0f, true)))
if (unit->GetPositionX() > -337.0f)
{
EnterEvadeMode();
return;
}
if (unit->GetPositionX() > -337.0f)
{
EnterEvadeMode();
return;
}
}
if (unit)
me->GetMotionMaster()->MoveCharge(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), 25.0f, 1337);
break;