mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
feat(Core/AI): convert SelectAggroTarget to enum class (#9893)
This commit is contained in:
@@ -138,7 +138,7 @@ public:
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
CAST_AI(npc_water_elemental::npc_water_elementalAI, summoned->AI())->balindaGUID = me->GetGUID();
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
|
||||
summoned->AI()->AttackStart(SelectTarget(SelectTargetMethod::Random, 0, 50, true));
|
||||
summoned->SetFaction(me->GetFaction());
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
@@ -83,14 +83,14 @@ public:
|
||||
events.ScheduleEvent(SPELL_SHADOWBOLT, urand(TIMER_SHADOWBOLT - 2000, TIMER_SHADOWBOLT + 2000));
|
||||
break;
|
||||
case SPELL_CURSE_TONGUES:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(target, SPELL_CURSE_TONGUES);
|
||||
}
|
||||
events.ScheduleEvent(SPELL_CURSE_TONGUES, urand(TIMER_CURSE_TONGUES - 2000, TIMER_CURSE_TONGUES + 2000));
|
||||
break;
|
||||
case SPELL_CURSE_WEAKNESS:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(target, SPELL_CURSE_WEAKNESS);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
events.ScheduleEvent(SPELL_DEMON_ARMOR, TIMER_DEMON_ARMOR);
|
||||
break;
|
||||
case SPELL_ENVELOPING_WEB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_ENVELOPING_WEB);
|
||||
events.ScheduleEvent(SPELL_ENVELOPING_WEB, urand(TIMER_ENVELOPING_WEB - 2000, TIMER_ENVELOPING_WEB + 2000));
|
||||
break;
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case SPELL_HANDOFTHAURISSAN:
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM), SPELL_HANDOFTHAURISSAN);
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random), SPELL_HANDOFTHAURISSAN);
|
||||
//DoCastVictim(SPELL_HANDOFTHAURISSAN);
|
||||
events.ScheduleEvent(SPELL_HANDOFTHAURISSAN, urand(4000, 7000));
|
||||
break;
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
//ShadowWordPain_Timer
|
||||
if (ShadowWordPain_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_SHADOWWORDPAIN);
|
||||
ShadowWordPain_Timer = 7000;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
//ManaBurn_Timer
|
||||
if (ManaBurn_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_MANABURN);
|
||||
ManaBurn_Timer = 10000;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case SPELL_ARCANE_BOLT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(target, SPELL_ARCANE_BOLT);
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
events.ScheduleEvent(SPELL_ARCANE_EXPLOSION, nextArcaneExplosionTime);
|
||||
break;
|
||||
case SPELL_POLYMORPH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(target, SPELL_POLYMORPH);
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
_events.ScheduleEvent(EVENT_SPELL_SHADOWBOLTVOLLEY, 12000);
|
||||
break;
|
||||
case EVENT_SPELL_IMMOLATE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(target, SPELL_IMMOLATE);
|
||||
_events.ScheduleEvent(EVENT_SPELL_IMMOLATE, 25000);
|
||||
|
||||
@@ -116,7 +116,7 @@ struct boss_mor_grayhoof : public BossAI
|
||||
spell = Acore::Containers::SelectRandomContainerElement(faerieSpells);
|
||||
if (spell == SPELL_SLEEP)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_SLEEP);
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
if (!Summoned && HealthBelowPct(51))
|
||||
{
|
||||
Talk(CALL_HELP);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
if (Creature* warlord = me->SummonCreature(NPC_SPIRESTONE_WARLORD, SummonLocation1, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS))
|
||||
warlord->AI()->AttackStart(target);
|
||||
|
||||
@@ -427,7 +427,7 @@ public:
|
||||
_events.ScheduleEvent(EVENT_STRIKE, urand(14000, 23000));
|
||||
break;
|
||||
case EVENT_ENCAGE:
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), EVENT_ENCAGE, true);
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 100, true), EVENT_ENCAGE, true);
|
||||
_events.ScheduleEvent(EVENT_ENCAGE, urand(6000, 12000));
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_TERRIFYING_ROAR, 20 * IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_BERSERKER_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 38.f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 38.f, true))
|
||||
{
|
||||
DoCast(target, SPELL_BERSERKER_CHARGE);
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
DoCastVictim(SPELL_SHADOWBOLT_VOLLEY);
|
||||
break;
|
||||
case 1:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40, true))
|
||||
DoCast(target, SPELL_SHADOWBOLT);
|
||||
break;
|
||||
}
|
||||
@@ -326,12 +326,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000));
|
||||
break;
|
||||
case EVENT_FEAR:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40, true))
|
||||
DoCast(target, SPELL_FEAR);
|
||||
events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000));
|
||||
break;
|
||||
case EVENT_MIND_CONTROL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40, true))
|
||||
DoCast(target, SPELL_SHADOW_COMMAND);
|
||||
events.ScheduleEvent(EVENT_MIND_CONTROL, urand(30000, 35000));
|
||||
break;
|
||||
@@ -521,7 +521,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_TAILLASH, 10000);
|
||||
break;
|
||||
case EVENT_CLASSCALL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
switch (target->getClass())
|
||||
{
|
||||
case CLASS_MAGE:
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
case EVENT_CONFLAGRATION:
|
||||
DoCastVictim(SPELL_CONFLAGRATION);
|
||||
if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_CONFLAGRATION))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
|
||||
me->TauntApply(target);
|
||||
events.ScheduleEvent(EVENT_CONFLAGRATION, 30000);
|
||||
break;
|
||||
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
{
|
||||
//selects a random target that isn't the current victim and is a mana user (selects mana users) but not pets
|
||||
//it also ignores targets who have the aura. We don't want to place the debuff on the same target twice.
|
||||
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 1, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA && !u->HasAura(SPELL_BURNINGADRENALINE); }))
|
||||
if (Unit *target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA && !u->HasAura(SPELL_BURNINGADRENALINE); }))
|
||||
{
|
||||
me->CastSpell(target, SPELL_BURNINGADRENALINE, true);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
}
|
||||
case EVENT_IGNITE_MANA:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_IGNITE_MANA))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_IGNITE_MANA))
|
||||
{
|
||||
DoCast(target, SPELL_IGNITE_MANA);
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
}
|
||||
case EVENT_LIVING_BOMB:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_LIVING_BOMB);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
}
|
||||
case EVENT_RAIN_OF_FIRE:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_RAIN_OF_FIRE, true);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
{
|
||||
if (urand(0, 1))
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_SHADOW_BOLT_RANDOM);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
case EVENT_LAVA_BOMB:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, MELEE_TARGET_LOOKUP_DIST, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, MELEE_TARGET_LOOKUP_DIST, true))
|
||||
{
|
||||
DoCast(target, SPELL_LAVA_BOMB);
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
SelectTargetList(targets, [this](Unit* target)
|
||||
{
|
||||
return target && target->IsPlayer() && target->GetDistance(me) > MELEE_TARGET_LOOKUP_DIST && target->GetDistance(me) < 100.0f;
|
||||
}, 1, SELECT_TARGET_RANDOM);
|
||||
}, 1, SelectTargetMethod::Random);
|
||||
|
||||
if (!targets.empty())
|
||||
{
|
||||
|
||||
@@ -322,7 +322,7 @@ public:
|
||||
}
|
||||
case EVENT_TELEPORT_RANDOM:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
|
||||
{
|
||||
DoCastSelf(SPELL_HATE_TO_ZERO, true);
|
||||
DoCast(target, SPELL_TELEPORT_RANDOM);
|
||||
|
||||
@@ -344,7 +344,7 @@ public:
|
||||
|
||||
if (!IsVictimWithinMeleeRange())
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, [&](Unit* u) { return u && u->IsPlayer() && me->IsWithinMeleeRange(u); }))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, [&](Unit* u) { return u && u->IsPlayer() && me->IsWithinMeleeRange(u); }))
|
||||
{
|
||||
me->AttackerStateUpdate(target);
|
||||
me->SetTarget(target->GetGUID());
|
||||
@@ -380,7 +380,7 @@ public:
|
||||
}
|
||||
case EVENT_MIGHT_OF_RAGNAROS:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, [](Unit const* target)
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, [](Unit const* target)
|
||||
{
|
||||
return target->IsPlayer() && target->getPowerType() == POWER_MANA;
|
||||
}))
|
||||
@@ -460,7 +460,7 @@ public:
|
||||
|
||||
me->RemoveAurasDueToSpell(SPELL_RAGNA_SUBMERGE_VISUAL);
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
}
|
||||
case EVENT_SHAZZRAH_CURSE:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_SHAZZRAH_CURSE))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_SHAZZRAH_CURSE))
|
||||
{
|
||||
DoCast(target, SPELL_SHAZZRAH_CURSE);
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
}
|
||||
case EVENT_SHADOW_WORD_PAIN:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_SHADOW_WORD_PAIN))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_SHADOW_WORD_PAIN))
|
||||
{
|
||||
DoCast(target, SPELL_SHADOW_WORD_PAIN);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
}
|
||||
case EVENT_IMMOLATE:
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_IMMOLATE))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_IMMOLATE))
|
||||
{
|
||||
DoCast(target, SPELL_IMMOLATE);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
me->CastSpell(me, SPELL_ASTRAL_DECONSTRUCTION, true);
|
||||
break;
|
||||
case EVENT_SPELL_HATEFUL_BOLT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, urand(1, 2), 40.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, urand(1, 2), 40.0f))
|
||||
me->CastSpell(target, SPELL_HATEFUL_BOLT, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_HATEFUL_BOLT, urand(5000, 7500) * (events.GetNextEventTime(EVENT_SPELL_BERSERK) == 0 ? 1 : 2));
|
||||
break;
|
||||
|
||||
@@ -97,12 +97,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_REPENTANCE, urand(25000, 35000));
|
||||
break;
|
||||
case EVENT_SPELL_HOLY_FIRE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
|
||||
me->CastSpell(target, SPELL_HOLY_FIRE, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_HOLY_FIRE, urand(8000, 18000));
|
||||
break;
|
||||
case EVENT_SPELL_HOLY_WRATH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
|
||||
me->CastSpell(target, SPELL_HOLY_WRATH, true);
|
||||
events.ScheduleEvent(EVENT_SPELL_HOLY_WRATH, urand(20000, 25000));
|
||||
break;
|
||||
|
||||
@@ -398,7 +398,7 @@ public:
|
||||
_events.ScheduleEvent(EVENT_RANDOM_YELL, urand(30000, 70000));
|
||||
break;
|
||||
case EVENT_SPELL_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, 24.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, 24.0f, true))
|
||||
me->CastSpell(target, SPELL_CHARGE_MIDNIGHT, false);
|
||||
_events.ScheduleEvent(EVENT_SPELL_CHARGE, 20000);
|
||||
break;
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
me->CastSpell(me, SPELL_BERSERK, true);
|
||||
break;
|
||||
case EVENT_SPELL_BLIND:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1, 10.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 10.0f, true))
|
||||
me->CastSpell(target, SPELL_BLIND, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLIND, urand(25000, 40000));
|
||||
break;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
return;
|
||||
case EVENT_SPELL_GARROTE:
|
||||
Talk(SAY_SPECIAL);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
target->CastSpell(target, SPELL_GARROTE, true);
|
||||
me->CastSpell(me, SPELL_VANISH_TELEPORT, false);
|
||||
events.SetPhase(0);
|
||||
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
// Void Zone
|
||||
if (VoidZoneTimer <= diff)
|
||||
{
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1, 45, true), SPELL_VOIDZONE, true);
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random, 1, 45, true), SPELL_VOIDZONE, true);
|
||||
VoidZoneTimer = 15000;
|
||||
}
|
||||
else
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
// Netherbreath
|
||||
if (NetherbreathTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40, true))
|
||||
DoCast(target, SPELL_NETHERBREATH);
|
||||
NetherbreathTimer = urand(5000, 7000);
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
|
||||
if (CharredEarthTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_CHARRED_EARTH);
|
||||
CharredEarthTimer = 20000;
|
||||
}
|
||||
@@ -329,7 +329,7 @@ public:
|
||||
|
||||
if (TailSweepTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
if (!me->HasInArc(M_PI, target))
|
||||
DoCast(target, SPELL_TAIL_SWEEP);
|
||||
TailSweepTimer = 15000;
|
||||
@@ -339,7 +339,7 @@ public:
|
||||
|
||||
if (SearingCindersTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_SEARING_CINDERS);
|
||||
SearingCindersTimer = 10000;
|
||||
}
|
||||
@@ -385,7 +385,7 @@ public:
|
||||
|
||||
if (DistractingAshTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_DISTRACTING_ASH);
|
||||
DistractingAshTimer = 2000; //timer wrong
|
||||
}
|
||||
@@ -406,7 +406,7 @@ public:
|
||||
|
||||
if (FireballBarrageTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0))
|
||||
DoCast(target, SPELL_FIREBALL_BARRAGE);
|
||||
FireballBarrageTimer = 20000;
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ public:
|
||||
// if phase == 1 target the tank, otherwise anyone but the tank
|
||||
Unit* target = phase == 1
|
||||
? me->GetVictim()
|
||||
: SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
: SelectTarget(SelectTargetMethod::Random, 1, 100, true);
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -422,7 +422,7 @@ public:
|
||||
{
|
||||
if (AmplifyDamageTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true);
|
||||
|
||||
if (target)
|
||||
{
|
||||
@@ -492,7 +492,7 @@ public:
|
||||
|
||||
void changetarget()
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
if (me->GetVictim())
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_ACIDIC_FANG, urand(12000, 18000));
|
||||
break;
|
||||
case EVENT_SPELL_HYAKISS_WEB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
me->CastSpell(target, SPELL_HYAKISS_WEB, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_HYAKISS_WEB, 15000);
|
||||
break;
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_WING_BUFFET, urand(12000, 18000));
|
||||
break;
|
||||
case EVENT_SPELL_DIVE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_FARTHEST, 0, FarthestTargetSelector(me, 40.0f, false, true)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MinDistance, 0, FarthestTargetSelector(me, 40.0f, false, true)))
|
||||
me->CastSpell(target, SPELL_DIVE, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_DIVE, 20000);
|
||||
break;
|
||||
|
||||
@@ -286,7 +286,7 @@ public:
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCast(false))
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
DoCast(me, SPELL_AOE_CS);
|
||||
break;
|
||||
case 1:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_CHAINSOFICE);
|
||||
break;
|
||||
}
|
||||
@@ -412,7 +412,7 @@ public:
|
||||
|
||||
if (ElementalOne)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
@@ -426,7 +426,7 @@ public:
|
||||
|
||||
if (ElementalTwo)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
@@ -440,7 +440,7 @@ public:
|
||||
|
||||
if (ElementalThree)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
@@ -454,7 +454,7 @@ public:
|
||||
|
||||
if (ElementalFour)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true);
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ public:
|
||||
|
||||
if (SacrificeTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true);
|
||||
if (target && target->IsAlive())
|
||||
{
|
||||
DoCast(target, SPELL_SACRIFICE, true);
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
|
||||
if (ShadowboltTimer <= diff)
|
||||
{
|
||||
DoCast(SelectTarget(SELECT_TARGET_TOPAGGRO, 0), SPELL_SHADOW_BOLT);
|
||||
DoCast(SelectTarget(SelectTargetMethod::MaxThreat, 0), SPELL_SHADOW_BOLT);
|
||||
ShadowboltTimer = 10000;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
|
||||
if (WaterBoltTimer <= diff)
|
||||
{
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_WATERBOLT);
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_WATERBOLT);
|
||||
WaterBoltTimer = TitoDied ? 1500 : 5000;
|
||||
}
|
||||
else
|
||||
@@ -419,7 +419,7 @@ public:
|
||||
|
||||
if (BrainWipeTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_BRAIN_WIPE);
|
||||
BrainWipeTimer = 20000;
|
||||
}
|
||||
@@ -909,7 +909,7 @@ public:
|
||||
{
|
||||
if (!IsChasing)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
Talk(SAY_WOLF_HOOD);
|
||||
DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true);
|
||||
@@ -1324,7 +1324,7 @@ public:
|
||||
|
||||
if (BackwardLungeTimer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true);
|
||||
if (target && !me->HasInArc(M_PI, target))
|
||||
{
|
||||
DoCast(target, SPELL_BACKWARD_LUNGE);
|
||||
@@ -1344,7 +1344,7 @@ public:
|
||||
|
||||
if (DeadlySwatheTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_DEADLY_SWATHE);
|
||||
DeadlySwatheTimer = urand(15000, 25000);
|
||||
}
|
||||
@@ -1464,7 +1464,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
|
||||
|
||||
if (BlindingPassionTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_BLINDING_PASSION);
|
||||
BlindingPassionTimer = urand(30000, 45000);
|
||||
}
|
||||
@@ -1481,7 +1481,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
|
||||
|
||||
if (PowerfulAttractionTimer <= diff)
|
||||
{
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_POWERFUL_ATTRACTION);
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_POWERFUL_ATTRACTION);
|
||||
PowerfulAttractionTimer = urand(5000, 30000);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_FIREBALL, urand(3000, 4500));
|
||||
break;
|
||||
case EVENT_SPELL_FLAMESTRIKE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_FLAMESTRIKE_SUMMON, true);
|
||||
Talk(SAY_FLAMESTRIKE);
|
||||
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true);
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0, 30, true);
|
||||
break;
|
||||
case 1:
|
||||
target = me;
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_IMMUNITY, 1000);
|
||||
break;
|
||||
case EVENT_SPELL_SW_PAIN:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_SHADOW_WORD_PAIN_N, SPELL_SHADOW_WORD_PAIN_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_SW_PAIN, 10000);
|
||||
break;
|
||||
@@ -463,7 +463,7 @@ public:
|
||||
case EVENT_SPELL_VANISH:
|
||||
me->CastSpell(me, SPELL_VANISH, false);
|
||||
DoResetThreat();
|
||||
if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* unit = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->AddThreat(unit, 1000.0f);
|
||||
|
||||
events.ScheduleEvent(EVENT_SPELL_VANISH, 30000);
|
||||
@@ -556,7 +556,7 @@ public:
|
||||
switch (actualEventId)
|
||||
{
|
||||
case EVENT_SPELL_IMMOLATE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_IMMOLATE_N, SPELL_IMMOLATE_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_IMMOLATE, 12000);
|
||||
break;
|
||||
@@ -565,17 +565,17 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 5000);
|
||||
break;
|
||||
case EVENT_SPELL_SEED_OF_CORRUPTION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
me->CastSpell(target, SPELL_SEED_OF_CORRUPTION, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_SEED_OF_CORRUPTION, 18000);
|
||||
break;
|
||||
case EVENT_SPELL_CURSE_OF_AGONY:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_CURSE_OF_AGONY_N, SPELL_CURSE_OF_AGONY_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_CURSE_OF_AGONY, 13000);
|
||||
break;
|
||||
case EVENT_SPELL_FEAR:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f))
|
||||
me->CastSpell(target, SPELL_FEAR, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_FEAR, 15000);
|
||||
break;
|
||||
@@ -709,7 +709,7 @@ public:
|
||||
switch (actualEventId)
|
||||
{
|
||||
case EVENT_SPELL_POLYMORPH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->CastSpell(target, SPELL_POLYMORPH, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_POLYMORPH, 20000);
|
||||
break;
|
||||
@@ -722,7 +722,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_ICE_BLOCK, 1000);
|
||||
break;
|
||||
case EVENT_SPELL_BLIZZARD:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_BLIZZARD_N, SPELL_BLIZZARD_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_BLIZZARD, 20000);
|
||||
break;
|
||||
@@ -1015,7 +1015,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_WAR_STOMP, 120000);
|
||||
break;
|
||||
case EVENT_SPELL_PURGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
me->CastSpell(target, SPELL_PURGE, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_PURGE, 15000);
|
||||
break;
|
||||
@@ -1096,7 +1096,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_ROCKET_LAUNCH, 20000);
|
||||
break;
|
||||
case EVENT_SPELL_IRON_BOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 15.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 15.0f))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_FEL_IRON_BOMB_N, SPELL_FEL_IRON_BOMB_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_IRON_BOMB, 20000);
|
||||
break;
|
||||
|
||||
@@ -190,12 +190,12 @@ public:
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_DRAIN_LIFE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_DRAIN_LIFE_N, SPELL_DRAIN_LIFE_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAIN_LIFE, 10000, 1);
|
||||
return;
|
||||
case EVENT_SPELL_DRAIN_MANA:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, PowerUsersSelector(me, POWER_MANA, 40.0f, false)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, POWER_MANA, 40.0f, false)))
|
||||
me->CastSpell(target, SPELL_DRAIN_MANA, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAIN_MANA, 10000, 1);
|
||||
return;
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
summon->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f);
|
||||
summon->CastSpell(target, SPELL_ENERGY_FEEDBACK_CHANNEL, false);
|
||||
@@ -168,12 +168,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_HEALTH_CHECK, 0);
|
||||
break;
|
||||
case EVENT_SPELL_CHAIN_LIGHTNING:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_CHAIN_LIGHTNING_N, SPELL_CHAIN_LIGHTNING_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_CHAIN_LIGHTNING, 8000);
|
||||
break;
|
||||
case EVENT_SPELL_ARCANE_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_ARCANE_SHOCK_N, SPELL_ARCANE_SHOCK_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_ARCANE_SHOCK, 8000);
|
||||
break;
|
||||
|
||||
@@ -305,7 +305,7 @@ public:
|
||||
if (target->GetGUID() == me->GetVictim()->GetGUID())
|
||||
{
|
||||
me->AddThreat(me->GetVictim(), -1000000); // drop current player, add a ton to second. This should guarantee that we don't end up with both 1 and 2 in a cage...
|
||||
if (Unit* newTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1, 200.0f)) // search in whole room
|
||||
if (Unit* newTarget = SelectTarget(SelectTargetMethod::MaxThreat, 1, 200.0f)) // search in whole room
|
||||
{
|
||||
me->AddThreat(newTarget, 1000000);
|
||||
}
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
events.ScheduleEvent(SPELL_ARCANE_MISSILES, urand(TIMER_ARCANE_MIN, TIMER_ARCANE_MAX));
|
||||
break;
|
||||
case SPELL_CURSE_DARKMASTER:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_CURSE_DARKMASTER);
|
||||
}
|
||||
@@ -348,7 +348,7 @@ public:
|
||||
break;
|
||||
|
||||
case SPELL_SHADOW_PORTAL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 15.0, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 15.0, true))
|
||||
{
|
||||
room = FindRoom();
|
||||
if (room < 6)
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_CURSE_OF_TONGUES, 20000);
|
||||
break;
|
||||
case EVENT_DOMINATE_MIND:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 20.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 20.0f, true))
|
||||
{
|
||||
me->CastSpell(target, SPELL_DOMINATE_MIND, false);
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, PowerUsersSelector(me, POWER_MANA, 20.0f, false)))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, PowerUsersSelector(me, POWER_MANA, 20.0f, false)))
|
||||
{
|
||||
me->CastSpell(target, DRAIN_MANA_SPELL, false);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
void SchedulePossession()
|
||||
{
|
||||
_scheduler.Schedule(20s, 30s, [this](TaskContext context){
|
||||
if (Unit* possessTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true, false))
|
||||
if (Unit* possessTarget = SelectTarget(SelectTargetMethod::Random, 1, 0, true, false))
|
||||
{
|
||||
DoCast(possessTarget, SPELL_POSSESS, true);
|
||||
DoCast(possessTarget, SPELL_POSSESSED, true);
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_STOMP, 30000);
|
||||
break;
|
||||
case EVENT_SPELL_BURN:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_BURN_DAMAGE))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, -SPELL_BURN_DAMAGE))
|
||||
me->CastSpell(target, SPELL_BURN, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_BURN, 60000);
|
||||
break;
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
|
||||
{
|
||||
summon->AI()->AttackStart(target);
|
||||
summon->AddThreat(target, 10000000);
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_SHADOW_NOVA:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1, 100.0f);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
Talk(EMOTE_SHADOW_NOVA, target);
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_CONFLAGRATION:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1, 100.0f);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
me->CastSpell(target, SPELL_CONFLAGRATION, false);
|
||||
@@ -334,7 +334,7 @@ public:
|
||||
break;
|
||||
case EVENT_SPELL_SHADOW_NOVA:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1, 100.0f);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
me->CastSpell(target, SPELL_SHADOW_NOVA, false);
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
}
|
||||
case EVENT_SPELL_CONFLAGRATION:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1, 100.0f);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 100.0f);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
Talk(EMOTE_CONFLAGRATION, target);
|
||||
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_GAS_NOVA, 20000, 1);
|
||||
break;
|
||||
case EVENT_SPELL_ENCAPSULATE:
|
||||
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_ENCAPSULATE_CHANNEL, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_ENCAPSULATE, 25000, 1);
|
||||
break;
|
||||
@@ -470,7 +470,7 @@ public:
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summon->SetInCombatWithZone();
|
||||
summon->AI()->AttackStart(summon->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f));
|
||||
summon->AI()->AttackStart(summon->AI()->SelectTarget(SelectTargetMethod::Random, 0, 100.0f));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -570,7 +570,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_SPELL_SOUL_FLAY, urand(4000, 5000));
|
||||
break;
|
||||
case EVENT_SPELL_LEGION_LIGHTNING:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40.0f, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 40.0f, true))
|
||||
me->CastSpell(target, SPELL_LEGION_LIGHTNING, false);
|
||||
events.ScheduleEvent(EVENT_SPELL_LEGION_LIGHTNING, phase == PHASE_SACRIFICE ? 15000 : 30000);
|
||||
events.RescheduleEvent(EVENT_SPELL_SOUL_FLAY, 2000);
|
||||
@@ -1038,7 +1038,7 @@ public:
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 60.0f, true))
|
||||
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true))
|
||||
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
|
||||
}
|
||||
|
||||
@@ -1258,7 +1258,7 @@ public:
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SELECT_TARGET_RANDOM, 0, 60.0f, true))
|
||||
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true))
|
||||
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -244,12 +244,12 @@ public:
|
||||
me->CastSpell(me, SPELL_ENRAGE, true);
|
||||
break;
|
||||
case EVENT_SPAWN_DARKNESS:
|
||||
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_DARKNESS, true);
|
||||
events.ScheduleEvent(EVENT_SPAWN_DARKNESS, 15000);
|
||||
break;
|
||||
case EVENT_SPAWN_BLACK_HOLE:
|
||||
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_BLACK_HOLE, true);
|
||||
events.ScheduleEvent(EVENT_SPAWN_BLACK_HOLE, 15000);
|
||||
break;
|
||||
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
{
|
||||
case EVENT_STATIC_DISRUPTION:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
if (target)
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
}
|
||||
case EVENT_GUST_OF_WIND:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
if (target)
|
||||
@@ -255,7 +255,7 @@ public:
|
||||
break;
|
||||
case EVENT_ELECTRICAL_STORM:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50, true);
|
||||
if (!target)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
@@ -324,7 +324,7 @@ public:
|
||||
Unit* bird = ObjectAccessor::GetUnit(*me, BirdGUIDs[i]);
|
||||
if (!bird) //they despawned on die
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
x = target->GetPositionX() + irand(-10, 10);
|
||||
y = target->GetPositionY() + irand(-10, 10);
|
||||
@@ -420,7 +420,7 @@ public:
|
||||
|
||||
if (arrived)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
float x, y, z;
|
||||
if (EagleSwoop_Timer)
|
||||
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
|
||||
if (ShockTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
if (target->IsNonMeleeSpellCast(false))
|
||||
DoCast(target, SPELL_EARTHSHOCK);
|
||||
|
||||
@@ -428,7 +428,7 @@ public:
|
||||
|
||||
if (SiphonSoul_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 70, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 70, true);
|
||||
Unit* trigger = DoSpawnCreature(NPC_TEMP_TRIGGER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 30000);
|
||||
if (!target || !trigger)
|
||||
{
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
break;
|
||||
case ABILITY_TARGET_ENEMY:
|
||||
default:
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0, 100, true);
|
||||
break;
|
||||
case ABILITY_TARGET_HEAL:
|
||||
target = DoSelectLowestHpFriendly(50, 0);
|
||||
@@ -634,7 +634,7 @@ public:
|
||||
if (urand(0, 1))
|
||||
target = DoSelectLowestHpFriendly(50, 0);
|
||||
else
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0);
|
||||
if (target)
|
||||
DoCast(target, SPELL_DISPEL_MAGIC, false);
|
||||
}
|
||||
@@ -651,7 +651,7 @@ public:
|
||||
DoCast(target, SPELL_DISPEL_MAGIC, false);
|
||||
}
|
||||
else
|
||||
me->CastSpell(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DISPEL_MAGIC, false);
|
||||
me->CastSpell(SelectUnit(SelectTargetMethod::Random, 0), SPELL_DISPEL_MAGIC, false);
|
||||
|
||||
dispelmagic_timer = 12000;
|
||||
} else dispelmagic_timer -= diff;*/
|
||||
@@ -843,7 +843,7 @@ public:
|
||||
|
||||
if (venomspit_timer <= diff)
|
||||
{
|
||||
if (Unit* victim = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* victim = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(victim, SPELL_VENOM_SPIT, false);
|
||||
venomspit_timer = 2500;
|
||||
}
|
||||
@@ -934,7 +934,7 @@ public:
|
||||
}
|
||||
if (coldstare_timer <= diff)
|
||||
{
|
||||
if (Unit* victim = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* victim = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(victim, SPELL_COLD_STARE, false);
|
||||
coldstare_timer = 12000;
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
|
||||
if (FireBreathTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
me->AttackStop();
|
||||
me->GetMotionMaster()->Clear();
|
||||
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
if (Surge_Timer <= diff)
|
||||
{
|
||||
Talk(SAY_SURGE);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 45, true);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 45, true);
|
||||
if (target)
|
||||
DoCast(target, SPELL_SURGE);
|
||||
Surge_Timer = urand(15000, 20000);
|
||||
|
||||
@@ -338,7 +338,7 @@ public:
|
||||
Vortex->CastSpell(Vortex, SPELL_CYCLONE_VISUAL, true);
|
||||
Vortex->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
Vortex->SetSpeed(MOVE_RUN, 1.0f);
|
||||
Vortex->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
Vortex->AI()->AttackStart(SelectTarget(SelectTargetMethod::Random, 0));
|
||||
DoZoneInCombat(Vortex);
|
||||
}
|
||||
}
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
|
||||
if (Grievous_Throw_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
DoCast(target, SPELL_GRIEVOUS_THROW, false);
|
||||
Grievous_Throw_Timer = 10000;
|
||||
}
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
{
|
||||
if (!TankGUID)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
TankGUID = me->GetVictim()->GetGUID();
|
||||
me->SetSpeed(MOVE_RUN, 5.0f);
|
||||
@@ -446,7 +446,7 @@ public:
|
||||
{
|
||||
Unit* target = me->GetVictim();
|
||||
if (!target || !target->isTargetableForAttack()) target = ObjectAccessor::GetUnit(*me, TankGUID);
|
||||
if (!target || !target->isTargetableForAttack()) target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!target || !target->isTargetableForAttack()) target = SelectTarget(SelectTargetMethod::Random, 0);
|
||||
if (target)
|
||||
{
|
||||
AttackStart(target);
|
||||
@@ -481,7 +481,7 @@ public:
|
||||
{
|
||||
if (!TankGUID)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
TankGUID = me->GetVictim()->GetGUID();
|
||||
me->SetSpeed(MOVE_RUN, 5.0f);
|
||||
@@ -495,7 +495,7 @@ public:
|
||||
Unit* target = me->GetVictim();
|
||||
if (!target || !target->isTargetableForAttack())
|
||||
{
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0);
|
||||
AttackStart(target);
|
||||
}
|
||||
if (target)
|
||||
@@ -512,7 +512,7 @@ public:
|
||||
TankGUID.Clear();
|
||||
}
|
||||
else
|
||||
AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
AttackStart(SelectTarget(SelectTargetMethod::Random, 0));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -535,7 +535,7 @@ public:
|
||||
|
||||
if (Pillar_Of_Fire_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
DoCast(target, SPELL_SUMMON_PILLAR);
|
||||
Pillar_Of_Fire_Timer = 10000;
|
||||
}
|
||||
@@ -543,7 +543,7 @@ public:
|
||||
|
||||
if (Flame_Breath_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
me->SetInFront(target);
|
||||
DoCast(me, SPELL_FLAME_BREATH);
|
||||
Flame_Breath_Timer = 10000;
|
||||
@@ -592,7 +592,7 @@ public:
|
||||
{
|
||||
//if the vortex reach the target, it change his target to another player
|
||||
if (me->IsWithinMeleeRange(me->GetVictim()))
|
||||
AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
|
||||
AttackStart(SelectTarget(SelectTargetMethod::Random, 0));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
break;
|
||||
case EVENT_MARK_OF_ARLOKK:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, urand(1, 3), 0.0f, false, -SPELL_MARK_OF_ARLOKK);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, urand(1, 3), 0.0f, false, -SPELL_MARK_OF_ARLOKK);
|
||||
if (!target)
|
||||
target = me->GetVictim();
|
||||
if (target)
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
case EVENT_VISIBLE:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
AttackStart(target);
|
||||
me->RemoveAura(SPELL_SUPER_INVIS);
|
||||
me->RemoveAura(SPELL_VANISH);
|
||||
@@ -389,7 +389,7 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ATTACK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0.0f, 100, false))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0.0f, 100, false))
|
||||
me->Attack(target, true);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
DoModifyThreatPercent(victim, -50);
|
||||
}
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
AttackStart(target);
|
||||
events.ScheduleEvent(EVENT_AVATAR, urand(25000, 35000));
|
||||
break;
|
||||
|
||||
@@ -128,12 +128,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_CORRUPTED_BLOOD, urand(30000, 45000));
|
||||
break;
|
||||
case EVENT_CAUSE_INSANITY:
|
||||
// DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_CAUSE_INSANITY);
|
||||
// DoCast(SelectTarget(SelectTargetMethod::Random, 0, 100, true), SPELL_CAUSE_INSANITY);
|
||||
// events.ScheduleEvent(EVENT_CAUSE_INSANITY, urand(35000, 45000));
|
||||
break;
|
||||
case EVENT_WILL_OF_HAKKAR:
|
||||
// Xinef: Skip Tank
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true), SPELL_WILL_OF_HAKKAR);
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random, 1, 100, true), SPELL_WILL_OF_HAKKAR);
|
||||
events.ScheduleEvent(EVENT_WILL_OF_HAKKAR, urand(25000, 35000));
|
||||
break;
|
||||
case EVENT_ENRAGE:
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
// We will just use one model for the beginning
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
Creature* Illusion = me->SummonCreature(NPC_NIGHTMARE_ILLUSION, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
|
||||
if (Illusion)
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CHARGE_JEKLIK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
AttackStart(target);
|
||||
@@ -159,14 +159,14 @@ public:
|
||||
events.ScheduleEvent(EVENT_SCREECH, urand(18000, 26000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_SPAWN_BATS:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
for (uint8 i = 0; i < 6; ++i)
|
||||
if (Creature* bat = me->SummonCreature(NPC_BLOODSEEKER_BAT, SpawnBat[i], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
bat->AI()->AttackStart(target);
|
||||
events.ScheduleEvent(EVENT_SPAWN_BATS, 60000, 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_SHADOW_WORD_PAIN:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
DoCast(target, SPELL_SHADOW_WORD_PAIN);
|
||||
events.ScheduleEvent(EVENT_SHADOW_WORD_PAIN, urand(12000, 18000), 0, PHASE_TWO);
|
||||
break;
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_GREATER_HEAL, urand(25000, 35000), 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_SPAWN_FLYING_BATS:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
if (Creature* flyingBat = me->SummonCreature(NPC_FRENZIED_BAT, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + 15.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
flyingBat->AI()->AttackStart(target);
|
||||
events.ScheduleEvent(EVENT_SPAWN_FLYING_BATS, urand(10000, 15000), 0, PHASE_TWO);
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
if (Bomb_Timer <= diff)
|
||||
{
|
||||
std::list<Unit*> targets;
|
||||
SelectTargetList(targets, 1, SELECT_TARGET_RANDOM, 500.0f, true);
|
||||
SelectTargetList(targets, 1, SelectTargetMethod::Random, 500.0f, true);
|
||||
if (!targets.empty())
|
||||
{
|
||||
if (targets.size() > 1)
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
break;
|
||||
case EVENT_DELUSIONSOFJINDO: // HACK
|
||||
// Casting the delusion curse with a shade so shade will attack the same target with the curse.
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
DoCast(target, SPELL_DELUSIONSOFJINDO);
|
||||
Creature* Shade = me->SummonCreature(NPC_SHADE_OF_JINDO, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
break;
|
||||
case EVENT_TELEPORT: // Possible HACK
|
||||
// Teleports a random player and spawns 9 Sacrificed Trolls to attack player
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
DoTeleportPlayer(target, TeleportLoc.m_positionX, TeleportLoc.m_positionY, TeleportLoc.m_positionZ, TeleportLoc.m_orientation);
|
||||
if (DoGetThreat(me->GetVictim()))
|
||||
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_CHECK_OHGAN, 1000);
|
||||
break;
|
||||
case EVENT_WATCH_PLAYER:
|
||||
if (Unit* player = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* player = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(player, SPELL_WATCH);
|
||||
Talk(SAY_WATCH, player);
|
||||
@@ -262,7 +262,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_WATCH_PLAYER, urand(12000, 15000));
|
||||
break;
|
||||
case EVENT_CHARGE_PLAYER:
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true), SPELL_CHARGE);
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 40, true), SPELL_CHARGE);
|
||||
events.ScheduleEvent(EVENT_CHARGE_PLAYER, urand(22000, 30000));
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
{
|
||||
case EVENT_SPAWN_START_SPIDERS:
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
Talk(SAY_SPIDER_SPAWN);
|
||||
Creature* Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_ASPECT_OF_MARLI, urand(13000, 18000), 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_SPAWN_SPIDER:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
Creature* Spider = me->SummonCreature(15041, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
if (Spider)
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
int i = 0;
|
||||
while (i++ < 3) // max 3 tries to get a random target with power_mana
|
||||
{
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); // not aggro leader
|
||||
target = SelectTarget(SelectTargetMethod::Random, 1, 100, true); // not aggro leader
|
||||
if (target && target->getPowerType() == POWER_MANA)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
{
|
||||
if (Ambush_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());
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
{
|
||||
if (Aggro_Timer <= diff)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1);
|
||||
Unit* target = SelectTarget(SelectTargetMethod::Random, 1);
|
||||
|
||||
if (DoGetThreat(me->GetVictim()))
|
||||
{
|
||||
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_FORCEPUNCH, urand(16000, 21000), 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
DoResetThreat();
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, i))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, i))
|
||||
// check if target is within melee-distance
|
||||
if (me->IsWithinMeleeRange(target))
|
||||
++_inMeleeRange;
|
||||
@@ -223,12 +223,12 @@ public:
|
||||
events.ScheduleEvent(EVENT_HOLY_NOVA, urand(45000, 75000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_HOLY_FIRE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
DoCast(target, SPELL_HOLY_FIRE);
|
||||
events.ScheduleEvent(EVENT_HOLY_FIRE, urand(45000, 60000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_HOLY_WRATH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
DoCast(target, SPELL_HOLY_WRATH);
|
||||
events.ScheduleEvent(EVENT_HOLY_WRATH, urand(45000, 60000), 0, PHASE_ONE);
|
||||
break;
|
||||
@@ -238,17 +238,17 @@ public:
|
||||
//
|
||||
|
||||
case EVENT_VENOM_SPIT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
DoCast(target, SPELL_VENOM_SPIT);
|
||||
events.ScheduleEvent(EVENT_VENOM_SPIT, urand(5000, 15000), 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_POISON_CLOUD:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
DoCast(target, SPELL_POISON_CLOUD);
|
||||
events.ScheduleEvent(EVENT_POISON_CLOUD, urand(15000, 20000), 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_PARASITIC_SERPENT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
DoCast(target, SPELL_SUMMON_PARASITIC_SERPENT);
|
||||
events.ScheduleEvent(EVENT_PARASITIC_SERPENT, 15000, 0, PHASE_TWO);
|
||||
break;
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_LIGHTNINGCLOUD, urand(15000, 20000));
|
||||
break;
|
||||
case EVENT_LIGHTNINGWAVE:
|
||||
DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true), SPELL_LIGHTNINGWAVE);
|
||||
DoCast(SelectTarget(SelectTargetMethod::Random, 0, 100, true), SPELL_LIGHTNINGWAVE);
|
||||
events.ScheduleEvent(EVENT_LIGHTNINGWAVE, urand(12000, 16000));
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
_events.ScheduleEvent(EVENT_SOUL_CORRUPTION, rand() % 4000 + 15000);
|
||||
break;
|
||||
case EVENT_CREATURE_OF_NIGHTMARE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
|
||||
DoCast(target, SPELL_CREATURE_OF_NIGHTMARE);
|
||||
_events.ScheduleEvent(EVENT_CREATURE_OF_NIGHTMARE, 45000);
|
||||
break;
|
||||
|
||||
@@ -2123,7 +2123,7 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FIREBALL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
DoCast(target, SPELL_FIREBALL);
|
||||
_events.ScheduleEvent(EVENT_FIREBALL, 3 * IN_MILLISECONDS);
|
||||
break;
|
||||
@@ -2194,7 +2194,7 @@ public:
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_INFEST:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0, true))
|
||||
DoCast(target, SPELL_INGEST);
|
||||
_events.ScheduleEvent(EVENT_INFEST, 20 * IN_MILLISECONDS);
|
||||
break;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class boss_anub_arak : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_LEECHING_SWARM, 20000);
|
||||
break;
|
||||
case EVENT_POUND:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 10.0f))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f))
|
||||
{
|
||||
me->CastSpell(me, SPELL_SELF_ROOT, true);
|
||||
me->DisableRotate(true);
|
||||
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_HADRONOX_PIERCE, 8000);
|
||||
break;
|
||||
case EVENT_HADRONOX_ACID:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, false))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, false))
|
||||
me->CastSpell(target, SPELL_ACID_CLOUD, false);
|
||||
events.ScheduleEvent(EVENT_HADRONOX_ACID, 25000);
|
||||
break;
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_KRIK_MIND_FLAY, 15000);
|
||||
break;
|
||||
case EVENT_KRIK_CURSE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
me->CastSpell(target, SPELL_CURSE_OF_FATIGUE, true);
|
||||
events.ScheduleEvent(EVENT_KRIK_CURSE, 10000);
|
||||
break;
|
||||
|
||||
@@ -163,7 +163,7 @@ struct boss_amanitar : public BossAI
|
||||
}
|
||||
case EVENT_ROOTS:
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(pTarget, SPELL_ENTANGLING_ROOTS, false);
|
||||
}
|
||||
@@ -179,7 +179,7 @@ struct boss_amanitar : public BossAI
|
||||
}
|
||||
case EVENT_BOLT:
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(pTarget, SPELL_VENOM_BOLT_VOLLEY, false);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ struct boss_amanitar : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
if (SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_MINI))
|
||||
if (SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, -SPELL_MINI))
|
||||
{
|
||||
DoCastSelf(SPELL_REMOVE_MUSHROOM_POWER, true);
|
||||
DoCastAOE(SPELL_MINI);
|
||||
|
||||
@@ -252,7 +252,7 @@ struct boss_volazj : public BossAI
|
||||
}
|
||||
case EVENT_HERALD_SHIVER:
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
DoCast(pTarget, SPELL_SHIVER, false);
|
||||
}
|
||||
|
||||
@@ -463,7 +463,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
}
|
||||
case EVENT_JEDOGA_LIGHTNING_BOLT:
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H), false);
|
||||
}
|
||||
@@ -472,7 +472,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
}
|
||||
case EVENT_JEDOGA_THUNDERSHOCK:
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
if (Unit* pTarget = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
|
||||
{
|
||||
DoCast(pTarget, DUNGEON_MODE(SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H), false);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user