Core/Spells: Crimson Scourge will now proc only if the target is affected by any of the caster's diseases

This commit is contained in:
Ovahlord
2018-06-19 13:33:32 +02:00
parent 2f9cfdb823
commit 109e14bee0
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dk_crimson_scourge';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(-81135, 'spell_dk_crimson_scourge');

View File

@@ -1995,6 +1995,37 @@ class spell_dk_blood_rites : public SpellScriptLoader
}
};
class spell_dk_crimson_scourge : public SpellScriptLoader
{
public:
spell_dk_crimson_scourge() : SpellScriptLoader("spell_dk_crimson_scourge") { }
class spell_dk_crimson_scourge_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dk_crimson_scourge_AuraScript);
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
if (DamageInfo* damage = eventInfo.GetDamageInfo())
if (Unit* target = damage->GetVictim())
if (target->GetDiseasesByCaster(GetTarget()->GetGUID(), false))
return;
PreventDefaultAction();
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_dk_crimson_scourge_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_dk_crimson_scourge_AuraScript();
}
};
void AddSC_deathknight_spell_scripts()
{
new spell_dk_anti_magic_shell_raid();
@@ -2005,6 +2036,7 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_blood_rites();
new spell_dk_butchery();
new spell_dk_chill_of_the_grave();
new spell_dk_crimson_scourge();
new spell_dk_dark_transformation();
new spell_dk_dark_transformation_aura();
new spell_dk_death_and_decay();