aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp9
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp48
2 files changed, 54 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 90789041422..c0bdaf394c9 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -734,10 +734,13 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
case SPELLFAMILY_DEATHKNIGHT:
{
// Blood Boil - bonus for diseased targets
- if (m_spellInfo->SpellFamilyFlags[0] & 0x00040000 && unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0, 0, 0x00000002, m_caster->GetGUID()))
+ if (m_spellInfo->SpellFamilyFlags[0] & 0x00040000)
{
- damage += m_damage / 2;
- damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)* 0.035f);
+ if (unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0, 0, 0x00000002, m_caster->GetGUID()))
+ {
+ damage += m_damage / 2;
+ damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.035f);
+ }
}
break;
}
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 258506557fe..410d05cd5a5 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -33,6 +33,7 @@ enum DeathKnightSpells
DK_SPELL_GHOUL_EXPLODE = 47496,
DISPLAY_GHOUL_CORPSE = 25537,
DK_SPELL_SCOURGE_STRIKE_TRIGGERED = 70890,
+ DK_SPELL_BLOOD_BOIL_TRIGGERED = 65658,
DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1 = 49189,
DK_SPELL_WILL_OF_THE_NECROPOLIS_AURA_R1 = 52284,
};
@@ -484,6 +485,52 @@ class spell_dk_spell_deflection : public SpellScriptLoader
}
};
+// 48721 Blood Boil
+class spell_dk_blood_boil : public SpellScriptLoader
+{
+ public:
+ spell_dk_blood_boil() : SpellScriptLoader("spell_dk_blood_boil") { }
+
+ class spell_dk_blood_boil_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_dk_blood_boil_SpellScript);
+
+ bool Validate(SpellEntry const * /*spellEntry*/)
+ {
+ if (!sSpellStore.LookupEntry(DK_SPELL_BLOOD_BOIL_TRIGGERED))
+ return false;
+ return true;
+ }
+
+ bool Load()
+ {
+ _executed = false;
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCaster()->getClass() == CLASS_DEATH_KNIGHT;
+ }
+
+ void HandleAfterHit()
+ {
+ if (_executed || !GetHitUnit())
+ return;
+
+ _executed = true;
+ GetCaster()->CastSpell(GetCaster(), DK_SPELL_BLOOD_BOIL_TRIGGERED, true);
+ }
+
+ void Register()
+ {
+ AfterHit += SpellHitFn(spell_dk_blood_boil_SpellScript::HandleAfterHit);
+ }
+
+ bool _executed;
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_dk_blood_boil_SpellScript();
+ }
+};
+
// 52284 - Will of the Necropolis
class spell_dk_will_of_the_necropolis : public SpellScriptLoader
{
@@ -560,5 +607,6 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_runic_power_feed();
new spell_dk_scourge_strike();
new spell_dk_spell_deflection();
+ new spell_dk_blood_boil();
new spell_dk_will_of_the_necropolis();
}