mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 22:56:24 +00:00
feat(Core/AI): convert SelectAggroTarget to enum class (#9893)
This commit is contained in:
@@ -583,9 +583,9 @@ public:
|
||||
{
|
||||
summons.Summon(summon);
|
||||
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, -10.0f, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, -10.0f, true);
|
||||
if (!target)
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true);
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true);
|
||||
if (target)
|
||||
{
|
||||
if (summon->GetEntry() == NPC_BALL_OF_INFERNO_FLAME)
|
||||
@@ -1015,7 +1015,7 @@ public:
|
||||
Talk(SAY_VALANAR_BERSERK);
|
||||
break;
|
||||
case EVENT_KINETIC_BOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_KINETIC_BOMB_TARGET, false);
|
||||
Talk(SAY_VALANAR_SPECIAL);
|
||||
@@ -1031,7 +1031,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
me->CastSpell(target, SPELL_SHOCK_VORTEX, false);
|
||||
events.ScheduleEvent(EVENT_SHOCK_VORTEX, urand(18000, 23000));
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
|
||||
summon->AI()->AttackStart(target);
|
||||
|
||||
//if (IsHeroic())
|
||||
@@ -465,7 +465,7 @@ public:
|
||||
switch (action)
|
||||
{
|
||||
case ACTION_MARK_OF_THE_FALLEN_CHAMPION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_MARK_OF_THE_FALLEN_CHAMPION))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true, -SPELL_MARK_OF_THE_FALLEN_CHAMPION))
|
||||
{
|
||||
++_fallenChampionCastCount;
|
||||
me->CastSpell(target, SPELL_MARK_OF_THE_FALLEN_CHAMPION, false);
|
||||
|
||||
@@ -235,12 +235,12 @@ public:
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
|
||||
SelectTargetList(targets, minTargets, SELECT_TARGET_RANDOM, -5.0f, true);
|
||||
SelectTargetList(targets, minTargets, SelectTargetMethod::Random, -5.0f, true);
|
||||
float minDist = 0.0f;
|
||||
if (targets.size() >= minTargets)
|
||||
minDist = -5.0f;
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, minDist, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, minDist, true))
|
||||
me->CastSpell(target, SPELL_VILE_GAS, false);
|
||||
events.ScheduleEvent(EVENT_VILE_GAS, urand(28000, 35000), 1);
|
||||
break;
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_GASTRIC_BLOAT, urand(15000, 17500));
|
||||
break;
|
||||
case EVENT_FESTERGUT_GOO:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NonTankTargetSelector(me)))
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->CastSpell(target, SPELL_MALLABLE_GOO_H, true);
|
||||
events.ScheduleEvent(EVENT_FESTERGUT_GOO, urand(15000, 20000));
|
||||
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
Talk(SAY_BERSERK);
|
||||
break;
|
||||
case EVENT_SPELL_DEATH_AND_DECAY:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
me->CastSpell(target, SPELL_DEATH_AND_DECAY, false);
|
||||
events.RepeatEvent(urand(22000, 30000));
|
||||
break;
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case EVENT_SPELL_SHADOW_BOLT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
me->CastSpell(target, SPELL_SHADOW_BOLT, false);
|
||||
events.RepeatEvent(2100);
|
||||
break;
|
||||
@@ -445,7 +445,7 @@ public:
|
||||
count = 3;
|
||||
|
||||
std::list<Unit*> targets;
|
||||
SelectTargetList(targets, NonTankTargetSelector(me, true), count, SELECT_TARGET_RANDOM);
|
||||
SelectTargetList(targets, NonTankTargetSelector(me, true), count, SelectTargetMethod::Random);
|
||||
if (!targets.empty())
|
||||
for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
me->CastSpell(*itr, SPELL_SUMMON_SHADE, true);
|
||||
@@ -484,7 +484,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true);
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true);
|
||||
}
|
||||
|
||||
summon->AI()->AttackStart(target);
|
||||
@@ -855,7 +855,7 @@ public:
|
||||
events.RepeatEvent(urand(9000, 13000));
|
||||
break;
|
||||
case EVENT_SPELL_ADHERENT_CURSE_OF_TORPOR:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
me->CastSpell(target, SPELL_CURSE_OF_TORPOR, false);
|
||||
events.RepeatEvent(urand(9000, 13000));
|
||||
break;
|
||||
|
||||
@@ -216,10 +216,10 @@ public:
|
||||
break;
|
||||
}
|
||||
events.RepeatEvent(5000);
|
||||
Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 0, BoneStormMoveTargetSelector(me));
|
||||
Unit* unit = SelectTarget(SelectTargetMethod::Random, 0, BoneStormMoveTargetSelector(me));
|
||||
if (!unit)
|
||||
{
|
||||
if ((unit = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 175.0f, true)))
|
||||
if ((unit = SelectTarget(SelectTargetMethod::MaxThreat, 0, 175.0f, true)))
|
||||
if (unit->GetPositionX() > -337.0f)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
@@ -479,9 +479,9 @@ public:
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.clear();
|
||||
Unit* target = GetCaster()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 1, -1.0f, true, -SPELL_IMPALED); // -1.0f as it takes into account object size
|
||||
Unit* target = GetCaster()->GetAI()->SelectTarget(SelectTargetMethod::Random, 1, -1.0f, true, -SPELL_IMPALED); // -1.0f as it takes into account object size
|
||||
if (!target)
|
||||
target = GetCaster()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true); // if only tank or noone outside of boss' model
|
||||
target = GetCaster()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true); // if only tank or noone outside of boss' model
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
|
||||
@@ -548,7 +548,7 @@ public:
|
||||
case EVENT_SLIME_PUDDLE:
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
SelectTargetList(targets, 2, SELECT_TARGET_RANDOM, 0.0f, true);
|
||||
SelectTargetList(targets, 2, SelectTargetMethod::Random, 0.0f, true);
|
||||
if (!targets.empty())
|
||||
for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
me->CastSpell(*itr, SPELL_SLIME_PUDDLE_TRIGGER, true);
|
||||
@@ -621,7 +621,7 @@ public:
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_OOZE_VARIABLE);
|
||||
break;
|
||||
case EVENT_UNBOUND_PLAGUE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, UnboundPlagueTargetSelector(me)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, UnboundPlagueTargetSelector(me)))
|
||||
{
|
||||
me->CastSpell(target, SPELL_UNBOUND_PLAGUE, false);
|
||||
me->CastSpell(target, SPELL_UNBOUND_PLAGUE_SEARCHER, false);
|
||||
@@ -634,7 +634,7 @@ public:
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
SelectTargetList(targets, MalleableGooSelector(me), (IsHeroic() ? 3 : 2), SELECT_TARGET_RANDOM);
|
||||
SelectTargetList(targets, MalleableGooSelector(me), (IsHeroic() ? 3 : 2), SelectTargetMethod::Random);
|
||||
|
||||
if (!targets.empty())
|
||||
{
|
||||
@@ -645,7 +645,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, MalleableGooSelector(me)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, MalleableGooSelector(me)))
|
||||
{
|
||||
Talk(EMOTE_MALLEABLE_GOO);
|
||||
me->CastSpell(target, SPELL_MALLEABLE_GOO, true);
|
||||
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
me->DisableRotate(false);
|
||||
break;
|
||||
case EVENT_SLIME_SPRAY:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankTargetSelector(me)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NonTankTargetSelector(me)))
|
||||
{
|
||||
if (Creature* c = me->SummonCreature(NPC_OOZE_SPRAY_STALKER, *target, TEMPSUMMON_TIMED_DESPAWN, 8000))
|
||||
{
|
||||
@@ -315,12 +315,12 @@ public:
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
|
||||
SelectTargetList(targets, minTargets, SELECT_TARGET_RANDOM, -5.0f, true);
|
||||
SelectTargetList(targets, minTargets, SelectTargetMethod::Random, -5.0f, true);
|
||||
float minDist = 0.0f;
|
||||
if (targets.size() >= minTargets)
|
||||
minDist = -5.0f;
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, minDist, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, minDist, true))
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->CastSpell(target, SPELL_VILE_GAS_H, true); // triggered, to skip LoS check
|
||||
}
|
||||
@@ -897,7 +897,7 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_THIRD_PHASE_CHECK, 5000);
|
||||
break;
|
||||
case EVENT_ICE_TOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, LastPhaseIceTombTargetSelector(me)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, LastPhaseIceTombTargetSelector(me)))
|
||||
{
|
||||
Talk(EMOTE_WARN_FROZEN_ORB, target);
|
||||
me->CastSpell(target, SPELL_ICE_TOMB_DUMMY, true);
|
||||
@@ -1643,7 +1643,7 @@ public:
|
||||
case EVENT_ICY_BLAST_CAST:
|
||||
if (--_icyBlastCounter)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
me->SetFacingToObject(target);
|
||||
me->CastSpell(target, SPELL_ICY_BLAST, false);
|
||||
|
||||
@@ -502,7 +502,7 @@ public:
|
||||
if (Unit* target = _owner->SelectVictim())
|
||||
_owner->AI()->AttackStart(target);
|
||||
if (!_owner->GetVictim())
|
||||
if (Unit* target = _summoner->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankLKTargetSelector(_summoner)))
|
||||
if (Unit* target = _summoner->AI()->SelectTarget(SelectTargetMethod::Random, 0, NonTankLKTargetSelector(_summoner)))
|
||||
_owner->AI()->AttackStart(target);
|
||||
_owner->AI()->DoZoneInCombat();
|
||||
return true;
|
||||
@@ -1055,7 +1055,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_INFEST, 22500, EVENT_GROUP_ABILITIES);
|
||||
break;
|
||||
case EVENT_NECROTIC_PLAGUE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NecroticPlagueTargetCheck(me, NECROTIC_PLAGUE_LK, NECROTIC_PLAGUE_PLR)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NecroticPlagueTargetCheck(me, NECROTIC_PLAGUE_LK, NECROTIC_PLAGUE_PLR)))
|
||||
{
|
||||
Talk(EMOTE_NECROTIC_PLAGUE_WARNING, target);
|
||||
me->CastSpell(target, SPELL_NECROTIC_PLAGUE, false);
|
||||
@@ -1065,12 +1065,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_NECROTIC_PLAGUE, 5000, EVENT_GROUP_ABILITIES);
|
||||
break;
|
||||
case EVENT_SHADOW_TRAP:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, ShadowTrapLKTargetSelector(me, true, true, 100.0f)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, ShadowTrapLKTargetSelector(me, true, true, 100.0f)))
|
||||
me->CastSpell(target, SPELL_SHADOW_TRAP, false);
|
||||
events.ScheduleEvent(EVENT_SHADOW_TRAP, 15500, EVENT_GROUP_ABILITIES);
|
||||
break;
|
||||
case EVENT_PAIN_AND_SUFFERING:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
//events.DelayEventsToMax(500, EVENT_GROUP_ABILITIES);
|
||||
me->SetFacingTo(me->GetAngle(target));
|
||||
@@ -1083,7 +1083,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SUMMON_ICE_SPHERE, 7500, EVENT_GROUP_ABILITIES);
|
||||
break;
|
||||
case EVENT_SUMMON_RAGING_SPIRIT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
me->CastSpell(target, SPELL_RAGING_SPIRIT, false);
|
||||
events.ScheduleEvent(EVENT_SUMMON_RAGING_SPIRIT, (!HealthAbovePct(40) ? 15000 : 20000), EVENT_GROUP_ABILITIES);
|
||||
break;
|
||||
@@ -1108,7 +1108,7 @@ public:
|
||||
events.RescheduleEvent(EVENT_SUMMON_VALKYR, 5000, EVENT_GROUP_ABILITIES);
|
||||
}
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, DefileTargetSelector(me)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, DefileTargetSelector(me)))
|
||||
{
|
||||
Talk(EMOTE_DEFILE_WARNING);
|
||||
me->CastSpell(target, SPELL_DEFILE, false);
|
||||
@@ -1155,7 +1155,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_VILE_SPIRITS, 30000, EVENT_GROUP_VILE_SPIRITS);
|
||||
break;
|
||||
case EVENT_HARVEST_SOUL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankLKTargetSelector(me, true, true, 55.0f)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NonTankLKTargetSelector(me, true, true, 55.0f)))
|
||||
{
|
||||
Talk(SAY_LK_HARVEST_SOUL);
|
||||
me->CastSpell(target, SPELL_HARVEST_SOUL, false);
|
||||
@@ -2700,7 +2700,7 @@ public:
|
||||
}
|
||||
if (!target)
|
||||
if (Creature* lichKing = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_THE_LICH_KING)))
|
||||
target = lichKing->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, NonTankLKTargetSelector(lichKing, true, false, 100.0f));
|
||||
target = lichKing->AI()->SelectTarget(SelectTargetMethod::Random, 0, NonTankLKTargetSelector(lichKing, true, false, 100.0f));
|
||||
if (target)
|
||||
me->CastSpell(target, SPELL_LIFE_SIPHON, false);
|
||||
_events.ScheduleEvent(EVENT_LIFE_SIPHON, 2500);
|
||||
|
||||
@@ -775,12 +775,12 @@ public:
|
||||
_events.ScheduleEvent(EVENT_FROSTBOLT_VOLLEY, urand(8000, 15000));
|
||||
break;
|
||||
case EVENT_MANA_VOID:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, ManaVoidSelector(me)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, ManaVoidSelector(me)))
|
||||
me->CastSpell(target, SPELL_MANA_VOID, false);
|
||||
_events.ScheduleEvent(EVENT_MANA_VOID, urand(20000, 25000));
|
||||
break;
|
||||
case EVENT_COLUMN_OF_FROST:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, -10.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, -10.0f, true))
|
||||
me->CastSpell(target, SPELL_COLUMN_OF_FROST, false);
|
||||
_events.ScheduleEvent(EVENT_COLUMN_OF_FROST, urand(15000, 25000));
|
||||
break;
|
||||
|
||||
@@ -625,7 +625,7 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_DEATH_PLAGUE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_RECENTLY_INFECTED))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true, -SPELL_RECENTLY_INFECTED))
|
||||
{
|
||||
Talk(EMOTE_DEATH_PLAGUE_WARNING, target);
|
||||
DoCast(target, SPELL_DEATH_PLAGUE);
|
||||
@@ -1173,7 +1173,7 @@ public:
|
||||
Talk(SAY_SVALNA_AGGRO);
|
||||
break;
|
||||
case EVENT_IMPALING_SPEAR:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_IMPALING_SPEAR))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true, -SPELL_IMPALING_SPEAR))
|
||||
{
|
||||
DoCast(me, SPELL_AETHER_SHIELD);
|
||||
me->AddAura(70203, me);
|
||||
@@ -1359,7 +1359,7 @@ public:
|
||||
Events.ScheduleEvent(EVENT_ARNATH_SMITE, urand(4000, 7000));
|
||||
break;
|
||||
case EVENT_ARNATH_DOMINATE_MIND:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_DOMINATE_MIND))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true, -SPELL_DOMINATE_MIND))
|
||||
DoCast(target, SPELL_DOMINATE_MIND);
|
||||
Events.ScheduleEvent(EVENT_ARNATH_DOMINATE_MIND, urand(28000, 37000));
|
||||
break;
|
||||
@@ -1437,7 +1437,7 @@ public:
|
||||
Events.ScheduleEvent(EVENT_BRANDON_JUDGEMENT_OF_COMMAND, urand(8000, 13000));
|
||||
break;
|
||||
case EVENT_BRANDON_HAMMER_OF_BETRAYAL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
|
||||
DoCast(target, SPELL_HAMMER_OF_BETRAYAL);
|
||||
Events.ScheduleEvent(EVENT_BRANDON_HAMMER_OF_BETRAYAL, urand(45000, 60000));
|
||||
break;
|
||||
@@ -1505,7 +1505,7 @@ public:
|
||||
Events.ScheduleEvent(EVENT_GRONDEL_SUNDER_ARMOR, urand(5000, 17000));
|
||||
break;
|
||||
case EVENT_GRONDEL_CONFLAGRATION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
DoCast(target, SPELL_CONFLAGRATION);
|
||||
Events.ScheduleEvent(EVENT_GRONDEL_CONFLAGRATION, urand(10000, 15000));
|
||||
break;
|
||||
@@ -1559,17 +1559,17 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_RUPERT_FEL_IRON_BOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
DoCast(target, SPELL_FEL_IRON_BOMB);
|
||||
Events.ScheduleEvent(EVENT_RUPERT_FEL_IRON_BOMB, urand(15000, 20000));
|
||||
break;
|
||||
case EVENT_RUPERT_MACHINE_GUN:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_MACHINE_GUN);
|
||||
Events.ScheduleEvent(EVENT_RUPERT_MACHINE_GUN, urand(25000, 30000));
|
||||
break;
|
||||
case EVENT_RUPERT_ROCKET_LAUNCH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_ROCKET_LAUNCH);
|
||||
Events.ScheduleEvent(EVENT_RUPERT_ROCKET_LAUNCH, urand(10000, 15000));
|
||||
break;
|
||||
@@ -1711,7 +1711,7 @@ public:
|
||||
break;
|
||||
case 3: // Volley
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 35.0f, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 35.0f, true);
|
||||
if (target && me->GetDistance(target) > 10.0f)
|
||||
{
|
||||
me->CastSpell(target, 71252, false);
|
||||
@@ -1740,7 +1740,7 @@ public:
|
||||
me->CastSpell(me, 71270, true);
|
||||
break;
|
||||
case 32: // Frozen Orb
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 30.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 30.0f, true))
|
||||
me->CastSpell(target, 71274, false);
|
||||
events.RepeatEvent(urand(40000, 50000));
|
||||
break;
|
||||
@@ -2901,7 +2901,7 @@ public:
|
||||
uint8 count = me->GetMap()->Is25ManRaid() ? 4 : 2;
|
||||
bool casted = false;
|
||||
for (uint8 i = 0; i < count; ++i)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 37.5f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 37.5f, true))
|
||||
{
|
||||
casted = true;
|
||||
me->CastSpell(target, 71906, true); // Severed Essence
|
||||
@@ -3114,7 +3114,7 @@ public:
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 1:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
|
||||
me->CastSpell(target, 70362, false);
|
||||
events.RepeatEvent(urand(25000, 35000));
|
||||
break;
|
||||
@@ -3408,7 +3408,7 @@ public:
|
||||
events.RepeatEvent(urand(20000, 30000));
|
||||
break;
|
||||
case 3:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
|
||||
me->CastSpell(target, 70980, false);
|
||||
events.RepeatEvent(urand(20000, 30000));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user