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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user