aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKandera <KanderaDev@gmail.com>2012-06-18 12:48:34 -0400
committerKandera <KanderaDev@gmail.com>2012-06-18 12:48:34 -0400
commit2affb39bc0adcfa5758268222a115e3eb3a3247d (patch)
tree557adc455fdc7926d639bab9d036ef7109b68bdc /src
parentbd7299ac35600f4f084074c95c64ba27cad04ac4 (diff)
Core/Spells: fix bloodthirst. again.
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index 0ba5c866d63..f1276c24a75 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -184,9 +184,9 @@ class spell_warr_deep_wounds : public SpellScriptLoader
damage = caster->SpellDamageBonusDone(target, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE);
ApplyPctN(damage, 16 * sSpellMgr->GetSpellRank(GetSpellInfo()->Id));
-
+
damage = target->SpellDamageBonusTaken(caster, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE);
-
+
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_DEEP_WOUNDS_RANK_PERIODIC);
uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude;
@@ -405,7 +405,7 @@ class spell_warr_bloodthirst : public SpellScriptLoader
void Register()
{
- OnEffectHitTarget += SpellEffectFn(spell_warr_bloodthirst_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
+ OnEffectHit += SpellEffectFn(spell_warr_bloodthirst_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};
@@ -415,6 +415,33 @@ class spell_warr_bloodthirst : public SpellScriptLoader
}
};
+class spell_warr_bloodthirst_heal : public SpellScriptLoader
+{
+public:
+ spell_warr_bloodthirst_heal() : SpellScriptLoader("spell_warr_bloodthirst_heal") { }
+
+ class spell_warr_bloodthirst_heal_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_warr_bloodthirst_heal_SpellScript);
+
+ void HandleHeal(SpellEffIndex /* effIndex */)
+ {
+ if (GetTriggeringSpell())
+ SetHitHeal(CalculatePctN(GetCaster()->GetMaxHealth(),GetTriggeringSpell()->Effects[EFFECT_1].CalcValue()));
+ }
+
+ void Register()
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_warr_bloodthirst_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_warr_bloodthirst_heal_SpellScript();
+ }
+};
+
enum Overpower
{
SPELL_UNRELENTING_ASSAULT_RANK_1 = 46859,
@@ -472,4 +499,5 @@ void AddSC_warrior_spell_scripts()
new spell_warr_concussion_blow();
new spell_warr_bloodthirst();
new spell_warr_overpower();
+ new spell_warr_bloodthirst_heal();
}