forked from mirror/azerothcore-wotlk
fix(Scripts/IcecrownCitadel): fix Lord Marrowgar MaxDistance bonestorm (#25906)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user