fix(Core/Spells): Fix Cut to the Chase S&D duration (#24841)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-02-23 18:52:27 -06:00
committed by GitHub
parent 5d33af0d40
commit 3fb46dd4ae
+8 -5
View File
@@ -844,19 +844,22 @@ class spell_rog_cut_to_the_chase : public AuraScript
{ {
PrepareAuraScript(spell_rog_cut_to_the_chase); PrepareAuraScript(spell_rog_cut_to_the_chase);
void HandleProc(ProcEventInfo& /*eventInfo*/) void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{ {
PreventDefaultAction(); PreventDefaultAction();
// Refresh Slice and Dice to 5 combo point max duration // Refresh Slice and Dice to its 5 combo point maximum duration
if (AuraEffect const* snDEffect = GetTarget()->GetAuraEffect(SPELL_AURA_MOD_MELEE_HASTE, SPELLFAMILY_ROGUE, 0x40000, 0, 0)) Unit* caster = eventInfo.GetActor();
if (AuraEffect const* snd = caster->GetAuraEffect(SPELL_AURA_MOD_MELEE_HASTE, SPELLFAMILY_ROGUE, 0x40000, 0, 0, caster->GetGUID()))
{ {
snDEffect->GetBase()->SetDuration(snDEffect->GetSpellInfo()->GetMaxDuration(), true); int32 maxDuration = snd->GetSpellInfo()->GetMaxDuration();
snd->GetBase()->SetDuration(maxDuration, true);
snd->GetBase()->SetMaxDuration(snd->GetBase()->GetDuration());
} }
} }
void Register() override void Register() override
{ {
OnProc += AuraProcFn(spell_rog_cut_to_the_chase::HandleProc); OnEffectProc += AuraEffectProcFn(spell_rog_cut_to_the_chase::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
} }
}; };