Scripts: Removed duplicate target selection function (SelectUnit), there is only SelectTarget now

This commit is contained in:
Shauren
2011-03-09 21:32:04 +01:00
parent 6e1e6957e2
commit c2c40a4750
169 changed files with 420 additions and 523 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ public:
//Sleep_Timer
if (m_uiSleep_Timer <= uiDiff)
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_SLEEP);
m_uiSleep_Timer = 8000 + rand()%8000;
+3 -3
View File
@@ -90,7 +90,7 @@ public:
void JustSummoned(Creature* pSummoned)
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
pSummoned->AI()->AttackStart(pTarget);
}
@@ -117,7 +117,7 @@ public:
//Sleep_Timer
if (m_uiSleep_Timer <= uiDiff)
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_SLEEP);
m_uiSleep_Timer = 8000 + rand()%7000;
@@ -164,7 +164,7 @@ public:
//Summon 3 Shades at 75%, 50% and 25% (if bShades is true we already left in line 117, no need to check here again)
if (!m_bShades && !HealthAbovePct(100 - 25 * m_uiShadesSummoned))
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
//Interrupt any spell casting
me->InterruptNonMeleeSpells(false);
+4 -4
View File
@@ -75,7 +75,7 @@ public:
void JustSummoned(Creature* pSummoned)
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
pSummoned->AI()->AttackStart(pTarget);
}
@@ -87,7 +87,7 @@ public:
//Sleep_Timer
if (m_uiSleep_Timer <= uiDiff)
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_SLEEP);
m_uiSleep_Timer = 8000 + rand()%7000;
@@ -107,7 +107,7 @@ public:
//Tailsweep every 2 seconds
if (m_uiTailSweep_Timer <= uiDiff)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_TAILSWEEP);
m_uiTailSweep_Timer = 2000;
@@ -119,7 +119,7 @@ public:
if (m_uiLightningWave_Timer <= uiDiff)
{
//Cast LIGHTNINGWAVE on a Random target
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_LIGHTNINGWAVE);
m_uiLightningWave_Timer = 7000 + rand()%5000;