mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 11:21:58 +01:00
Core/Auras: reworked multiplicative AuraEffects calculation
- Splitted containers for flat modifiers and pct modifiers, as they now have different handling
- Amount is now multiplied only on apply; on unapply, iterate through auras and reset the counter
- Fixes many cases of rounding error due to applying/unapplying of small factors
- Allows amounts to be zeroed (ie with an AuraEffect of amount -100)
- Do a partial revert of 6dc37a9add, auras should update amounts only for items allowed (ie no more giving crit to a sword while having an axe in the other hand and being Poleaxe spec'd)
- SPELL_AURA_MOD_SCALE now scales additively, rather than multiplicatively (checked in sniffs)
Closes #18687
This commit is contained in:
@@ -3349,7 +3349,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
|
||||
case RANGED_ATTACK: unitMod = UNIT_MOD_DAMAGE_RANGED; break;
|
||||
}
|
||||
|
||||
float weapon_total_pct = m_caster->GetModifierValue(unitMod, TOTAL_PCT);
|
||||
float weapon_total_pct = m_caster->GetPctModifierValue(unitMod, TOTAL_PCT);
|
||||
if (fixed_bonus)
|
||||
fixed_bonus = int32(fixed_bonus * weapon_total_pct);
|
||||
if (spell_bonus)
|
||||
|
||||
Reference in New Issue
Block a user