diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2017-02-27 14:20:32 -0300 |
|---|---|---|
| committer | funjoker <funjoker109@gmail.com> | 2020-04-24 17:18:47 +0200 |
| commit | ebc06b1d0401be69066986e18d0e926170c58023 (patch) | |
| tree | a08815a7fe6f052030ccbd1837ca9d67739de596 /src/server/scripts/Spells | |
| parent | 73ea9ecec1f29752d515eb8fa22de7e0c9d2ec79 (diff) | |
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 6dc37a9add631888fe5fbcd43d19c2b07bed8a57, 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
(cherry picked from commit c69a7d1223b2ce108a221e5cc70f76cd80ae6675)
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_pet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp index c0b570cbf46..7aaba87a2da 100644 --- a/src/server/scripts/Spells/spell_pet.cpp +++ b/src/server/scripts/Spells/spell_pet.cpp @@ -314,7 +314,7 @@ public: { if (AuraEffect* /* aurEff */ect = owner->GetAuraEffect(56246, EFFECT_0)) { - float base_attPower = pet->GetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE) * pet->GetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_PCT); + float base_attPower = pet->GetFlatModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE) * pet->GetPctModifierValue(UNIT_MOD_ATTACK_POWER, BASE_PCT); amount += CalculatePct(amount+base_attPower, /* aurEff */ect->GetAmount()); } } |
