Scripts/Spells: reduce the proc chance for Killing Machine by 50% when the dual wielding to reflect the patch 4.2.0 chance in which offhand attacks may now also trigger the proc

This commit is contained in:
Ovahlord committed 2025-06-15 16:13:35 +02:00
1 parent fd7d91a1d5
commit 8b0c5c87ce
2 files changed
+32 -7

No files matched your search

@@ -0,0 +1,10 @@
UPDATE `spell_script_names` SET `ScriptName`= 'spell_dk_killing_machine_triggered' WHERE `spell_id`= 51124;
DELETE FROM `spell_proc` WHERE `SpellId` IN (51123, 51127, 51128);
INSERT INTO `spell_proc` (`SpellId`, `ProcsPerMinute`) VALUES
(51123, 1),
(51127, 3),
(51128, 5);
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dk_killing_machine';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(-51123, 'spell_dk_killing_machine');
+22 -7
View File
@@ -1652,16 +1652,30 @@ class spell_dk_festering_strike : public SpellScript
}
};
// -51123 - Killing Machine
class spell_dk_killing_machine : public AuraScript
{
bool HandleProcChance(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
// When dual wielding weapons, the procs per minute chance is halved as both weapons may trigger the proc
if (eventInfo.GetActor()->haveOffhandWeapon())
return roll_chance_f(50.0f);
return true;
}
void Register() override
{
DoCheckEffectProc.Register(&spell_dk_killing_machine::HandleProcChance, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
// 51124 - Killing Machine
class spell_dk_killing_machine : public SpellScript
class spell_dk_killing_machine_triggered : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
{
SPELL_DK_ITEM_T11_DPS_4P_BONUS,
SPELL_DK_DEATH_EATER
});
return ValidateSpellInfo({ SPELL_DK_ITEM_T11_DPS_4P_BONUS, SPELL_DK_DEATH_EATER });
}
void HandleT11Bonus(SpellEffIndex /*effIndex*/)
@@ -1673,7 +1687,7 @@ class spell_dk_killing_machine : public SpellScript
void Register() override
{
OnEffectHitTarget.Register(&spell_dk_killing_machine::HandleT11Bonus, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
OnEffectHitTarget.Register(&spell_dk_killing_machine_triggered::HandleT11Bonus, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};
@@ -1952,6 +1966,7 @@ void AddSC_deathknight_spell_scripts()
RegisterSpellScript(spell_dk_icy_touch);
RegisterSpellScript(spell_dk_improved_presence);
RegisterSpellScript(spell_dk_killing_machine);
RegisterSpellScript(spell_dk_killing_machine_triggered);
RegisterSpellScript(spell_dk_necrotic_strike);
RegisterSpellScript(spell_dk_obliterate);
RegisterSpellScript(spell_dk_pestilence);