diff options
author | Ovahlord <dreadkiller@gmx.de> | 2024-11-29 16:00:36 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-11-29 16:00:36 +0100 |
commit | a299b14838b40f964ca8c5ead292be24b650c1af (patch) | |
tree | 29ea4e5d0b22b6f5d7a4d947902a750b00b0dafd /src | |
parent | 37095f9a6e75045789031252ea3157bb2efa8015 (diff) |
Core/Auras: make sure that only SPELL_AURA_MOD_MELEE_HASTE will affect the HasteRegen modifier
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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 |