feat(Core/AI): convert SelectAggroTarget to enum class (#9893)

This commit is contained in:
Kargatum
2021-12-29 05:13:12 +07:00
committed by GitHub
parent e928d8b67e
commit c81891fc11
236 changed files with 622 additions and 598 deletions

View File

@@ -1772,7 +1772,7 @@ struct npc_coren_direbrew_sisters : public ScriptedAI
})
.Schedule(Seconds(2), [this](TaskContext mugChuck)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, false, -SPELL_HAS_DARK_BREWMAIDENS_BREW))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, false, -SPELL_HAS_DARK_BREWMAIDENS_BREW))
{
DoCast(target, SPELL_CHUCK_MUG);
}

View File

@@ -571,7 +571,7 @@ struct npc_hallows_end_soh : public ScriptedAI
{
scheduler.Schedule(6s, [this](TaskContext context)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.f, true))
{
me->CastSpell(target, SPELL_HORSEMAN_CONFLAGRATION, false);
target->CastSpell(target, SPELL_HORSEMAN_CONFLAGRATION_SOUND, true);
@@ -1185,7 +1185,7 @@ struct boss_headless_horseman : public ScriptedAI
}
case EVENT_HORSEMAN_CONFLAGRATION:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
{
me->CastSpell(target, SPELL_HORSEMAN_CONFLAGRATION, false);
target->CastSpell(target, SPELL_HORSEMAN_CONFLAGRATION_SOUND, true);

View File

@@ -490,7 +490,7 @@ struct npc_love_in_air_hummel_helper : public ScriptedAI
events.RepeatEvent(12000);
break;
case EVENT_SPELL_THROW:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
{
Position pos(*me);
me->Relocate(target);