aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2011-03-09 21:32:04 +0100
committerShauren <shauren.trinity@gmail.com>2011-03-09 21:32:04 +0100
commitc2c40a47501670dfe47124f59d8142ff12f1a3fc (patch)
tree4f338b90390e06c06cc894c587408de343724c9f /src/server/scripts/Outland
parent6e1e6957e22720d9c5ad9bcf7024b188be1e4cda (diff)
Scripts: Removed duplicate target selection function (SelectUnit), there is only SelectTarget now
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp4
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp28
-rw-r--r--src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp6
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp4
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp4
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp12
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp12
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp6
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp12
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp6
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp10
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp6
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_gruul.cpp4
-rw-r--r--src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp6
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp8
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp8
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp6
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp6
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp26
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp4
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp6
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp10
-rw-r--r--src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp2
-rw-r--r--src/server/scripts/Outland/boss_doomlord_kazzak.cpp4
-rw-r--r--src/server/scripts/Outland/boss_doomwalker.cpp2
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp2
49 files changed, 136 insertions, 136 deletions
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
index f76c99f699e..e413489600f 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -260,7 +260,7 @@ public:
if (StolenSoul_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
if (pTarget->GetTypeId() == TYPEID_PLAYER)
{
@@ -287,7 +287,7 @@ public:
if (Ribbon_of_Souls_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_RIBBON_OF_SOULS);
Ribbon_of_Souls_timer = 5000 + (rand()%20 * 1000);
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
index b27d0316b65..7bc09f74984 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
@@ -136,7 +136,7 @@ public:
if (FocusFire_Timer <= diff)
{
// Summon Focus Fire & Emote
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1);
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->isAlive())
{
FocusedTargetGUID = pTarget->GetGUID();
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
index e67cec43b0e..7d758d2bdf8 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
@@ -128,7 +128,7 @@ public:
{
summoned->CastSpell(summoned,SPELL_ETHEREAL_BEACON_VISUAL,false);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
summoned->AI()->AttackStart(pTarget);
}
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
index ca06fb97e52..a0e92e91704 100644
--- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_pandemonius.cpp
@@ -90,7 +90,7 @@ public:
if (VoidBlast_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_VOID_BLAST);
VoidBlast_Timer = 500;
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
index 3187dcdb2b6..fbb0bb5e14f 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp
@@ -112,7 +112,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);
}
@@ -154,7 +154,7 @@ public:
if (flameshock_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_FLAME_SHOCK);
flameshock_timer = 10000 + rand()%5000;
@@ -162,7 +162,7 @@ public:
if (arcaneshock_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_ARCANE_SHOCK);
arcaneshock_timer = 10000 + rand()%5000;
@@ -170,7 +170,7 @@ public:
if (frostshock_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_FROST_SHOCK);
frostshock_timer = 10000 + rand()%5000;
@@ -178,7 +178,7 @@ public:
if (shadowshock_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_SHADOW_SHOCK);
shadowshock_timer = 10000 + rand()%5000;
@@ -186,7 +186,7 @@ public:
if (chainlightning_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
chainlightning_timer = 25000;
@@ -230,7 +230,7 @@ public:
if (flameshock_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_FLAME_SHOCK);
flameshock_timer = 5000;
@@ -238,7 +238,7 @@ public:
if (flamebuffet_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_FLAME_BUFFET);
flamebuffet_timer = 5000;
@@ -289,7 +289,7 @@ public:
if (arcaneshock_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_ARCANE_SHOCK);
arcaneshock_timer = 5000;
@@ -297,7 +297,7 @@ public:
if (arcanebuffet_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_ARCANE_BUFFET);
arcanebuffet_timer = 5000;
@@ -344,7 +344,7 @@ public:
if (frostshock_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_FROST_SHOCK);
frostshock_timer = 5000;
@@ -352,7 +352,7 @@ public:
if (frostbuffet_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_FROST_BUFFET);
frostbuffet_timer = 5000;
@@ -400,7 +400,7 @@ public:
if (shadowshock_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_SHADOW_SHOCK);
shadowshock_timer = 5000;
@@ -408,7 +408,7 @@ public:
if (shadowbuffet_timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_SHADOW_BUFFET);
shadowbuffet_timer = 5000;
diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
index 8ad78b1aedc..af3630bac31 100644
--- a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
+++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_tailonking_ikiss.cpp
@@ -155,9 +155,9 @@ public:
//second top aggro target in normal, random target in heroic correct?
if (IsHeroic())
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
else
- pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,1);
+ pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO,1);
if (pTarget)
DoCast(pTarget, SPELL_POLYMORPH);
@@ -184,7 +184,7 @@ public:
{
DoScriptText(EMOTE_ARCANE_EXP, me);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
if (me->IsNonMeleeSpellCasted(false))
me->InterruptNonMeleeSpells(false);
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
index 27857f34e99..984a55f2a44 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
@@ -150,7 +150,7 @@ public:
//Charge_Timer
if (Charge_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_CHARGE);
Charge_Timer = 15000 + rand()%10000;
} else Charge_Timer -= diff;
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
index 1f72046ad71..042cf142c9b 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp
@@ -149,7 +149,7 @@ public:
// Magnetic Pull
if (MagneticPull_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
if (pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->isAlive())
{
DoCast(pTarget, SPELL_MAGNETIC_PULL);
diff --git a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
index c81f12f2114..d78a928ed93 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_bloodboil.cpp
@@ -228,7 +228,7 @@ public:
{
DoCast(me->getVictim(), SPELL_BEWILDERING_STRIKE);
float mt_threat = DoGetThreat(me->getVictim());
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1))
me->AddThreat(pTarget, mt_threat);
BewilderingStrikeTimer = 20000;
} else BewilderingStrikeTimer -= diff;
@@ -277,7 +277,7 @@ public:
{
if (Phase1)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget && pTarget->isAlive())
{
Phase1 = false;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index 3fa1f349bc0..3c3752c7c0b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -411,7 +411,7 @@ public:
Glaive->InterruptNonMeleeSpells(true);
DoCast(me, SPELL_FLAME_ENRAGE, true);
DoResetThreat();
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget && pTarget->isAlive())
{
me->AddThreat(me->getVictim(), 5000000.0f);
@@ -1055,7 +1055,7 @@ public:
//PHASE_NORMAL_2
case EVENT_AGONIZING_FLAMES:
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_AGONIZING_FLAMES);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_AGONIZING_FLAMES);
Timer[EVENT_AGONIZING_FLAMES] = 0;
break;
@@ -1080,12 +1080,12 @@ public:
switch(Event)
{
case EVENT_FIREBALL:
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL);
Timer[EVENT_FIREBALL] = 3000;
break;
case EVENT_DARK_BARRAGE:
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DARK_BARRAGE);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_DARK_BARRAGE);
Timer[EVENT_DARK_BARRAGE] = 0;
break;
@@ -1271,7 +1271,7 @@ public:
{
if (GETCRE(Illidan, IllidanGUID))
{
- Unit *pTarget = CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, Illidan->AI())->SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = Illidan->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!pTarget || !me->IsWithinDistInMap(pTarget, 80) || Illidan->IsWithinDistInMap(pTarget, 20))
{
diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
index 51637085bf1..661b64ea9e3 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp
@@ -165,7 +165,7 @@ public:
float Z = TeleportPoint[random].z;
for (uint8 i = 0; i < 3; ++i)
{
- Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER))
{
TargetGUID[i] = pUnit->GetGUID();
@@ -190,7 +190,7 @@ public:
//Randomly cast one beam.
if (BeamTimer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!pTarget || !pTarget->isAlive())
return;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index 30889ff69ad..6c75f3bd5ea 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -199,7 +199,7 @@ public:
float y = Coords[random].y;
Creature* Soul = me->SummonCreature(CREATURE_ENSLAVED_SOUL, x, y, me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 0);
if (!Soul) return false;
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
CAST_AI(npc_enslaved_soul::npc_enslaved_soulAI, Soul->AI())->ReliquaryGUID = me->GetGUID();
Soul->AI()->AttackStart(pTarget);
@@ -274,7 +274,7 @@ public:
if (Creature* Summon = DoSpawnCreature(23417+Phase, 0, 0, 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0))
{
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED); // Ribs: open
- Summon->AI()->AttackStart(SelectUnit(SELECT_TARGET_TOPAGGRO, 0));
+ Summon->AI()->AttackStart(SelectTarget(SELECT_TARGET_TOPAGGRO, 0));
EssenceGUID = Summon->GetGUID();
DoStartNoMovement(me);
} else EnterEvadeMode();
@@ -482,7 +482,7 @@ public:
if (SoulDrainTimer <= diff)
{
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_SOUL_DRAIN);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_SOUL_DRAIN);
SoulDrainTimer = 60000;
} else SoulDrainTimer -= diff;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index b8f34fcfd63..6cd95ce2000 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -371,7 +371,7 @@ public:
{
Spawn->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
Spawn->GetMotionMaster()->MovePoint(0, AGGRO_X, AGGRO_Y, AGGRO_Z);
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
Spawn->AI()->AttackStart(pTarget);
}
}
diff --git a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
index 2aa532d0e41..e1dd52be551 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_teron_gorefiend.cpp
@@ -106,7 +106,7 @@ public:
if (ShadowBoltTimer < diff && me->isInCombat())
{
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_SHADOWBOLT);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_SHADOWBOLT);
ShadowBoltTimer = 10000;
} else ShadowBoltTimer -= diff;
return;
@@ -365,7 +365,7 @@ public:
Construct->CastSpell(Construct, SPELL_PASSIVE_SHADOWFORM, true);
SetThreatList(Construct); // Use same function as Doom Blossom to set Threat List.
CAST_AI(mob_shadowy_construct::mob_shadowy_constructAI, Construct->AI())->GhostGUID = GhostGUID;
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (!pTarget) // someone's trying to solo.
pTarget = me->getVictim();
@@ -417,7 +417,7 @@ public:
Shadow = me->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0);
if (Shadow)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (!pTarget)
pTarget = me->getVictim();
@@ -430,7 +430,7 @@ public:
if (SummonDoomBlossomTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
float X = CalculateRandomLocation(pTarget->GetPositionX(), 20);
float Y = CalculateRandomLocation(pTarget->GetPositionY(), 20);
@@ -452,7 +452,7 @@ public:
if (IncinerateTimer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (!pTarget)
pTarget = me->getVictim();
@@ -466,7 +466,7 @@ public:
if (CrushingShadowsTimer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget && pTarget->isAlive())
DoCast(pTarget, SPELL_CRUSHING_SHADOWS);
CrushingShadowsTimer = 10000 + rand()%16 * 1000;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
index 285157080d4..06186d68860 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_warlord_najentus.cpp
@@ -167,7 +167,7 @@ public:
break;
case EVENT_SPINE:
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
if (!pTarget) pTarget = me->getVictim();
if (pTarget)
{
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 195bf936921..3b44f115b93 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -557,7 +557,7 @@ public:
if (HammerOfJusticeTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
// is in ~10-40 yd range
if (me->IsInRange(pTarget, 10.0f, 40.0f, false))
@@ -670,7 +670,7 @@ public:
if (BlizzardTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_BLIZZARD);
BlizzardTimer = 45000 + rand()%46 * 1000;
@@ -681,7 +681,7 @@ public:
if (FlamestrikeTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_FLAMESTRIKE);
FlamestrikeTimer = 55000 + rand()%46 * 1000;
@@ -738,7 +738,7 @@ public:
if (EmpoweredSmiteTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_EMPOWERED_SMITE);
EmpoweredSmiteTimer = 38000;
@@ -753,7 +753,7 @@ public:
if (DivineWrathTimer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_DIVINE_WRATH);
DivineWrathTimer = 40000 + rand()%41 * 1000;
@@ -838,7 +838,7 @@ public:
if (VanishTimer <= diff) // Disappear and stop attacking, but follow a random unit
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
VanishTimer = 30000;
AppearEnvenomTimer= 28000;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
index cdfada6efde..6705f4dda01 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -249,7 +249,7 @@ public:
if (CataclysmicBolt_Timer <= diff)
{
//select a random unit other than the main tank
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1);
//if there aren't other units, cast on the tank
if (!pTarget)
@@ -444,7 +444,7 @@ public:
}
//DoCast(me, spell_id, true);
Creature *Pet = DoSpawnCreature(pet_id,0,0,0,0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (Pet && pTarget)
{
Pet->AI()->AttackStart(pTarget);
@@ -695,7 +695,7 @@ public:
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Cyclone->setFaction(me->getFaction());
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
{
Cyclone->AI()->AttackStart(pTarget);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
index 9ac08388980..d5a6f0d177c 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_hydross_the_unstable.cpp
@@ -262,7 +262,7 @@ public:
//VileSludge_Timer
if (VileSludge_Timer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_VILE_SLUDGE);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index dfe92fd5ad6..fadd533c65a 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -426,7 +426,7 @@ public:
if (Sporebat)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
Sporebat->AI()->AttackStart(pTarget);
}
@@ -479,7 +479,7 @@ public:
//Forked Lightning
//Used constantly in Phase 2, it shoots out completely randomly targeted bolts of lightning which hit everybody in a roughtly 60 degree cone in front of Vashj for 2313-2687 nature damage.
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
pTarget = me->getVictim();
@@ -520,7 +520,7 @@ public:
if (CoilfangElite)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
CoilfangElite->AI()->AttackStart(pTarget);
else if (me->getVictim())
@@ -538,7 +538,7 @@ public:
if (CoilfangStrider)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
CoilfangStrider->AI()->AttackStart(pTarget);
else if (me->getVictim())
@@ -728,7 +728,7 @@ public:
if (PoisonBolt_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget && pTarget->IsWithinDistInMap(me, 30))
DoCast(pTarget, SPELL_POISON_BOLT);
@@ -820,7 +820,7 @@ public:
if (bolt_timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
{
Creature* trig = me->SummonCreature(TOXIC_SPORES_TRIGGER,pTarget->GetPositionX(),pTarget->GetPositionY(),pTarget->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,30000);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
index bb2f006c366..bf91825bae9 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp
@@ -420,7 +420,7 @@ public:
{
if (Whirlwind_Timer <= diff)
{
- Unit *newTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *newTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (newTarget)
{
DoResetThreat();
@@ -760,7 +760,7 @@ public:
if (Mindblast_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (pTarget)DoCast(pTarget, SPELL_MINDBLAST);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
index 3793a689602..b05ed6ff25e 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
@@ -299,7 +299,7 @@ public:
if (GeyserTimer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1);
if (!pTarget && me->getVictim())
pTarget = me->getVictim();
if (pTarget)
@@ -311,7 +311,7 @@ public:
{
if (WaterboltTimer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
if (!pTarget && me->getVictim())
pTarget = me->getVictim();
if (pTarget)
@@ -454,7 +454,7 @@ public:
if (ShootBowTimer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
int bp0 = 1100;
if (pTarget)
me->CastCustomSpell(pTarget,SPELL_SHOOT,&bp0,NULL,NULL,true);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
index b89fa7af86b..60b167bf1a9 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
@@ -187,7 +187,7 @@ public:
for (uint8 i = 0; i < 10; ++i)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
Creature* Murloc = me->SummonCreature(NPC_TIDEWALKER_LURKER, MurlocCords[i][0], MurlocCords[i][1], MurlocCords[i][2], MurlocCords[i][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
if (pTarget && Murloc)
Murloc->AI()->AttackStart(pTarget);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
index 75302367d4c..a8d7c1ce0b7 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_hydromancer_thespia.cpp
@@ -108,12 +108,12 @@ public:
//LightningCloud_Timer
if (LightningCloud_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_LIGHTNING_CLOUD);
//cast twice in Heroic mode
if (IsHeroic())
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_LIGHTNING_CLOUD);
LightningCloud_Timer = 15000+rand()%10000;
@@ -122,7 +122,7 @@ public:
//LungBurst_Timer
if (LungBurst_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_LUNG_BURST);
LungBurst_Timer = 7000+rand()%5000;
} else LungBurst_Timer -=diff;
@@ -130,12 +130,12 @@ public:
//EnvelopingWinds_Timer
if (EnvelopingWinds_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_ENVELOPING_WINDS);
//cast twice in Heroic mode
if (IsHeroic())
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_ENVELOPING_WINDS);
EnvelopingWinds_Timer = 10000+rand()%5000;
} else EnvelopingWinds_Timer -=diff;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
index 9058a8640a9..2bfa1fdb791 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_mekgineer_steamrigger.cpp
@@ -137,7 +137,7 @@ public:
if (Saw_Blade_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_SAW_BLADE);
else
DoCast(me->getVictim(), SPELL_SAW_BLADE);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
index aa00db8ba05..a9e0d953418 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SteamVault/boss_warlord_kalithresh.cpp
@@ -191,7 +191,7 @@ public:
//Impale_Timer
if (Impale_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_IMPALE);
Impale_Timer = 7500+rand()%5000;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
index 62ec7b400f7..289cbc781a0 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp
@@ -75,7 +75,7 @@ public:
if (Mushroom_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
me->SummonCreature(17990, pTarget->GetPositionX()+(rand()%8), pTarget->GetPositionY()+(rand()%8), pTarget->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
else
me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000);
@@ -85,7 +85,7 @@ public:
if (AcidGeyser_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_ACID_GEYSER);
AcidGeyser_Timer = 10000+rand()%7500;
} else AcidGeyser_Timer -= diff;
diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
index efec0d2c9a1..3825dba0dae 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
@@ -80,7 +80,7 @@ public:
if (summon && summon->GetEntry() == ENTRY_SPORE_STRIDER)
{
Striders.push_back(summon->GetGUID());
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
summon->AI()->AttackStart(pTarget);
else
if (me->getVictim())
@@ -150,7 +150,7 @@ public:
}
if (Levitate_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
{
DoCast(pTarget, SPELL_LEVITATE);
LevitatedTarget = pTarget->GetGUID();
@@ -163,7 +163,7 @@ public:
// Chain Lightning
if (ChainLightning_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_CHAIN_LIGHTNING);
ChainLightning_Timer = 7000;
} else ChainLightning_Timer -= diff;
diff --git a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
index 55a5bcc9e11..f0e580cfc0e 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_gruul.cpp
@@ -197,7 +197,7 @@ public:
// Hurtful Strike
if (m_uiHurtfulStrike_Timer <= uiDiff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,1);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO,1);
if (pTarget && me->IsWithinMeleeRange(me->getVictim()))
DoCast(pTarget, SPELL_HURTFUL_STRIKE);
@@ -221,7 +221,7 @@ public:
// Cave In
if (m_uiCaveIn_Timer <= uiDiff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_CAVE_IN);
if (m_uiCaveIn_StaticTimer >= 4000)
diff --git a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
index 05395d3fab4..d48edfb8e07 100644
--- a/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
+++ b/src/server/scripts/Outland/GruulsLair/boss_high_king_maulgar.cpp
@@ -281,7 +281,7 @@ public:
if (Charging_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
{
AttackStart(pTarget);
@@ -420,7 +420,7 @@ public:
if (DeathCoil_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_DEATH_COIL);
DeathCoil_Timer = 20000;
@@ -520,7 +520,7 @@ public:
//GreaterPolymorph_Timer
if (GreaterPolymorph_Timer <= diff)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
DoCast(pTarget, SPELL_GREATER_POLYMORPH);
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
index b3c3c628edf..efb99e41278 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
@@ -352,7 +352,7 @@ class mob_shadowmoon_channeler : public CreatureScript
if (MarkOfShadow_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_MARK_OF_SHADOW);
MarkOfShadow_Timer = 15000+rand()%5000;
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
index 3a63827e20c..c1c86aad7e9 100644
--- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp
@@ -122,7 +122,7 @@ class boss_the_maker : public CreatureScript
if (ExplodingBreaker_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_EXPLODING_BREAKER);
ExplodingBreaker_Timer = 4000+rand()%8000;
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
index bbd8dfee649..04ad98a965d 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp
@@ -107,7 +107,7 @@ class boss_omor_the_unscarred : public CreatureScript
{
DoScriptText(SAY_SUMMON, me);
- if (Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit* random = SelectTarget(SELECT_TARGET_RANDOM,0))
summoned->AI()->AttackStart(random);
++SummonedCount;
@@ -162,7 +162,7 @@ class boss_omor_the_unscarred : public CreatureScript
Unit* temp = NULL;
if (me->IsWithinMeleeRange(me->getVictim()))
temp = me->getVictim();
- else temp = SelectUnit(SELECT_TARGET_RANDOM,0);
+ else temp = SelectTarget(SELECT_TARGET_RANDOM,0);
if (temp && temp->GetTypeId() == TYPEID_PLAYER)
{
@@ -192,7 +192,7 @@ class boss_omor_the_unscarred : public CreatureScript
{
DoScriptText(SAY_CURSE, me);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
DoCast(pTarget, SPELL_TREACHEROUS_AURA);
Aura_Timer = 8000+rand()%8000;
@@ -203,7 +203,7 @@ class boss_omor_the_unscarred : public CreatureScript
if (Shadowbolt_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
if (pTarget)
pTarget = me->getVictim();
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
index b1a69490c25..840d28065b4 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
@@ -130,7 +130,7 @@ class boss_nazan : public CreatureScript
if (Fireball_Timer <= diff)
{
- if (Unit* pVictim = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit* pVictim = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pVictim, DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H), true);
Fireball_Timer = urand(4000,7000);
}
@@ -148,7 +148,7 @@ class boss_nazan : public CreatureScript
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
me->GetMotionMaster()->Clear();
- if (Unit* pVictim = SelectUnit(SELECT_TARGET_NEAREST,0))
+ if (Unit* pVictim = SelectTarget(SELECT_TARGET_NEAREST,0))
me->AI()->AttackStart(pVictim);
DoStartMovement(me->getVictim());
DoScriptText(EMOTE, me);
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
index e5fe4ddb0b8..96d8e17c238 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp
@@ -131,7 +131,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript
{
DoScriptText(SAY_SURGE, me);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_SURGE);
Surge_Timer = 5000+rand()%8000;
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index fb2ef71c576..d58cb83ce92 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -426,7 +426,7 @@ class boss_magtheridon : public CreatureScript
if (Blaze_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
float x, y, z;
pTarget->GetPosition(x, y, z);
@@ -460,7 +460,7 @@ class boss_magtheridon : public CreatureScript
{
if (Debris_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
float x, y, z;
pTarget->GetPosition(x, y, z);
@@ -577,7 +577,7 @@ class mob_hellfire_channeler : public CreatureScript
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 = 25000 + rand()%15000;
}
@@ -586,7 +586,7 @@ class mob_hellfire_channeler : public CreatureScript
if (Infernal_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_BURNING_ABYSSAL, true);
Infernal_Timer = 30000 + rand()%10000;
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index a6ce1ec3af1..7271dff7a41 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -277,7 +277,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
{
if (ShadowFissure_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_SHADOW_FISSURE);
ShadowFissure_Timer = urand(7500,15000);
}
@@ -286,7 +286,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
if (DeathCoil_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
DoCast(pTarget, SPELL_DEATH_COIL);
DeathCoil_Timer = urand(15000,20000);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
index bd44ee23faa..b02521d6136 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
@@ -383,7 +383,7 @@ class boss_warbringer_omrogg : public CreatureScript
if (ResetThreat_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
DoYellForThreat();
DoResetThreat();
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
index 323520a4696..e7098b1ffe1 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp
@@ -120,7 +120,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
case MOB_HEARTHEN_GUARD:
case MOB_SHARPSHOOTER_GUARD:
case MOB_REAVER_GUARD:
- summoned->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0));
+ summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0));
adds.push_back(summoned->GetGUID());
break;
case MOB_SHATTERED_ASSASSIN:
@@ -267,7 +267,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript
{
if (Charge_timer <= diff)
{
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), H_SPELL_CHARGE);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), H_SPELL_CHARGE);
Charge_timer = 0;
}
else
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
index 2836e329f80..a948ab70a34 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -154,7 +154,7 @@ class boss_alar : public CreatureScript
void JustSummoned(Creature *summon)
{
if (summon->GetEntry() == CREATURE_EMBER_OF_ALAR)
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
summon->AI()->AttackStart(pTarget);
}
@@ -283,7 +283,7 @@ class boss_alar : public CreatureScript
WaitTimer = 4000;
return;
case WE_DIVE:
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
me->RemoveAurasDueToSpell(SPELL_DIVE_BOMB_VISUAL);
DoCast(pTarget, SPELL_DIVE_BOMB, true);
@@ -403,7 +403,7 @@ class boss_alar : public CreatureScript
if (FlamePatch_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
Creature* Summoned = me->SummonCreature(CREATURE_FLAME_PATCH_ALAR, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 120000);
if (Summoned)
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 75c1e2e5b3e..5d7fb7e9f35 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -171,7 +171,7 @@ class boss_high_astromancer_solarian : public CreatureScript
Creature* Summoned = me->SummonCreature(entry, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
if (Summoned)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
Summoned->AI()->AttackStart(pTarget);
Summons.Summon(Summoned);
@@ -243,7 +243,7 @@ class boss_high_astromancer_solarian : public CreatureScript
}
else
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (!me->HasInArc(2.5f, pTarget))
pTarget = me->getVictim();
if (pTarget)
@@ -258,7 +258,7 @@ class boss_high_astromancer_solarian : public CreatureScript
{
me->InterruptNonMeleeSpells(false);
//Target the tank ?
- if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1))
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
{
if (pTarget->GetTypeId() == TYPEID_PLAYER)
{
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 2aaf708d3dc..6068414d29e 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -377,7 +377,7 @@ class boss_kaelthas : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
AttackStart(pTarget);
}
@@ -440,7 +440,7 @@ class boss_kaelthas : public CreatureScript
// if not phoenix, then it's one of the 7 weapons
if (pSummoned->GetEntry() != NPC_PHOENIX)
{
- if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
pSummoned->AI()->AttackStart(pTarget);
summons.Summon(pSummoned);
@@ -504,7 +504,7 @@ class boss_kaelthas : public CreatureScript
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Advisor->setFaction(me->getFaction());
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
Advisor->AI()->AttackStart(pTarget);
}
@@ -538,7 +538,7 @@ class boss_kaelthas : public CreatureScript
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Advisor->setFaction(me->getFaction());
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
Advisor->AI()->AttackStart(pTarget);
}
@@ -572,7 +572,7 @@ class boss_kaelthas : public CreatureScript
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Advisor->setFaction(me->getFaction());
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
Advisor->AI()->AttackStart(pTarget);
}
@@ -606,7 +606,7 @@ class boss_kaelthas : public CreatureScript
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Advisor->setFaction(me->getFaction());
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget)
Advisor->AI()->AttackStart(pTarget);
}
@@ -684,7 +684,7 @@ class boss_kaelthas : public CreatureScript
if (PhaseSubphase == 0)
{
//Respawn advisors
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
Creature *Advisor;
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
@@ -715,7 +715,7 @@ class boss_kaelthas : public CreatureScript
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
AttackStart(pTarget);
Phase_Timer = 30000;
@@ -772,7 +772,7 @@ class boss_kaelthas : public CreatureScript
if (FlameStrike_Timer <= diff)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pUnit, SPELL_FLAME_STRIKE);
FlameStrike_Timer = 30000;
@@ -984,7 +984,7 @@ class boss_kaelthas : public CreatureScript
//NetherBeam_Timer
if (NetherBeam_Timer <= diff)
{
- if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pUnit, SPELL_NETHER_BEAM);
NetherBeam_Timer = 4000;
@@ -1065,7 +1065,7 @@ class boss_thaladred_the_darkener : public CreatureScript
//Gaze_Timer
if (Gaze_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoResetThreat();
me->AddThreat(pTarget, 5000000.0f);
@@ -1268,7 +1268,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
if (Conflagration_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (pTarget && me->IsWithinDistInMap(pTarget, 30))
DoCast(pTarget, SPELL_CONFLAGRATION);
@@ -1381,7 +1381,7 @@ class boss_master_engineer_telonicus : public CreatureScript
//RemoteToy_Timer
if (RemoteToy_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_REMOTE_TOY);
RemoteToy_Timer = 10000+rand()%5000;
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
index 059f24610fc..a0b954870df 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp
@@ -73,10 +73,10 @@ class mob_crystalcore_devastator : 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/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
index 8d72e3802b7..9524b911125 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp
@@ -234,7 +234,7 @@ class mob_ragin_flames : public CreatureScript
if (!onlyonce)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
me->GetMotionMaster()->MoveChase(pTarget);
onlyonce = true;
}
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
index a45df068425..6e06fd4920e 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
@@ -129,7 +129,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
{
for (uint8 i = 0; i < 3; ++i)
{
- Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
+ Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0);
Creature* Wraith = me->SummonCreature(21062,me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
if (pTarget && Wraith)
Wraith->AI()->AttackStart(pTarget);
@@ -158,7 +158,7 @@ class boss_pathaleon_the_calculator : public CreatureScript
if (Domination_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
{
DoScriptText(RAND(SAY_DOMINATION_1,SAY_DOMINATION_2), me);
DoCast(pTarget, SPELL_DOMINATION);
@@ -233,7 +233,7 @@ class mob_nether_wraith : public CreatureScript
if (ArcaneMissiles_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_ARCANE_MISSILES);
else
DoCast(me->getVictim(), SPELL_ARCANE_MISSILES);
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
index d88522b5ccf..45a84daaa7d 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
@@ -129,7 +129,7 @@ class boss_harbinger_skyriss : public CreatureScript
else
summon->SetHealth(summon->CountPctFromMaxHealth(66));
if (me->getVictim())
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
summon->AI()->AttackStart(pTarget);
}
@@ -209,7 +209,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (MindRend_Timer <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_MIND_REND);
else
DoCast(me->getVictim(), SPELL_MIND_REND);
@@ -226,7 +226,7 @@ class boss_harbinger_skyriss : public CreatureScript
DoScriptText(RAND(SAY_FEAR_1,SAY_FEAR_2), me);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_FEAR);
else
DoCast(me->getVictim(), SPELL_FEAR);
@@ -243,7 +243,7 @@ class boss_harbinger_skyriss : public CreatureScript
DoScriptText(RAND(SAY_MIND_1,SAY_MIND_2), me);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, SPELL_DOMINATION);
else
DoCast(me->getVictim(), SPELL_DOMINATION);
@@ -260,7 +260,7 @@ class boss_harbinger_skyriss : public CreatureScript
if (me->IsNonMeleeSpellCasted(false))
return;
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,1))
DoCast(pTarget, H_SPELL_MANA_BURN);
ManaBurn_Timer = 16000+rand()%16000;
diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
index ce8c2b01c90..eaaaaec92cd 100644
--- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
+++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp
@@ -162,7 +162,7 @@ class boss_laj : public CreatureScript
void JustSummoned(Creature *summon)
{
if (summon && me->getVictim())
- summon->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
+ summon->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0));
}
void UpdateAI(const uint32 diff)
diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
index 4b54d778c3b..8b840c39785 100644
--- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
+++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
@@ -143,7 +143,7 @@ public:
//MarkOfKazzak_Timer
if (MarkOfKazzak_Timer <= diff)
{
- Unit* victim = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ Unit* victim = SelectTarget(SELECT_TARGET_RANDOM, 0);
if (victim->GetPower(POWER_MANA))
{
DoCast(victim, SPELL_MARKOFKAZZAK);
@@ -161,7 +161,7 @@ public:
if (Twisted_Reflection_Timer <= diff)
{
- DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_TWISTEDREFLECTION);
+ DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), SPELL_TWISTEDREFLECTION);
Twisted_Reflection_Timer = 15000;
} else Twisted_Reflection_Timer -= diff;
diff --git a/src/server/scripts/Outland/boss_doomwalker.cpp b/src/server/scripts/Outland/boss_doomwalker.cpp
index cd74c1cb08e..99d340f06a2 100644
--- a/src/server/scripts/Outland/boss_doomwalker.cpp
+++ b/src/server/scripts/Outland/boss_doomwalker.cpp
@@ -152,7 +152,7 @@ public:
if (Chain_Timer <= diff)
{
Unit *pTarget = NULL;
- pTarget = SelectUnit(SELECT_TARGET_RANDOM,1);
+ pTarget = SelectTarget(SELECT_TARGET_RANDOM,1);
if (!pTarget)
pTarget = me->getVictim();
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index 19c72718b5e..6e9a0edc56f 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -1553,7 +1553,7 @@ public:
{
if (SpellTimer1 <= diff)
{
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0))
{
if (pTarget->GetTypeId() == TYPEID_PLAYER)
{