aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland/TempestKeep
diff options
context:
space:
mode:
authorVincent_Michael <Vincent_Michael@gmx.de>2013-02-03 00:38:34 +0100
committerVincent_Michael <Vincent_Michael@gmx.de>2013-02-03 00:38:34 +0100
commit847cafc121d1fb2557178e6832225ece486fcadb (patch)
tree10eb4ccea846919cc35917b63bfdeeb2c46fd32d /src/server/scripts/Outland/TempestKeep
parent2c2fe7d464a819821a8b8eb58af7cc02380ebbd2 (diff)
Scripts/Misc: Some code optimisations
Diffstat (limited to 'src/server/scripts/Outland/TempestKeep')
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 01ca1636c6b..9ec6691839b 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -245,11 +245,13 @@ class boss_high_astromancer_solarian : public CreatureScript
}
else
{
- Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
- if (!me->HasInArc(2.5f, target))
- target = me->getVictim();
- if (target)
+ if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
+ {
+ if (!me->HasInArc(2.5f, target))
+ target = me->getVictim();
+
DoCast(target, SPELL_ARCANE_MISSILES);
+ }
}
ArcaneMissiles_Timer = 3000;
}