mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-24 20:45:59 +00:00
refactor(Core/AI) don't add currentTarget to the front of the SelectTargetList for MaxThreat/Random (#21965)
This commit is contained in:
@@ -122,7 +122,7 @@ struct boss_hazzarah : public BossAI
|
||||
case EVENT_CHAIN_BURN:
|
||||
if (me->GetPowerPct(POWER_MANA) > 5.f) // totally guessed
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA; }))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA && u != me->GetVictim(); }))
|
||||
{
|
||||
DoCast(target, SPELL_CHAIN_BURN);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_VANISH, 38s, 45s);
|
||||
return;
|
||||
case EVENT_AMBUSH:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, false))
|
||||
{
|
||||
me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), me->GetOrientation());
|
||||
DoCast(target, SPELL_AMBUSH, true);
|
||||
|
||||
Reference in New Issue
Block a user