aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp2
47 files changed, 94 insertions, 94 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
index f8027ed8ad4..68dbd2d6ddb 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
@@ -81,7 +81,7 @@ public:
if (HandOfThaurissan_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_HANDOFTHAURISSAN);
//3 Hands of Thaurissan will be casted
diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
index 7dab307f19b..2a857602455 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp
@@ -96,7 +96,7 @@ public:
Unit* Summoned = me->SummonCreature(creatureId, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000);
if (Summoned)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
Summoned->AddThreat(pTarget, 1.0f);
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
index 6c1e181da7b..a2ac8fcd1cb 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp
@@ -133,7 +133,7 @@ public:
//Summon Astral Flare
Creature* AstralFlare = DoSpawnCreature(17096, float(rand()%37), float(rand()%37), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (AstralFlare && pTarget)
{
@@ -184,7 +184,7 @@ public:
else
HatefulBoltTimer = 15000;
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
DoCast(pTarget, SPELL_HATEFUL_BOLT);
} else HatefulBoltTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
index 00a63ef3c36..bab4f95b211 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
@@ -395,7 +395,7 @@ public:
if (FireballBarrageTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_FARTHEST, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_FARTHEST, 0))
DoCast(pTarget, SPELL_FIREBALL_BARRAGE);
FireballBarrageTimer = 20000;
} else FireballBarrageTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
index 97b6bdbb5f9..a763e353860 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp
@@ -388,7 +388,7 @@ public:
if (ShadowboltTimer <= diff)
{
- DoCast(SelectUnit(SELECT_TARGET_TOPAGGRO, 0), SPELL_SHADOW_BOLT);
+ DoCast(SelectTarget(SELECT_TARGET_TOPAGGRO, 0), SPELL_SHADOW_BOLT);
ShadowboltTimer = 10000;
} else ShadowboltTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index cde236b8ca7..83e31d7bacb 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -194,7 +194,7 @@ public:
if (WaterBoltTimer <= diff)
{
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_WATERBOLT);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_WATERBOLT);
WaterBoltTimer = TitoDied ? 1500 : 5000;
} else WaterBoltTimer -= diff;
@@ -1432,7 +1432,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
if (PowerfulAttractionTimer <= diff)
{
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_POWERFUL_ATTRACTION);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_POWERFUL_ATTRACTION);
PowerfulAttractionTimer = urand(5000,30000);
} else PowerfulAttractionTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index 107546085ae..465aee9d99c 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -302,7 +302,7 @@ public:
if (PhoenixTimer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1);
uint8 random = urand(1,2);
float x = KaelLocations[random][0];
@@ -396,7 +396,7 @@ public:
for (uint8 i = 0; i < 3; ++i)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
Creature* Orb = DoSpawnCreature(CREATURE_ARCANE_SPHERE, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
if (Orb && pTarget)
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index 8171743bed4..3d195df6eb1 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -528,7 +528,7 @@ public:
{
DoCast(me, SPELL_VANISH);
- Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0);
DoResetThreat();
@@ -646,7 +646,7 @@ public:
if (Seed_of_Corruption_Timer <= diff)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pUnit, SPELL_SEED_OF_CORRUPTION);
Seed_of_Corruption_Timer = 10000;
@@ -654,7 +654,7 @@ public:
if (Curse_of_Agony_Timer <= diff)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pUnit, SPELL_CURSE_OF_AGONY);
Curse_of_Agony_Timer = 13000;
@@ -662,7 +662,7 @@ public:
if (Fear_Timer <= diff)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pUnit, SPELL_FEAR);
Fear_Timer = 10000;
@@ -793,7 +793,7 @@ public:
if (Polymorph_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_POLYMORPH);
Polymorph_Timer = 20000;
@@ -808,7 +808,7 @@ public:
if (Blizzard_Timer <= diff)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pUnit, SPELL_BLIZZARD);
Blizzard_Timer = 8000;
@@ -939,7 +939,7 @@ public:
//if nobody is in melee range than try to use Intercept
if (!InMeleeRange)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pUnit, SPELL_INTERCEPT_STUN);
}
@@ -1170,7 +1170,7 @@ public:
if (Purge_Timer <= diff)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pUnit, SPELL_PURGE);
Purge_Timer = 15000;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
index 6cced4ca60c..ef20f3444cc 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp
@@ -253,7 +253,7 @@ public:
{
if (DrainLifeTimer <= diff)
{
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DRAIN_LIFE);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_DRAIN_LIFE);
DrainLifeTimer = 10000;
} else DrainLifeTimer -= diff;
@@ -262,7 +262,7 @@ public:
{
if (DrainManaTimer <= diff)
{
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 1), SPELL_DRAIN_MANA);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 1), SPELL_DRAIN_MANA);
DrainManaTimer = 10000;
} else DrainManaTimer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
index daf6fb408b4..c4e3a93de6d 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp
@@ -117,7 +117,7 @@ public:
void JustSummoned(Creature *summoned)
{
- if (Unit *temp = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *temp = SelectTarget(SELECT_TARGET_RANDOM, 0))
summoned->GetMotionMaster()->MoveFollow(temp,0,0);
//spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok
@@ -163,7 +163,7 @@ public:
if (ChainLightningTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
ChainLightningTimer = 8000;
@@ -171,7 +171,7 @@ public:
if (ArcaneShockTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (pTarget)
DoCast(pTarget, SPELL_ARCANE_SHOCK);
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp
index d52c7a4d369..2d82d983c01 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_garr.cpp
@@ -136,7 +136,7 @@ class mob_firesworn : public CreatureScript
if (immolateTimer <= diff)
{
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_IMMOLATE);
immolateTimer = urand(5000, 10000);
}
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp
index bf476b4e3e4..92b0e370f9f 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_gehennas.cpp
@@ -80,12 +80,12 @@ class boss_gehennas : public CreatureScript
events.ScheduleEvent(EVENT_GEHENNAS_CURSE, urand(22000, 30000));
break;
case EVENT_RAIN_OF_FIRE:
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_RAIN_OF_FIRE);
events.ScheduleEvent(EVENT_RAIN_OF_FIRE, urand(4000, 12000));
break;
case EVENT_SHADOW_BOLT:
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1))
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
DoCast(target, SPELL_SHADOW_BOLT);
events.ScheduleEvent(EVENT_SHADOW_BOLT, 7000);
break;
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp
index 0c99d9db93c..ef502543f10 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_golemagg.cpp
@@ -99,7 +99,7 @@ class boss_golemagg : public CreatureScript
switch (eventId)
{
case EVENT_PYROBLAST:
- if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_PYROBLAST);
events.ScheduleEvent(EVENT_PYROBLAST, 7000);
break;
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
index 1e58ae8665a..ad2f02ca77b 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_majordomo_executus.cpp
@@ -139,7 +139,7 @@ class boss_majordomo : public CreatureScript
events.ScheduleEvent(EVENT_BLAST_WAVE, 10000);
break;
case EVENT_TELEPORT:
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1))
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
DoCast(target, SPELL_TELEPORT);
events.ScheduleEvent(EVENT_TELEPORT, 20000);
break;
diff --git a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp
index f58269861cd..2a10d078fbc 100644
--- a/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp
+++ b/src/server/scripts/EasternKingdoms/MoltenCore/boss_ragnaros.cpp
@@ -172,7 +172,7 @@ class boss_ragnaros : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
- if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
AttackStart(target);
instance->SetData(DATA_RAGNAROS_ADDS, 0);
@@ -259,7 +259,7 @@ class boss_ragnaros : public CreatureScript
// summon 8 elementals
for (uint8 i = 0; i < 8; ++i)
- if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Creature* pSummoned = me->SummonCreature(12143, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000))
pSummoned->AI()->AttackStart(pTarget);
@@ -274,7 +274,7 @@ class boss_ragnaros : public CreatureScript
DoScriptText(SAY_REINFORCEMENTS2, me);
for (uint8 i = 0; i < 8; ++i)
- if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
if (Creature* pSummoned = me->SummonCreature(12143, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000))
pSummoned->AI()->AttackStart(pTarget);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index fe0ff30c038..90305710a95 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -1535,7 +1535,7 @@ public:
{
if (Creature* pTemp = Unit::GetCreature(*me, ui_GUID))
if (pTemp->isAlive())
- if (Unit* pTarger = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit* pTarger = SelectTarget(SELECT_TARGET_RANDOM,0))
if (pTarger->isAlive())
{
// pTemp->DeleteThreatList();
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
index 6557f830ae3..5895d43f5c2 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
@@ -101,7 +101,7 @@ public:
if (Polymorph_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_POLYMORPH);
Polymorph_Timer = 20000;
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
index 3ffef4a673d..90c23f6f69b 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
@@ -87,7 +87,7 @@ public:
//Fear_Timer
if (Fear_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_FEAR);
Fear_Timer = 40000;
@@ -96,7 +96,7 @@ public:
//Sleep_Timer
if (Sleep_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO,0))
DoCast(pTarget, SPELL_SLEEP);
Sleep_Timer = 30000;
@@ -112,7 +112,7 @@ public:
//Dispel_Timer
if (Dispel_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_DISPELMAGIC);
DispelMagic_Timer = 30000;
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
index c4d76d1caf1..15c759b6ab4 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp
@@ -125,7 +125,7 @@ public:
if (Teleport_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
{
if (DoGetThreat(pTarget))
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
index 58fc4d4cd3e..cd17ef2125c 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp
@@ -90,7 +90,7 @@ public:
if (ShadowShock_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget) DoCast(pTarget, SPELL_SHADOWSHOCK);
ShadowShock_Timer = 12000;
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
index ed0dfb4a246..9f2a7fd5428 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp
@@ -97,7 +97,7 @@ public:
if (Corruption_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget) DoCast(pTarget, SPELL_CORRUPTION);
Corruption_Timer = 24000;
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
index 914ed751232..6b74329d045 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp
@@ -114,7 +114,7 @@ public:
Unit *pTarget = NULL;
for (uint8 i = 0; i < 10; ++i)
{
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget)
SummonIllusions(pTarget);
}
diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp
index d5587afe102..f4d86668dde 100644
--- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp
+++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp
@@ -79,7 +79,7 @@ public:
if (Immolate_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget) DoCast(pTarget, SPELL_IMMOLATE);
Immolate_Timer = 12000;
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp
index 0a7f35092f2..d0466609019 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp
@@ -122,7 +122,7 @@ public:
void JustSummoned(Creature* summoned)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
summoned->AI()->AttackStart(pTarget);
}
@@ -140,7 +140,7 @@ public:
//ShadowBolt
if (ShadowBolt_Timer <= diff)
{
- if (SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(me->getVictim(), SPELL_SHADOWBOLT);
ShadowBolt_Timer = 10000;
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
index f5998c6c8f0..2e5ae72ad80 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_dathrohan_balnazzar.cpp
@@ -186,7 +186,7 @@ public:
//PsychicScream
if (m_uiPsychicScream_Timer <= uiDiff)
{
- if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_PSYCHICSCREAM);
m_uiPsychicScream_Timer = 20000;
@@ -195,7 +195,7 @@ public:
//DeepSleep
if (m_uiDeepSleep_Timer <= uiDiff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_SLEEP);
m_uiDeepSleep_Timer = 15000;
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
index ec4a222402c..ad2080fa551 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp
@@ -253,7 +253,7 @@ public:
{
me->InterruptSpell(CURRENT_GENERIC_SPELL);
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_CONFLAGRATION);
ConflagrationTimer = 30000+(rand()%5000);
@@ -267,7 +267,7 @@ public:
if (!me->IsNonMeleeSpellCasted(false))
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_SHADOW_NOVA);
@@ -287,7 +287,7 @@ public:
if (!me->IsNonMeleeSpellCasted(false))
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_CONFOUNDING_BLOW);
ConfoundingblowTimer = 20000 + (rand()%5000);
@@ -300,7 +300,7 @@ public:
Creature* temp = NULL;
for (uint8 i = 0; i<3; ++i)
{
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
temp = DoSpawnCreature(MOB_SHADOW_IMAGE,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN,10000);
if (temp && pTarget)
{
@@ -603,7 +603,7 @@ public:
if (!me->IsNonMeleeSpellCasted(false))
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_SHADOW_NOVA);
ShadownovaTimer= 30000+(rand()%5000);
@@ -618,7 +618,7 @@ public:
{
me->InterruptSpell(CURRENT_GENERIC_SPELL);
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_CONFLAGRATION);
ConflagrationTimer = 30000+(rand()%5000);
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index 51b8c44cc6e..37c1b7ecfed 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -783,7 +783,7 @@ public:
if (AgonyCurseTimer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!pTarget) pTarget = me->getVictim();
DoCast(pTarget, SPELL_AGONY_CURSE);
AgonyCurseTimer = 20000;
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index 08e5b46b74f..e332b983cf3 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -1049,7 +1049,7 @@ public:
if (uiSpawnFiendTimer <= diff)
{
if (Creature* pFiend = DoSpawnCreature(CREATURE_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000))
- pFiend->AddThreat(SelectUnit(SELECT_TARGET_RANDOM,0), 100000.0f);
+ pFiend->AddThreat(SelectTarget(SELECT_TARGET_RANDOM,0), 100000.0f);
uiSpawnFiendTimer = urand(4000,8000);
} else uiSpawnFiendTimer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
index ebce1b17f49..5ccfb7b8b19 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp
@@ -72,10 +72,10 @@ class boss_ironaya : public CreatureScript
DoCast(me->getVictim(), SPELL_KNOCKAWAY, true);
// current aggro target is knocked away pick new target
- Unit* pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 0);
+ Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
if (!pTarget || pTarget == me->getVictim())
- pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 1);
+ pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
if (pTarget)
me->TauntApply(pTarget);
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
index 746df16c037..f2d11cf11d4 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp
@@ -81,7 +81,7 @@ class mob_jadespine_basilisk : public CreatureScript
//Stop attacking target thast asleep and pick new target
uiCslumberTimer = 28000;
- Unit* pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 0);
+ Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
if (!pTarget || pTarget == me->getVictim())
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index 855572f798f..8580e9c4491 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -285,7 +285,7 @@ class boss_akilzon : public CreatureScript
if (StaticDisruption_Timer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (!pTarget) pTarget = me->getVictim();
TargetGUID = pTarget->GetGUID();
DoCast(pTarget, SPELL_STATIC_DISRUPTION, false);
@@ -298,7 +298,7 @@ class boss_akilzon : public CreatureScript
if (GustOfWind_Timer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (!pTarget) pTarget = me->getVictim();
DoCast(pTarget, SPELL_GUST_OF_WIND);
GustOfWind_Timer = (20+rand()%10)*1000; //20 to 30 seconds(bosskillers)
@@ -362,7 +362,7 @@ class boss_akilzon : public CreatureScript
Unit* bird = Unit::GetUnit(*me,BirdGUIDs[i]);
if (!bird) //they despawned on die
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
x = pTarget->GetPositionX() + irand(-10,10);
y = pTarget->GetPositionY() + irand(-10,10);
@@ -443,7 +443,7 @@ class mob_akilzon_eagle : public CreatureScript
if (arrived)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
float x, y, z;
if (EagleSwoop_Timer)
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
index b4e37526656..cf5809a1c77 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
@@ -262,7 +262,7 @@ class boss_halazzi : public CreatureScript
if (ShockTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
if (pTarget->IsNonMeleeSpellCasted(false))
DoCast(pTarget, SPELL_EARTHSHOCK);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
index 680aeb06fc9..d005c85434f 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
@@ -602,7 +602,7 @@ class boss_alyson_antille : public CreatureScript
if (urand(0,1))
pTarget = DoSelectLowestHpFriendly(50, 0);
else
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_DISPEL_MAGIC, false);
}
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
index 220e9871507..820e19eea9a 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp
@@ -426,7 +426,7 @@ class boss_janalai : public CreatureScript
if (FireBreathTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
me->AttackStop();
me->GetMotionMaster()->Clear();
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
index d1fb865b00a..f875c5c065f 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
@@ -375,7 +375,7 @@ class boss_zuljin : public CreatureScript
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(SelectUnit(SELECT_TARGET_RANDOM, 0));
+ Vortex->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
DoZoneInCombat(Vortex);
}
}
@@ -463,7 +463,7 @@ class boss_zuljin : public CreatureScript
{
if (!TankGUID)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
TankGUID = me->getVictim()->GetGUID();
me->SetSpeed(MOVE_RUN, 5.0f);
@@ -479,7 +479,7 @@ class boss_zuljin : public CreatureScript
{
Unit *pTarget = me->getVictim();
if (!pTarget || !pTarget->isTargetableForAttack()) pTarget = Unit::GetUnit(*me, TankGUID);
- if (!pTarget || !pTarget->isTargetableForAttack()) pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ if (!pTarget || !pTarget->isTargetableForAttack()) pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
{
AttackStart(pTarget);
@@ -512,7 +512,7 @@ class boss_zuljin : public CreatureScript
{
if (!TankGUID)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
TankGUID = me->getVictim()->GetGUID();
me->SetSpeed(MOVE_RUN, 5.0f);
@@ -526,7 +526,7 @@ class boss_zuljin : public CreatureScript
Unit *pTarget = me->getVictim();
if (!pTarget || !pTarget->isTargetableForAttack())
{
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
AttackStart(pTarget);
}
if (pTarget)
@@ -543,7 +543,7 @@ class boss_zuljin : public CreatureScript
TankGUID = 0;
}
else
- AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
+ AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
}
}
else
@@ -564,14 +564,14 @@ class boss_zuljin : public CreatureScript
if (Pillar_Of_Fire_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_SUMMON_PILLAR);
Pillar_Of_Fire_Timer = 10000;
} else Pillar_Of_Fire_Timer -= diff;
if (Flame_Breath_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
me->SetInFront(pTarget);
DoCast(me, SPELL_FLAME_BREATH);
Flame_Breath_Timer = 10000;
@@ -621,7 +621,7 @@ class mob_zuljin_vortex : public CreatureScript
{
//if the vortex reach the target, it change his target to another player
if (me->IsWithinMeleeRange(me->getVictim()))
- AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
+ AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
}
};
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
index c4c6f53e444..f554894c6f3 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -162,7 +162,7 @@ class boss_arlokk : public CreatureScript
if (m_uiMark_Timer <= uiDiff)
{
- Unit *pMarkedTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ Unit *pMarkedTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pMarkedTarget)
{
@@ -242,7 +242,7 @@ class boss_arlokk : public CreatureScript
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
me->UpdateDamagePhysical(BASE_ATTACK);
- if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
AttackStart(pTarget);
m_bIsPhaseTwo = true;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
index f833296ae46..c8ea4f89585 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp
@@ -68,7 +68,7 @@ class boss_grilek : public CreatureScript
DoCast(me, SPELL_AVARTAR);
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,1);
if (DoGetThreat(me->getVictim()))
DoModifyThreatPercent(me->getVictim(),-50);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
index a478826a6e1..e53c66082dd 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp
@@ -141,7 +141,7 @@ class boss_hakkar : public CreatureScript
//WillOfHakkar_Timer
if (WillOfHakkar_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_WILLOFHAKKAR);
WillOfHakkar_Timer = 25000 + rand()%10000;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
index 0dab193bb1b..04474c9383c 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp
@@ -84,7 +84,7 @@ class boss_hazzarah : public CreatureScript
Unit *pTarget = NULL;
for (uint8 i = 0; i < 3; ++i)
{
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (!pTarget)
return;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
index 41e84c35f71..a80dd889d7e 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -113,7 +113,7 @@ class boss_jeklik : public CreatureScript
{
if (Charge_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
DoCast(pTarget, SPELL_CHARGE);
AttackStart(pTarget);
@@ -136,7 +136,7 @@ class boss_jeklik : public CreatureScript
if (SpawnBats_Timer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
Creature* Bat = NULL;
Bat = me->SummonCreature(11368,-12291.6220f,-1380.2640f,144.8304f,5.483f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
@@ -165,7 +165,7 @@ class boss_jeklik : public CreatureScript
{
if (PhaseTwo && ShadowWordPain_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
DoCast(pTarget, SPELL_SHADOW_WORD_PAIN);
ShadowWordPain_Timer = 12000 + rand()%6000;
@@ -194,7 +194,7 @@ class boss_jeklik : public CreatureScript
if (SpawnFlyingBats_Timer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
return;
@@ -264,7 +264,7 @@ class mob_batrider : public CreatureScript
//Bomb_Timer
if (Bomb_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_BOMB);
Bomb_Timer = 5000;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
index 4e558ce42e2..f78a47c6585 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp
@@ -108,7 +108,7 @@ class boss_jindo : public CreatureScript
//Casting the delusion curse with a shade. So shade will attack the same target with the curse.
if (Delusions_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
DoCast(pTarget, SPELL_DELUSIONSOFJINDO);
@@ -124,7 +124,7 @@ class boss_jindo : public CreatureScript
if (Teleport_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
{
DoTeleportPlayer(pTarget, -11583.7783f,-1249.4278f,77.5471f,4.745f);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
index 16663ac1062..e4054c9032b 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp
@@ -186,7 +186,7 @@ class boss_mandokir : public CreatureScript
if ((Watch_Timer < 8000) && !someWatched) //8 sec(cast time + expire time) before the check for the watch effect mandokir will cast watch debuff on a random target
{
- if (Unit* p = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit* p = SelectTarget(SELECT_TARGET_RANDOM,0))
{
DoScriptText(SAY_WATCH, me, p);
DoCast(p, SPELL_WATCH);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
index c25a80550b3..4f191b11249 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_marli.cpp
@@ -118,7 +118,7 @@ class boss_marli : public CreatureScript
{
DoScriptText(SAY_SPIDER_SPAWN, me);
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (!pTarget)
return;
@@ -142,7 +142,7 @@ class boss_marli : public CreatureScript
if (SpawnSpider_Timer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (!pTarget)
return;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
index 5edb0036cdf..191d9f311b2 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp
@@ -93,7 +93,7 @@ class boss_renataki : public CreatureScript
if (Ambush_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget)
{
DoTeleportTo(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
@@ -127,7 +127,7 @@ class boss_renataki : public CreatureScript
if (Aggro_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,1);
if (DoGetThreat(me->getVictim()))
DoModifyThreatPercent(me->getVictim(),-50);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
index 5b467db09c0..a20eb271963 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -219,7 +219,7 @@ class boss_thekal : public CreatureScript
{
if (Charge_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
DoCast(pTarget, SPELL_CHARGE);
DoResetThreat();
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
index a18787638b0..d7aaee44857 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp
@@ -125,7 +125,7 @@ class boss_venoxis : public CreatureScript
TargetInRange = 0;
for (uint8 i = 0; i < 10; ++i)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,i))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO,i))
if (me->IsWithinMeleeRange(pTarget))
++TargetInRange;
}
@@ -144,7 +144,7 @@ class boss_venoxis : public CreatureScript
if (HolyFire_Timer < diff && TargetInRange < 3)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_HOLY_FIRE);
HolyFire_Timer = 8000;
@@ -174,7 +174,7 @@ class boss_venoxis : public CreatureScript
if (PhaseTwo && VenomSpit_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_VENOMSPIT);
VenomSpit_Timer = 15000 + rand()%5000;
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
index 7865320c6a8..944a33fb620 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp
@@ -71,7 +71,7 @@ class boss_wushoolay : public CreatureScript
if (LightningWave_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget) DoCast(pTarget, SPELL_LIGHTNINGWAVE);
LightningWave_Timer = 12000 + rand()%4000;