From a299b14838b40f964ca8c5ead292be24b650c1af Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Fri, 29 Nov 2024 16:00:36 +0100 Subject: Core/Auras: make sure that only SPELL_AURA_MOD_MELEE_HASTE will affect the HasteRegen modifier --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index e8ca0ae2ec5..237c1071c3f 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -4443,6 +4443,8 @@ void AuraEffect::HandleModMeleeSpeedPct(AuraApplication const* aurApp, uint8 mod Unit* target = aurApp->GetTarget(); int32 spellGroupVal = target->GetHighestExclusiveSameEffectSpellGroupValue(this, GetAuraType()); + bool applyHasteRegenMod = GetAuraType() == SPELL_AURA_MOD_MELEE_HASTE; + if (std::abs(spellGroupVal) >= std::abs(GetAmount())) return; @@ -4450,11 +4452,14 @@ void AuraEffect::HandleModMeleeSpeedPct(AuraApplication const* aurApp, uint8 mod { target->ApplyAttackTimePercentMod(BASE_ATTACK, float(spellGroupVal), !apply); target->ApplyAttackTimePercentMod(OFF_ATTACK, float(spellGroupVal), !apply); - target->ApplyHasteRegenMod(float(spellGroupVal), !apply); + if (applyHasteRegenMod) + target->ApplyHasteRegenMod(float(spellGroupVal), !apply); } target->ApplyAttackTimePercentMod(BASE_ATTACK, float(GetAmount()), apply); target->ApplyAttackTimePercentMod(OFF_ATTACK, float(GetAmount()), apply); - target->ApplyHasteRegenMod(float(GetAmount()), apply); + + if (applyHasteRegenMod) + target->ApplyHasteRegenMod(float(GetAmount()), apply); } void AuraEffect::HandleAuraModRangedHaste(AuraApplication const* aurApp, uint8 mode, bool apply) const -- cgit v1.2.3