mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 02:23:49 +00:00
feat(Core/AI): convert SelectAggroTarget to enum class (#9893)
This commit is contained in:
@@ -215,12 +215,12 @@ public:
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_SHADOW_FISSURE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->CastSpell(target, SPELL_SHADOW_FISSURE, false);
|
||||
events.RescheduleEvent(EVENT_SPELL_SHADOW_FISSURE, urand(7500, 10000));
|
||||
break;
|
||||
case EVENT_SPELL_DEATH_COIL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_DEATH_COIL_N, SPELL_DEATH_COIL_H), false);
|
||||
events.RescheduleEvent(EVENT_SPELL_DEATH_COIL, urand(15000, 20000));
|
||||
break;
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_THUNDER_CLAP, 25000);
|
||||
break;
|
||||
case EVENT_RESET_THREAT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
uint8 threatYell = urand(EVENT_THREAT_YELL_L_1, EVENT_THREAT_YELL_R_1);
|
||||
if (Creature* head = threatYell == EVENT_THREAT_YELL_R_1 ? GetRightHead() : GetLeftHead())
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (summon->GetEntry() != NPC_SHATTERED_ASSASSIN)
|
||||
summon->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
summon->AI()->AttackStart(SelectTarget(SelectTargetMethod::Random, 0));
|
||||
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user