Skip to content
Permalink
Browse files

Script/Spells: Drop obsolete will of the necropolis script.

Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information...
AriDEV committed Jul 6, 2019
1 parent 3ba9a95 commit b932f5f5ae8058ea80c22e8957942f431e6017f5
Showing with 1 addition and 54 deletions.
  1. +1 −0 sql/updates/world/2019_07_06_02_world.sql
  2. +0 −54 src/server/scripts/Spells/spell_dk.cpp
@@ -0,0 +1 @@
DELETE FROM spell_script_names WHERE ScriptName LIKE 'spell_dk_will_of_the_necropolis';
@@ -59,7 +59,6 @@ enum DeathKnightSpells
SPELL_DK_SCENT_OF_BLOOD = 50422,
SPELL_DK_SCOURGE_STRIKE_TRIGGERED = 70890,
SPELL_DK_UNHOLY_PRESENCE = 48265,
SPELL_DK_WILL_OF_THE_NECROPOLIS = 96171
};

// Gorefiend's Grasp - 108199
@@ -1111,58 +1110,6 @@ class spell_dk_vampiric_blood : public SpellScriptLoader
}
};

// -52284 - Will of the Necropolis
class spell_dk_will_of_the_necropolis : public SpellScriptLoader
{
public:
spell_dk_will_of_the_necropolis() : SpellScriptLoader("spell_dk_will_of_the_necropolis")
{ }

class spell_dk_will_of_the_necropolis_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dk_will_of_the_necropolis_AuraScript);

bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_DK_WILL_OF_THE_NECROPOLIS))
return false;
return true;
}

bool CheckProc(ProcEventInfo& eventInfo)
{
//! HACK due to currenct proc system implementation
if (Player* player = GetTarget()->ToPlayer())
if (player->HasSpellCooldown(GetId()))
return false;

return GetTarget()->HealthBelowPctDamaged(30, eventInfo.GetDamageInfo()->GetDamage());
}

void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
GetTarget()->CastSpell(GetTarget(), SPELL_DK_WILL_OF_THE_NECROPOLIS, true, NULL, aurEff);

if (Player* player = GetTarget()->ToPlayer())
{
player->RemoveSpellCooldown(SPELL_DK_RUNE_TAP, true);
player->AddSpellCooldown(GetId(), 0, time(NULL) + 45);
}
}

void Register() OVERRIDE
{
DoCheckProc += AuraCheckProcFn(spell_dk_will_of_the_necropolis_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_dk_will_of_the_necropolis_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE);
}
};

AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_dk_will_of_the_necropolis_AuraScript();
}
};

void AddSC_deathknight_spell_scripts()
{
new spell_dk_anti_magic_shell_raid();
@@ -1183,5 +1130,4 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_scent_of_blood();
new spell_dk_scourge_strike(); // 5.4.8 18414
new spell_dk_vampiric_blood();
new spell_dk_will_of_the_necropolis();
}

0 comments on commit b932f5f

Please sign in to comment.
You can’t perform that action at this time.