diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2018-03-01 23:18:49 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2018-03-01 23:18:49 -0300 |
| commit | 23808fe349e78118461c08ebe78c8892391be236 (patch) | |
| tree | f562440700e5cd42fa1099f02f4e16551ee7f119 /src | |
| parent | 54e841888621ce2ea6fbfde2f86842ec088cd575 (diff) | |
Core/Auras: fixed SPELL_AURA_MOD_HIT_CHANCE honoring stack rules in all cases
Updates #21367
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index ce27bc14579..3cef786e12f 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3797,6 +3797,7 @@ void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, b Unit* target = aurApp->GetTarget(); + // handle stack rules if (target->GetTypeId() == TYPEID_PLAYER) { target->ToPlayer()->UpdateMeleeHitChances(); @@ -3804,8 +3805,9 @@ void AuraEffect::HandleModHitChance(AuraApplication const* aurApp, uint8 mode, b } else { - target->m_modMeleeHitChance += (apply) ? GetAmount() : (-GetAmount()); - target->m_modRangedHitChance += (apply) ? GetAmount() : (-GetAmount()); + float value = target->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE); + target->m_modMeleeHitChance = value; + target->m_modRangedHitChance = value; } } |
