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:
@@ -154,7 +154,7 @@ class boss_archaedas : public CreatureScript
|
||||
} else WallMinionTimer -= diff;
|
||||
|
||||
//If we are <66 summon the guardians
|
||||
if (!guardiansAwake && me->GetHealth()*100 / me->GetMaxHealth() <= 66) {
|
||||
if (!guardiansAwake && !HealthAbovePct(66)) {
|
||||
ActivateMinion(pInstance->GetData64(5),true); // EarthenGuardian1
|
||||
ActivateMinion(pInstance->GetData64(6),true); // EarthenGuardian2
|
||||
ActivateMinion(pInstance->GetData64(7),true); // EarthenGuardian3
|
||||
@@ -167,7 +167,7 @@ class boss_archaedas : public CreatureScript
|
||||
}
|
||||
|
||||
//If we are <33 summon the vault walkers
|
||||
if (!vaultWalkersAwake && me->GetHealth()*100 / me->GetMaxHealth() <= 33) {
|
||||
if (!vaultWalkersAwake && !HealthAbovePct(33)) {
|
||||
ActivateMinion(pInstance->GetData64(1),true); // VaultWalker1
|
||||
ActivateMinion(pInstance->GetData64(2),true); // VaultWalker2
|
||||
ActivateMinion(pInstance->GetData64(3),true); // VaultWalker3
|
||||
|
||||
@@ -67,7 +67,7 @@ class boss_ironaya : public CreatureScript
|
||||
return;
|
||||
|
||||
//If we are <50% hp do knockaway ONCE
|
||||
if (!hasCastedKnockaway && me->GetHealth()*2 < me->GetMaxHealth())
|
||||
if (!hasCastedKnockaway && HealthBelowPct(50))
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_KNOCKAWAY, true);
|
||||
|
||||
@@ -91,7 +91,7 @@ class boss_ironaya : public CreatureScript
|
||||
Arcing_Timer = 13000;
|
||||
} else Arcing_Timer -= diff;
|
||||
|
||||
if (!hasCastedWstomp && me->GetHealth()*4 < me->GetMaxHealth())
|
||||
if (!hasCastedWstomp && HealthBelowPct(25))
|
||||
{
|
||||
DoCast(me, SPELL_WSTOMP);
|
||||
hasCastedWstomp = true;
|
||||
|
||||
Reference in New Issue
Block a user