Core/Spells: fixed Blood Death Knight's Blood Rites passive

This commit is contained in:
Ovahlord
2018-06-19 13:09:05 +02:00
parent 86f2c5e28c
commit 2f9cfdb823
3 changed files with 52 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dk_blood_rites';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(50034, 'spell_dk_blood_rites');
DELETE FROM `spell_proc` WHERE `spellId`= 50034;
INSERT INTO `spell_proc` (`SpellId`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `AttributesMask`) VALUES
(50034, 15, 0x00000010, 0x00020000, 0x0, 0x00015550, 0x1, 0x1, 0x0, 0x0);

View File

@@ -5187,7 +5187,9 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
// Blood of the North
// Reaping
// Death Rune Mastery
if (GetSpellInfo()->SpellIconID == 3041 || GetSpellInfo()->SpellIconID == 22 || GetSpellInfo()->SpellIconID == 2622)
// Blood Rites
if (GetSpellInfo()->SpellIconID == 3041 || GetSpellInfo()->SpellIconID == 22
|| GetSpellInfo()->SpellIconID == 2622 || GetSpellInfo()->SpellIconID == 2724)
{
if (target->GetTypeId() != TYPEID_PLAYER)
return;

View File

@@ -1924,7 +1924,7 @@ class spell_dk_reaping : public SpellScriptLoader
{
PrepareAuraScript(spell_dk_reaping_AuraScript);
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
@@ -1955,6 +1955,46 @@ class spell_dk_reaping : public SpellScriptLoader
}
};
class spell_dk_blood_rites : public SpellScriptLoader
{
public:
spell_dk_blood_rites() : SpellScriptLoader("spell_dk_blood_rites") { }
class spell_dk_blood_rites_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dk_blood_rites_AuraScript);
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
Player* player = GetTarget()->ToPlayer();
if (!player)
return;
uint8 runeMask = player->GetLastUsedRuneMask();
for (uint8 i = 0; i < MAX_RUNES; i++)
{
if (runeMask & (1 << i) && player->GetCurrentRune(i) != RUNE_DEATH)
player->AddRuneByAuraEffect(i, RUNE_DEATH, aurEff, SPELL_AURA_PERIODIC_DUMMY, GetSpellInfo());
}
GetEffect(EFFECT_0)->ResetPeriodic(true);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_dk_blood_rites_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_dk_blood_rites_AuraScript();
}
};
void AddSC_deathknight_spell_scripts()
{
new spell_dk_anti_magic_shell_raid();
@@ -1962,6 +2002,7 @@ void AddSC_deathknight_spell_scripts()
new spell_dk_anti_magic_zone();
new spell_dk_blood_boil();
new spell_dk_blood_gorged();
new spell_dk_blood_rites();
new spell_dk_butchery();
new spell_dk_chill_of_the_grave();
new spell_dk_dark_transformation();