mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 06:25:55 +00:00
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:
@@ -844,19 +844,22 @@ class spell_rog_cut_to_the_chase : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_rog_cut_to_the_chase);
|
||||
|
||||
void HandleProc(ProcEventInfo& /*eventInfo*/)
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
// Refresh Slice and Dice to 5 combo point max duration
|
||||
if (AuraEffect const* snDEffect = GetTarget()->GetAuraEffect(SPELL_AURA_MOD_MELEE_HASTE, SPELLFAMILY_ROGUE, 0x40000, 0, 0))
|
||||
// Refresh Slice and Dice to its 5 combo point maximum duration
|
||||
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
|
||||
{
|
||||
OnProc += AuraProcFn(spell_rog_cut_to_the_chase::HandleProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_rog_cut_to_the_chase::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user