Core: Cleaning up hungarian notation - Phase3: pTarget -> target
This commit is contained in:
@@ -154,8 +154,8 @@ class boss_alar : public CreatureScript
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (summon->GetEntry() == CREATURE_EMBER_OF_ALAR)
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
@@ -283,15 +283,15 @@ class boss_alar : public CreatureScript
|
||||
WaitTimer = 4000;
|
||||
return;
|
||||
case WE_DIVE:
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_DIVE_BOMB_VISUAL);
|
||||
DoCast(pTarget, SPELL_DIVE_BOMB, true);
|
||||
DoCast(target, SPELL_DIVE_BOMB, true);
|
||||
float dist = 3.0f;
|
||||
if (me->IsWithinDist3d(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 5.0f))
|
||||
if (me->IsWithinDist3d(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 5.0f))
|
||||
dist = 5.0f;
|
||||
WaitTimer = 1000 + uint32(floor(dist / 80 * 1000.0f));
|
||||
me->GetMap()->CreatureRelocation(me, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f);
|
||||
me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f);
|
||||
me->StopMoving();
|
||||
WaitEvent = WE_LAND;
|
||||
}
|
||||
@@ -371,9 +371,9 @@ class boss_alar : public CreatureScript
|
||||
{
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget= SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_CHARGE);
|
||||
Unit* target= SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
|
||||
if (target)
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
Charge_Timer = 30000;
|
||||
}
|
||||
else
|
||||
@@ -403,9 +403,9 @@ class boss_alar : public CreatureScript
|
||||
|
||||
if (FlamePatch_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
Creature* Summoned = me->SummonCreature(CREATURE_FLAME_PATCH_ALAR, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 120000);
|
||||
Creature* Summoned = me->SummonCreature(CREATURE_FLAME_PATCH_ALAR, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 120000);
|
||||
if (Summoned)
|
||||
{
|
||||
Summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -436,10 +436,10 @@ class boss_alar : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = me->SelectNearestTargetInAttackDistance(5);
|
||||
if (pTarget)
|
||||
me->AI()->AttackStart(pTarget);
|
||||
Unit* target = NULL;
|
||||
target = me->SelectNearestTargetInAttackDistance(5);
|
||||
if (target)
|
||||
me->AI()->AttackStart(target);
|
||||
else
|
||||
{
|
||||
DoCast(me, SPELL_FLAME_BUFFET, true);
|
||||
|
||||
@@ -171,8 +171,8 @@ 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 = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
Summoned->AI()->AttackStart(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
Summoned->AI()->AttackStart(target);
|
||||
|
||||
Summons.Summon(Summoned);
|
||||
}
|
||||
@@ -227,8 +227,8 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
if (Wrath_Timer <= diff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
DoCast(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER, true);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
DoCast(target, SPELL_WRATH_OF_THE_ASTROMANCER, true);
|
||||
Wrath_Timer = 20000+rand()%5000;
|
||||
}
|
||||
else
|
||||
@@ -243,11 +243,11 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!me->HasInArc(2.5f, pTarget))
|
||||
pTarget = me->getVictim();
|
||||
if (pTarget)
|
||||
DoCast(pTarget, SPELL_ARCANE_MISSILES);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (!me->HasInArc(2.5f, target))
|
||||
target = me->getVictim();
|
||||
if (target)
|
||||
DoCast(target, SPELL_ARCANE_MISSILES);
|
||||
}
|
||||
ArcaneMissiles_Timer = 3000;
|
||||
}
|
||||
@@ -258,11 +258,11 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
//Target the tank ?
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
if (pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
DoCast(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER);
|
||||
DoCast(target, SPELL_WRATH_OF_THE_ASTROMANCER);
|
||||
m_uiWrathOfTheAstromancer_Timer = 25000;
|
||||
}
|
||||
else
|
||||
@@ -446,21 +446,21 @@ class mob_solarium_priest : public CreatureScript
|
||||
|
||||
if (healTimer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
Unit* target = NULL;
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
case 0:
|
||||
if (pInstance)
|
||||
pTarget = Unit::GetUnit((*me), pInstance->GetData64(DATA_ASTROMANCER));
|
||||
target = Unit::GetUnit((*me), pInstance->GetData64(DATA_ASTROMANCER));
|
||||
break;
|
||||
case 1:
|
||||
pTarget = me;
|
||||
target = me;
|
||||
break;
|
||||
}
|
||||
|
||||
if (pTarget)
|
||||
if (target)
|
||||
{
|
||||
DoCast(pTarget, SPELL_SOLARIUM_GREAT_HEAL);
|
||||
DoCast(target, SPELL_SOLARIUM_GREAT_HEAL);
|
||||
healTimer = 9000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,8 +376,8 @@ 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 = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(target);
|
||||
|
||||
}
|
||||
else
|
||||
@@ -439,8 +439,8 @@ class boss_kaelthas : public CreatureScript
|
||||
// if not phoenix, then it's one of the 7 weapons
|
||||
if (pSummoned->GetEntry() != NPC_PHOENIX)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
pSummoned->AI()->AttackStart(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
pSummoned->AI()->AttackStart(target);
|
||||
|
||||
summons.Summon(pSummoned);
|
||||
}
|
||||
@@ -474,7 +474,7 @@ class boss_kaelthas : public CreatureScript
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
Unit* target = NULL;
|
||||
Creature* Advisor = NULL;
|
||||
|
||||
//Subphase switch
|
||||
@@ -503,9 +503,9 @@ class boss_kaelthas : public CreatureScript
|
||||
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
Advisor->setFaction(me->getFaction());
|
||||
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Advisor->AI()->AttackStart(pTarget);
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
Advisor->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
++PhaseSubphase;
|
||||
@@ -537,9 +537,9 @@ class boss_kaelthas : public CreatureScript
|
||||
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
Advisor->setFaction(me->getFaction());
|
||||
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Advisor->AI()->AttackStart(pTarget);
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
Advisor->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
++PhaseSubphase;
|
||||
@@ -571,9 +571,9 @@ class boss_kaelthas : public CreatureScript
|
||||
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
Advisor->setFaction(me->getFaction());
|
||||
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Advisor->AI()->AttackStart(pTarget);
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
Advisor->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
++PhaseSubphase;
|
||||
@@ -605,9 +605,9 @@ class boss_kaelthas : public CreatureScript
|
||||
Advisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
Advisor->setFaction(me->getFaction());
|
||||
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (pTarget)
|
||||
Advisor->AI()->AttackStart(pTarget);
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
Advisor->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
Phase_Timer = 3000;
|
||||
@@ -683,7 +683,7 @@ class boss_kaelthas : public CreatureScript
|
||||
if (PhaseSubphase == 0)
|
||||
{
|
||||
//Respawn advisors
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
Creature* Advisor;
|
||||
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
|
||||
@@ -693,7 +693,7 @@ class boss_kaelthas : public CreatureScript
|
||||
if (!Advisor)
|
||||
sLog->outError("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
|
||||
else
|
||||
CAST_AI(advisorbase_ai, Advisor->AI())->Revive(pTarget);
|
||||
CAST_AI(advisorbase_ai, Advisor->AI())->Revive(target);
|
||||
}
|
||||
|
||||
PhaseSubphase = 1;
|
||||
@@ -714,8 +714,8 @@ 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 = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
AttackStart(target);
|
||||
|
||||
Phase_Timer = 30000;
|
||||
}
|
||||
@@ -1064,11 +1064,11 @@ class boss_thaladred_the_darkener : public CreatureScript
|
||||
//Gaze_Timer
|
||||
if (Gaze_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoResetThreat();
|
||||
me->AddThreat(pTarget, 5000000.0f);
|
||||
DoScriptText(EMOTE_THALADRED_GAZE, me, pTarget);
|
||||
me->AddThreat(target, 5000000.0f);
|
||||
DoScriptText(EMOTE_THALADRED_GAZE, me, target);
|
||||
Gaze_Timer = 8500;
|
||||
}
|
||||
}
|
||||
@@ -1266,11 +1266,11 @@ class boss_grand_astromancer_capernian : public CreatureScript
|
||||
//Conflagration_Timer
|
||||
if (Conflagration_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
if (pTarget && me->IsWithinDistInMap(pTarget, 30))
|
||||
DoCast(pTarget, SPELL_CONFLAGRATION);
|
||||
if (target && me->IsWithinDistInMap(target, 30))
|
||||
DoCast(target, SPELL_CONFLAGRATION);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_CONFLAGRATION);
|
||||
|
||||
@@ -1283,7 +1283,7 @@ class boss_grand_astromancer_capernian : public CreatureScript
|
||||
if (ArcaneExplosion_Timer <= diff)
|
||||
{
|
||||
bool InMeleeRange = false;
|
||||
Unit* pTarget = NULL;
|
||||
Unit* target = NULL;
|
||||
std::list<HostileReference*>& m_threatlist = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator i = m_threatlist.begin(); i!= m_threatlist.end(); ++i)
|
||||
{
|
||||
@@ -1292,13 +1292,13 @@ class boss_grand_astromancer_capernian : public CreatureScript
|
||||
if (pUnit && pUnit->IsWithinDistInMap(me, 5))
|
||||
{
|
||||
InMeleeRange = true;
|
||||
pTarget = pUnit;
|
||||
target = pUnit;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (InMeleeRange)
|
||||
DoCast(pTarget, SPELL_ARCANE_EXPLOSION);
|
||||
DoCast(target, SPELL_ARCANE_EXPLOSION);
|
||||
|
||||
ArcaneExplosion_Timer = 4000+rand()%2000;
|
||||
}
|
||||
@@ -1380,8 +1380,8 @@ class boss_master_engineer_telonicus : public CreatureScript
|
||||
//RemoteToy_Timer
|
||||
if (RemoteToy_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(pTarget, SPELL_REMOTE_TOY);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_REMOTE_TOY);
|
||||
|
||||
RemoteToy_Timer = 10000+rand()%5000;
|
||||
}
|
||||
|
||||
@@ -118,27 +118,27 @@ class boss_void_reaver : public CreatureScript
|
||||
// Arcane Orb
|
||||
if (ArcaneOrb_Timer <= diff)
|
||||
{
|
||||
Unit* pTarget = NULL;
|
||||
Unit* target = NULL;
|
||||
std::list<HostileReference *> t_list = me->getThreatManager().getThreatList();
|
||||
std::vector<Unit* > target_list;
|
||||
for (std::list<HostileReference *>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
pTarget = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (!pTarget)
|
||||
target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (!target)
|
||||
continue;
|
||||
// exclude pets & totems, 18 yard radius minimum
|
||||
if (pTarget->GetTypeId() == TYPEID_PLAYER && pTarget->isAlive() && !pTarget->IsWithinDist(me, 18, false))
|
||||
target_list.push_back(pTarget);
|
||||
pTarget = NULL;
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && target->isAlive() && !target->IsWithinDist(me, 18, false))
|
||||
target_list.push_back(target);
|
||||
target = NULL;
|
||||
}
|
||||
|
||||
if (target_list.size())
|
||||
pTarget = *(target_list.begin()+rand()%target_list.size());
|
||||
target = *(target_list.begin()+rand()%target_list.size());
|
||||
else
|
||||
pTarget = me->getVictim();
|
||||
target = me->getVictim();
|
||||
|
||||
if (pTarget)
|
||||
me->CastSpell(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), SPELL_ARCANE_ORB, false, NULL, NULL, 0, pTarget);
|
||||
if (target)
|
||||
me->CastSpell(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), SPELL_ARCANE_ORB, false, NULL, NULL, 0, target);
|
||||
ArcaneOrb_Timer = 3000;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -73,13 +73,13 @@ class mob_crystalcore_devastator : public CreatureScript
|
||||
DoCast(me->getVictim(), SPELL_KNOCKAWAY, true);
|
||||
|
||||
// current aggro target is knocked away pick new target
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0);
|
||||
|
||||
if (!pTarget || pTarget == me->getVictim())
|
||||
pTarget = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
|
||||
if (!target || target == me->getVictim())
|
||||
target = SelectTarget(SELECT_TARGET_TOPAGGRO, 1);
|
||||
|
||||
if (pTarget)
|
||||
me->TauntApply(pTarget);
|
||||
if (target)
|
||||
me->TauntApply(target);
|
||||
|
||||
Knockaway_Timer = 23000;
|
||||
}
|
||||
|
||||
@@ -233,8 +233,8 @@ class mob_ragin_flames : public CreatureScript
|
||||
|
||||
if (!onlyonce)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->GetMotionMaster()->MoveChase(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
me->GetMotionMaster()->MoveChase(target);
|
||||
onlyonce = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,10 +129,10 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = 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);
|
||||
if (target && Wraith)
|
||||
Wraith->AI()->AttackStart(target);
|
||||
}
|
||||
DoScriptText(SAY_SUMMON, me);
|
||||
Summon_Timer = 30000 + rand()%15000;
|
||||
@@ -158,10 +158,10 @@ class boss_pathaleon_the_calculator : public CreatureScript
|
||||
|
||||
if (Domination_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
DoScriptText(RAND(SAY_DOMINATION_1, SAY_DOMINATION_2), me);
|
||||
DoCast(pTarget, SPELL_DOMINATION);
|
||||
DoCast(target, SPELL_DOMINATION);
|
||||
}
|
||||
Domination_Timer = 25000 + rand()%5000;
|
||||
}
|
||||
@@ -233,8 +233,8 @@ class mob_nether_wraith : public CreatureScript
|
||||
|
||||
if (ArcaneMissiles_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_ARCANE_MISSILES);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(target, SPELL_ARCANE_MISSILES);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_ARCANE_MISSILES);
|
||||
ArcaneMissiles_Timer = 5000 + rand()%5000;
|
||||
|
||||
@@ -128,8 +128,8 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
else
|
||||
summon->SetHealth(summon->CountPctFromMaxHealth(66));
|
||||
if (me->getVictim())
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
@@ -208,8 +208,8 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
|
||||
if (MindRend_Timer <= diff)
|
||||
{
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_MIND_REND);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(target, SPELL_MIND_REND);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_MIND_REND);
|
||||
|
||||
@@ -225,8 +225,8 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
|
||||
DoScriptText(RAND(SAY_FEAR_1, SAY_FEAR_2), me);
|
||||
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_FEAR);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(target, SPELL_FEAR);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_FEAR);
|
||||
|
||||
@@ -242,8 +242,8 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
|
||||
DoScriptText(RAND(SAY_MIND_1, SAY_MIND_2), me);
|
||||
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_DOMINATION);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(target, SPELL_DOMINATION);
|
||||
else
|
||||
DoCast(me->getVictim(), SPELL_DOMINATION);
|
||||
|
||||
@@ -259,8 +259,8 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
if (me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, H_SPELL_MANA_BURN);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(target, H_SPELL_MANA_BURN);
|
||||
|
||||
ManaBurn_Timer = 16000+rand()%16000;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user