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;
|
break;
|
||||||
}
|
}
|
||||||
events.Repeat(5s);
|
events.Repeat(5s);
|
||||||
Unit* unit = SelectTarget(SelectTargetMethod::Random, 0, BoneStormMoveTargetSelector(me));
|
std::list<Unit*> targets;
|
||||||
if (!unit)
|
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)
|
||||||
if (unit->GetPositionX() > -337.0f)
|
{
|
||||||
{
|
EnterEvadeMode();
|
||||||
EnterEvadeMode();
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unit)
|
if (unit)
|
||||||
me->GetMotionMaster()->MoveCharge(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), 25.0f, 1337);
|
me->GetMotionMaster()->MoveCharge(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), 25.0f, 1337);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user