* 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
This commit is contained in:
azazel
2010-08-26 01:20:57 +06:00
parent bb5f7b6492
commit 341e6303ef
166 changed files with 445 additions and 416 deletions
@@ -184,8 +184,7 @@ public:
} else Flamebreath_Timer -= diff;
//Summon Rend
if (!SummonedRend && me->GetHealth()*100 / me->GetMaxHealth() < 11
&& me->GetHealth() > 0)
if (!SummonedRend && HealthBelowPct(11) && me->GetHealth() > 0)
{
//summon Rend and Change model to normal Gyth
//Interrupt any spell casting
@@ -83,7 +83,7 @@ public:
} else MightyBlow_Timer -= diff;
//Summon Gizrul
if (!Summoned && me->GetHealth()*100 / me->GetMaxHealth() < 25)
if (!Summoned && HealthBelowPct(25))
{
me->SummonCreature(10268,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,300000);
Summoned = true;
@@ -108,7 +108,7 @@ public:
} else Knockaway_Timer -= diff;
//Summon two Beserks
if (!Summoned && me->GetHealth()*100 / me->GetMaxHealth() < 51)
if (!Summoned && HealthBelowPct(51))
{
Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0, 100, true);