diff options
| author | azazel <none@none> | 2010-08-26 01:20:57 +0600 |
|---|---|---|
| committer | azazel <none@none> | 2010-08-26 01:20:57 +0600 |
| commit | 341e6303effccfdbfb6b67ae0d8fe6933f56ed3b (patch) | |
| tree | eff917fec707c7097a7b408ce15842ff24d8ddb4 /src/server/scripts/Outland/HellfireCitadel | |
| parent | bb5f7b64927713911331f81f9c0a5abc33e0c3ab (diff) | |
Core:
* add helping methods for manipulating unit's health and use it where applicable
* fix some conversion warnings and cleanup code (formatting, CRLF, tabs to spaces)
--HG--
branch : trunk
Diffstat (limited to 'src/server/scripts/Outland/HellfireCitadel')
5 files changed, 7 insertions, 7 deletions
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 3d01c985ffe..71c4e1387a4 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 @@ -177,7 +177,7 @@ class boss_omor_the_unscarred : public CreatureScript else OrbitalStrike_Timer -= diff; - if ((me->GetHealth()*100) / me->GetMaxHealth() < 20) + if (HealthBelowPct(20)) { if (DemonicShield_Timer <= diff) { 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 d47723dc135..5cd1afbe706 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 @@ -140,7 +140,7 @@ class boss_nazan : public CreatureScript if (flight) // phase 1 - the flight { Creature *Vazruden = Unit::GetCreature(*me,VazrudenGUID); - if (Fly_Timer < diff || !(Vazruden && Vazruden->isAlive() && (Vazruden->GetHealth()*5 > Vazruden->GetMaxHealth()))) + if (Fly_Timer < diff || !(Vazruden && Vazruden->isAlive() && Vazruden->HealthAbovePct(20))) { flight = false; BellowingRoar_Timer = 6000; 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 645a65bdee2..3c7200d64ad 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -139,7 +139,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript else Surge_Timer -= diff; - if ((me->GetHealth()*100) / me->GetMaxHealth() < 20) + if (HealthBelowPct(20)) { if (Retaliation_Timer <= diff) { @@ -152,7 +152,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript if (!YelledForHeal) { - if ((me->GetHealth()*100) / me->GetMaxHealth() < 40) + if (HealthBelowPct(40)) { DoScriptText(SAY_HEAL, me); YelledForHeal = true; diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 8a27461723b..2d168a1f064 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -443,7 +443,7 @@ class boss_magtheridon : public CreatureScript else Blaze_Timer -= diff; - if (!Phase3 && me->GetHealth()*10 < me->GetMaxHealth()*3 + if (!Phase3 && HealthBelowPct(30) && !me->IsNonMeleeSpellCasted(false) // blast nova && !me->hasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake { @@ -568,7 +568,7 @@ class mob_hellfire_channeler : public CreatureScript if (DarkMending_Timer <= diff) { - if ((me->GetHealth()*100 / me->GetMaxHealth()) < 50) + if (HealthBelowPct(50)) DoCast(me, SPELL_DARK_MENDING); DarkMending_Timer = 10000 +(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 ed1b60d6a1d..ce1a60809c2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -293,7 +293,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript else DeathCoil_Timer -= diff; - if ((me->GetHealth()*100) / me->GetMaxHealth() <= 20) + if (!HealthAbovePct(20)) Phase = true; DoMeleeAttackIfReady(); |
