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

@@ -138,7 +138,7 @@ public:
if (SwarmTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
{
DoCast(target, SPELL_CARRION_SWARM);
}
@@ -152,7 +152,7 @@ public:
{
for (uint8 i = 0; i < 3; ++i)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
target->CastSpell(target, SPELL_SLEEP, true);
}
SleepTimer = 60000;
@@ -167,7 +167,7 @@ public:
else AuraTimer -= diff;
if (InfernoTimer <= diff)
{
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_INFERNO);
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 100, true), SPELL_INFERNO);
InfernoTimer = 45000;
Talk(SAY_INFERNO);
}

View File

@@ -490,7 +490,7 @@ public:
{
// Three doomfire can be up at the same time
Talk(SAY_DOOMFIRE);
Unit* temp = SelectTarget(SELECT_TARGET_RANDOM, 1);
Unit* temp = SelectTarget(SelectTargetMethod::Random, 1);
if (!temp)
temp = me->GetVictim();
@@ -647,19 +647,19 @@ public:
case EVENT_SPELL_FINGER_OF_DEATH:
if (CanUseFingerOfDeath())
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
DoCast(target, SPELL_FINGER_OF_DEATH);
DoCastVictim(SPELL_RED_SKY_EFFECT);
}
events.ScheduleEvent(EVENT_SPELL_FINGER_OF_DEATH, 3500);
break;
case EVENT_SPELL_GRIP_OF_THE_LEGION:
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_GRIP_OF_THE_LEGION);
DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_GRIP_OF_THE_LEGION);
events.ScheduleEvent(EVENT_SPELL_GRIP_OF_THE_LEGION, urand(5000, 25000));
break;
case EVENT_SPELL_AIR_BURST:
Talk(SAY_AIR_BURST);
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_AIR_BURST);
DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_AIR_BURST);
events.ScheduleEvent(EVENT_SPELL_AIR_BURST, urand(25000, 40000));
break;
case EVENT_SPELL_FEAR:

View File

@@ -141,14 +141,14 @@ public:
if (RainTimer <= diff)
{
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true), SPELL_RAIN_OF_FIRE);
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 30, true), SPELL_RAIN_OF_FIRE);
RainTimer = 20000 + rand() % 15000;
}
else RainTimer -= diff;
if (DoomTimer <= diff)
{
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true), SPELL_DOOM);//never on tank
DoCast(SelectTarget(SelectTargetMethod::Random, 1, 100, true), SPELL_DOOM);//never on tank
DoomTimer = 45000 + rand() % 5000;
}
else DoomTimer -= diff;
@@ -269,7 +269,7 @@ public:
if (CrippleTimer <= diff)
{
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_CRIPPLE);
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 100, true), SPELL_CRIPPLE);
CrippleTimer = 25000 + rand() % 5000;
}
else CrippleTimer -= diff;

View File

@@ -151,7 +151,7 @@ public:
else NovaTimer -= diff;
if (IceboltTimer <= diff)
{
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true), SPELL_ICEBOLT);
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 40, true), SPELL_ICEBOLT);
IceboltTimer = 11000 + rand() % 20000;
}
else IceboltTimer -= diff;

View File

@@ -854,7 +854,7 @@ void hyjalAI::UpdateAI(uint32 diff)
break;
case TARGETTYPE_RANDOM:
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
target = SelectTarget(SelectTargetMethod::Random, 0);
break;
case TARGETTYPE_VICTIM:

View File

@@ -764,7 +764,7 @@ public:
void JustSummoned(Creature* summon) override
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30, true);
if (target)
summon->Attack(target, false);
summons.Summon(summon);
@@ -1365,7 +1365,7 @@ public:
forcemove = false;
if (forcemove)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
me->Attack(target, false);
}
if (MoveTimer <= diff)

View File

@@ -114,7 +114,7 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_SPELL_CURSE_OF_EXERTION:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
me->CastSpell(target, SPELL_CURSE_OF_EXERTION, false);
events.RepeatEvent(9000);
break;
@@ -129,7 +129,7 @@ public:
case EVENT_SPELL_TIME_WARP:
Talk(SAY_TIME_WARP);
me->CastSpell(me, SPELL_TIME_WARP, false);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
me->CastSpell(target, DUNGEON_MODE(SPELL_TIME_STEP_N, SPELL_TIME_STEP_H), true);
events.RepeatEvent(25000);

View File

@@ -149,7 +149,7 @@ public:
events.RepeatEvent(8000);
break;
case EVENT_SPELL_CORRUPTING_BLIGHT:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
me->CastSpell(target, SPELL_CORRUPTING_BLIGHT, false);
events.RepeatEvent(12000);
break;

View File

@@ -149,13 +149,13 @@ public:
events.RepeatEvent(7000);
break;
case EVENT_SPELL_MIND_BLAST:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
me->CastSpell(target, DUNGEON_MODE(SPELL_MIND_BLAST_N, SPELL_MIND_BLAST_H), false);
events.RepeatEvent(6000);
break;
case EVENT_SPELL_SLEEP:
Talk(SAY_SLEEP);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
me->CastSpell(target, DUNGEON_MODE(SPELL_SLEEP_N, SPELL_SLEEP_H), false);
events.RepeatEvent(17000);
break;

View File

@@ -105,7 +105,7 @@ public:
events.RepeatEvent(20000);
break;
case EVENT_SPELL_CONSTRICTING_CHAINS:
if (Unit* pTarget = SelectTarget(SELECT_TARGET_BOTTOMAGGRO, 0, 50.0f, true))
if (Unit* pTarget = SelectTarget(SelectTargetMethod::MinThreat, 0, 50.0f, true))
me->CastSpell(pTarget, DUNGEON_MODE(SPELL_CONSTRICTING_CHAINS_N, SPELL_CONSTRICTING_CHAINS_H), false);
events.RepeatEvent(14000);
break;

View File

@@ -1177,7 +1177,7 @@ public:
switch (combatEvents.ExecuteEvent())
{
case EVENT_COMBAT_EXORCISM:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
me->CastSpell(target, DUNGEON_MODE(SPELL_ARTHAS_EXORCISM_N, SPELL_ARTHAS_EXORCISM_H), false);
combatEvents.RepeatEvent(7300);

View File

@@ -134,7 +134,7 @@ public:
events.ScheduleEvent(EVENT_WHIRLWIND, 25000);
break;
case EVENT_EXPLODING_SHOT:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 40.0f))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 40.0f))
me->CastSpell(target, SPELL_EXPLODING_SHOT, false);
events.ScheduleEvent(EVENT_EXPLODING_SHOT, 25000);
break;

View File

@@ -390,7 +390,7 @@ public:
}
case EVENT_SPELL_FIREBALL_FIRST:
{
if (Unit* v = SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true))
if (Unit* v = SelectTarget(SelectTargetMethod::Random, 0, 200.0f, true))
{
me->SetFacingToObject(v);
DoCast(v, SPELL_FIREBALL);
@@ -401,7 +401,7 @@ public:
}
case EVENT_SPELL_FIREBALL_SECOND:
{
if (Unit* v = SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true))
if (Unit* v = SelectTarget(SelectTargetMethod::Random, 0, 200.0f, true))
{
me->SetFacingToObject(v);
DoCast(v, SPELL_FIREBALL);
@@ -467,7 +467,7 @@ public:
{
me->SetReactState(REACT_AGGRESSIVE);
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 0, false))
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, 0, false))
{
AttackStart(target);
}

View File

@@ -100,7 +100,7 @@ public:
who->GetMotionMaster()->MovePoint(POINT_PARALYZE, AltarPos);
break;
case NPC_HORNET:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
who->AI()->AttackStart(target);
break;
}
@@ -187,7 +187,7 @@ public:
events.ScheduleEvent(EVENT_POISON_STINGER, urand(2000, 3000));
break;
case EVENT_PARALYZE:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0, true))
{
DoCast(target, SPELL_PARALYZE);
instance->SetGuidData(DATA_PARALYZED, target->GetGUID());
@@ -199,7 +199,7 @@ public:
case EVENT_SWARMER_ATTACK:
for (ObjectGuid const& guid : _swarmers)
if (Creature* swarmer = me->GetMap()->GetCreature(guid))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
swarmer->AI()->AttackStart(target);
_swarmers.clear();

View File

@@ -117,7 +117,7 @@ public:
events.ScheduleEvent(EVENT_GATHERING_SPEED, 9000);
events.ScheduleEvent(EVENT_FULL_SPEED, 60000);
if (Unit* victim = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
if (Unit* victim = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
{
DoResetThreat();
AttackStart(victim);
@@ -215,7 +215,7 @@ public:
{
if (who->GetEntry() == NPC_HATCHLING)
if (Creature* buru = me->GetMap()->GetCreature(_instance->GetGuidData(DATA_BURU)))
if (Unit* target = buru->AI()->SelectTarget(SELECT_TARGET_RANDOM))
if (Unit* target = buru->AI()->SelectTarget(SelectTargetMethod::Random))
who->AI()->AttackStart(target);
}

View File

@@ -99,7 +99,7 @@ public:
events.ScheduleEvent(EVENT_MORTAL_WOUND, 8000);
break;
case EVENT_SANDTRAP:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
target->CastSpell(target, SPELL_SANDTRAP, true);
else if (Unit* victim = me->GetVictim())
victim->CastSpell(victim, SPELL_SANDTRAP, true);

View File

@@ -190,7 +190,7 @@ public:
//Charge_Timer
if (Charge_Timer <= diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
if (target)
{
DoCast(target, SPELL_CHARGE);
@@ -267,7 +267,7 @@ public:
for (uint8 i = 0; i < 10; ++i)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
{
if (Creature* Summoned = me->SummonCreature(15621, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000))
Summoned->AI()->AttackStart(target);

View File

@@ -220,7 +220,7 @@ public:
void SpawnEyeTentacle(float x, float y)
{
if (Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
if (Spawned->AI())
Spawned->AI()->AttackStart(target);
}
@@ -260,7 +260,7 @@ public:
if (BeamTimer <= diff)
{
//SPELL_GREEN_BEAM
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
{
me->InterruptNonMeleeSpells(false);
DoCast(target, SPELL_GREEN_BEAM);
@@ -277,7 +277,7 @@ public:
//ClawTentacleTimer
if (ClawTentacleTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
{
//Spawn claw tentacle on the random target
Creature* spawned = me->SummonCreature(NPC_CLAW_TENTACLE, *target, TEMPSUMMON_CORPSE_DESPAWN, 500);
@@ -306,7 +306,7 @@ public:
me->SetTarget();
//Select random target for dark beam to start on
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
{
//Face our target
DarkGlareAngle = me->GetAngle(target);
@@ -967,7 +967,7 @@ public:
//MindflayTimer
if (MindflayTimer <= diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
if (target && !target->HasAura(SPELL_DIGESTIVE_ACID))
DoCast(target, SPELL_MIND_FLAY);
@@ -1043,7 +1043,7 @@ public:
//Dissapear and reappear at new position
me->SetVisible(false);
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
if (!target)
{
Unit::Kill(me, me);
@@ -1157,7 +1157,7 @@ public:
//Dissapear and reappear at new position
me->SetVisible(false);
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
if (!target)
{
Unit::Kill(me, me);
@@ -1265,7 +1265,7 @@ public:
//BeamTimer
if (BeamTimer <= diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
if (target && !target->HasAura(SPELL_DIGESTIVE_ACID))
DoCast(target, SPELL_GREEN_BEAM);

View File

@@ -128,16 +128,16 @@ public:
switch (urand(0, 2))
{
case 0:
SummonSpawn(SelectTarget(SELECT_TARGET_RANDOM, 0));
SummonSpawn(SelectTarget(SelectTargetMethod::Random, 0));
break;
case 1:
SummonSpawn(SelectTarget(SELECT_TARGET_RANDOM, 0));
SummonSpawn(SelectTarget(SELECT_TARGET_RANDOM, 0));
SummonSpawn(SelectTarget(SelectTargetMethod::Random, 0));
SummonSpawn(SelectTarget(SelectTargetMethod::Random, 0));
break;
case 2:
SummonSpawn(SelectTarget(SELECT_TARGET_RANDOM, 0));
SummonSpawn(SelectTarget(SELECT_TARGET_RANDOM, 0));
SummonSpawn(SelectTarget(SELECT_TARGET_RANDOM, 0));
SummonSpawn(SelectTarget(SelectTargetMethod::Random, 0));
SummonSpawn(SelectTarget(SelectTargetMethod::Random, 0));
SummonSpawn(SelectTarget(SelectTargetMethod::Random, 0));
break;
}
SpawnSpawns_Timer = urand(30000, 60000);
@@ -150,7 +150,7 @@ public:
{
if (SpawnHatchlings_Timer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
{
DoCast(target, SPELL_ROOT);

View File

@@ -100,7 +100,7 @@ public:
// Wyvern Timer
if (Wyvern_Timer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
DoCast(target, SPELL_WYVERNSTING);
Wyvern_Timer = urand(15000, 32000);
}

View File

@@ -168,7 +168,7 @@ public:
//ChangeTarget_Timer
if (Submerged && ChangeTarget_Timer <= diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0);
if (target)
me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), me->GetOrientation());

View File

@@ -108,7 +108,7 @@ public:
if (WhirlWindRandom_Timer <= diff)
{
//Attack random Gamers
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
{
me->AddThreat(target, 1.0f);
me->TauntApply(target);
@@ -139,7 +139,7 @@ public:
if (AggroReset_Timer <= diff)
{
//Attack random Gamers
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
{
me->AddThreat(target, 1.0f);
me->TauntApply(target);
@@ -249,7 +249,7 @@ public:
if (WhirlWindRandom_Timer <= diff)
{
//Attack random Gamers
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
{
me->AddThreat(target, 1.0f);
me->TauntApply(target);
@@ -272,7 +272,7 @@ public:
if (AggroReset_Timer <= diff)
{
//Attack random Gamers
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
{
me->AddThreat(target, 1.0f);
me->TauntApply(target);

View File

@@ -96,7 +96,7 @@ public:
if (_flag & (1 << 7))
_flag = 0;
if (Unit* Target = SelectTarget(SELECT_TARGET_RANDOM))
if (Unit* Target = SelectTarget(SelectTargetMethod::Random))
creature->AI()->AttackStart(Target);
float ImageHealthPct;
@@ -151,7 +151,7 @@ public:
case EVENT_FULLFILMENT:
/// @todo For some weird reason boss does not cast this
// Spell actually works, tested in duel
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true), SPELL_TRUE_FULFILLMENT, true);
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true), SPELL_TRUE_FULFILLMENT, true);
events.ScheduleEvent(EVENT_FULLFILMENT, urand(20000, 30000));
break;
case EVENT_BLINK:

View File

@@ -439,7 +439,7 @@ public:
if (UpperCut_Timer <= diff)
{
Unit* randomMelee = SelectTarget(SELECT_TARGET_RANDOM, 0, NOMINAL_MELEE_RANGE, true);
Unit* randomMelee = SelectTarget(SelectTargetMethod::Random, 0, NOMINAL_MELEE_RANGE, true);
if (randomMelee)
DoCast(randomMelee, SPELL_UPPERCUT);
UpperCut_Timer = 15000 + rand() % 15000;
@@ -536,7 +536,7 @@ public:
//Blizzard_Timer
if (Blizzard_Timer <= diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45, true);
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 45, true);
if (target)
{
DoCast(target, SPELL_BLIZZARD);
@@ -548,7 +548,7 @@ public:
if (ArcaneBurst_Timer <= diff)
{
Unit* mvic;
if ((mvic = SelectTarget(SELECT_TARGET_NEAREST, 0, NOMINAL_MELEE_RANGE, true)) != nullptr)
if ((mvic = SelectTarget(SelectTargetMethod::MaxDistance, 0, NOMINAL_MELEE_RANGE, true)) != nullptr)
{
DoCast(mvic, SPELL_ARCANEBURST);
ArcaneBurst_Timer = 5000;

View File

@@ -130,7 +130,7 @@ public:
//ManaStormTimer
if (ManaStormTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
DoCast(target, SPELL_MANASTORM);
ManaStormTimer = urand(7500, 12500);
}

View File

@@ -640,7 +640,7 @@ public:
events.ScheduleEvent(EVENT_CAST_CLEAVE, urand(8000, 10000));
break;
case EVENT_CAST_STARFALL:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
DoCast(target, SPELL_OMEN_STARFALL);
events.ScheduleEvent(EVENT_CAST_STARFALL, urand(14000, 16000));
break;

View File

@@ -70,7 +70,7 @@ public:
if (_berserkerChargeTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
{
DoCast(target, SPELL_BERSERKER_CHARGE);
}