aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp2
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp2
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp2
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp2
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 8d6f078355a..32a22260ed4 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -54,7 +54,7 @@ public:
int32 bp = 0;
// Living ghoul as a target
if (unitTarget->isAlive())
- bp = unitTarget->GetMaxHealth() * 0.25f;
+ bp = int32(unitTarget->CountPctFromMaxHealth(25));
// Some corpse
else
bp = GetEffectValue();
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 931914ea03e..f54803c900e 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -85,7 +85,7 @@ public:
if (NewPet->getDeathState() == DEAD)
NewPet->setDeathState(ALIVE);
- NewPet->SetHealth(NewPet->GetMaxHealth());
+ NewPet->SetFullHealth();
NewPet->SetPower(NewPet->getPowerType(),NewPet->GetMaxPower(NewPet->getPowerType()));
switch (NewPet->GetEntry())
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 106384c6320..ae54bfe297d 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -184,7 +184,7 @@ public:
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit *caster = GetCaster();
- int32 healthModSpellBasePoints0 = int32(caster->GetMaxHealth()*0.3);
+ int32 healthModSpellBasePoints0 = int32(caster->CountPctFromMaxHealth(30));
caster->CastCustomSpell(caster, HUNTER_PET_SPELL_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
}
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 448a468cdf2..64dc02425df 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -74,7 +74,7 @@ public:
case CREATURE_FAMILY_VOIDWALKER:
{
SpellEntry const* spellInfo = sSpellStore.LookupEntry(WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER);
- int32 hp = targetCreature->GetMaxHealth() * GetCaster()->CalculateSpellDamage(targetCreature, spellInfo, 0) / 100;
+ int32 hp = int32(targetCreature->CountPctFromMaxHealth(GetCaster()->CalculateSpellDamage(targetCreature, spellInfo, 0)));
targetCreature->CastCustomSpell(targetCreature, WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER, &hp, NULL, NULL, true);
//unitTarget->CastSpell(unitTarget, 54441, true);
break;
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index 48a37395b81..85c7c57ad05 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -44,7 +44,7 @@ class spell_warr_last_stand : public SpellScriptLoader
void HandleDummy(SpellEffIndex /*effIndex*/)
{
- int32 healthModSpellBasePoints0 = int32(GetCaster()->GetMaxHealth() * 0.3);
+ int32 healthModSpellBasePoints0 = int32(GetCaster()->CountPctFromMaxHealth(30));
GetCaster()->CastCustomSpell(GetCaster(), WARRIOR_SPELL_LAST_STAND_TRIGGERED, &healthModSpellBasePoints0, NULL, NULL, true, NULL);
}