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
This commit is contained in:
@@ -418,7 +418,7 @@ public:
|
||||
} else ThunderClap_Timer -= diff;
|
||||
|
||||
//FireballVolley_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
if (HealthBelowPct(51))
|
||||
{
|
||||
if (FireballVolley_Timer <= diff)
|
||||
{
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
} else Cleave_Timer -= diff;
|
||||
|
||||
//Adds_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 21)
|
||||
if (HealthBelowPct(21))
|
||||
{
|
||||
if (Adds_Timer <= diff)
|
||||
{
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
}
|
||||
|
||||
//Summon Medics
|
||||
if (!Medics && me->GetHealth()*100 / me->GetMaxHealth() < 21)
|
||||
if (!Medics && HealthBelowPct(21))
|
||||
{
|
||||
SummonMedics(me->getVictim());
|
||||
SummonMedics(me->getVictim());
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
} else GroundTremor_Timer -= diff;
|
||||
|
||||
//Frenzy_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
if (HealthBelowPct(51))
|
||||
{
|
||||
if (Frenzy_Timer <= diff)
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
} else FieryBurst_Timer -= diff;
|
||||
|
||||
//WarStomp_Timer
|
||||
if (me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
if (HealthBelowPct(51))
|
||||
{
|
||||
if (WarStomp_Timer <= diff)
|
||||
{
|
||||
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
} else DemonArmor_Timer -= diff;
|
||||
|
||||
//Summon Voidwalkers
|
||||
if (!Voidwalkers && me->GetHealth()*100 / me->GetMaxHealth() < 51)
|
||||
if (!Voidwalkers && HealthBelowPct(51))
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_SUMMON_VOIDWALKERS, true);
|
||||
Voidwalkers = true;
|
||||
|
||||
Reference in New Issue
Block a user