Core/Spells: Chill of the Grave will no longer gain Runic Power when Icy Touch or Howling Blast have no power cost

* Chill of the Grave will no longer grant Runic Power when Howling blast hits additional targets
This commit is contained in:
Ovahlord
2018-06-17 13:47:44 +02:00
parent 0fd206c537
commit 4c26625651
2 changed files with 58 additions and 0 deletions

View File

@@ -56,11 +56,14 @@ enum DeathKnightSpells
SPELL_DK_ENERGIZE_BLOOD_RUNE = 81166,
SPELL_DK_ENERGIZE_FROST_RUNE = 81168,
SPELL_DK_ENERGIZE_UNHOLY_RUNE = 81169,
SPELL_DK_FREEZING_FOG = 59052,
SPELL_DK_FROST_FEVER = 55095,
SPELL_DK_FROST_PRESENCE = 48266,
SPELL_DK_FROST_STRIKE = 49143,
SPELL_DK_GHOUL_EXPLODE = 47496,
SPELL_DK_GLYPH_OF_ICEBOUND_FORTITUDE = 58625,
SPELL_DK_HOWLING_BLAST = 49184,
SPELL_DK_ICY_TOUCH = 45477,
SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1 = 50365,
SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED = 63611,
SPELL_DK_IMPROVED_DEATH_STRIKE = 62905,
@@ -1768,6 +1771,57 @@ class spell_dk_howling_blast : public SpellScriptLoader
}
};
// -49149 - Chill of the Grave
class spell_dk_chill_of_the_grave : public SpellScriptLoader
{
public:
spell_dk_chill_of_the_grave() : SpellScriptLoader("spell_dk_chill_of_the_grave") { }
class spell_dk_chill_of_the_grave_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dk_chill_of_the_grave_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
{
SPELL_DK_FREEZING_FOG,
SPELL_DK_ICY_TOUCH,
SPELL_DK_HOWLING_BLAST
});
}
bool CheckProc(ProcEventInfo& eventInfo)
{
if (Spell const* spell = eventInfo.GetProcSpell())
{
if (SpellInfo const* spellInfo = spell->GetSpellInfo())
if (GetTarget()->HasAura(SPELL_DK_FREEZING_FOG))
if (spellInfo->Id == SPELL_DK_ICY_TOUCH || spellInfo->Id == SPELL_DK_HOWLING_BLAST)
return false;
if (Unit* spellTarget = spell->m_targets.GetUnitTarget())
if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
if (Unit* procTarget = eventInfo.GetDamageInfo()->GetVictim())
if (spellTarget == procTarget)
return true;
}
return false;
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_dk_chill_of_the_grave_AuraScript::CheckProc);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_dk_chill_of_the_grave_AuraScript();
}
};
void AddSC_deathknight_spell_scripts()
{
new spell_dk_anti_magic_shell_raid();
@@ -1776,6 +1830,7 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_blood_boil();
new spell_dk_blood_gorged();
new spell_dk_butchery();
new spell_dk_chill_of_the_grave();
new spell_dk_dark_transformation();
new spell_dk_dark_transformation_aura();
new spell_dk_death_and_decay();