- ScalingStatDistribution/Value (ie heirlooms): apply bonuses in all cases, some calls used nullptr (like after disarm) and item wasn't regaining them
- AP multiplier wasn't correctly reflected after unequipping a weapon
- Correctly set base damages at unequip
- Was losing info of delayed targets due to remove_if move-assigning targets, it needs to be saved into delayed target vector before returning from lambda
- Delayed auras applying on many targets are now handled gracefully
- Aura will be applied at last moment possible (after damage) to prevent regressions on #18395
- Partial revert of 9b38a6352c as it wasnt handling correctly checks without spells
* applied character database updates for the caster depenency removal
* corrected implementation of SPELL_ATTR3_SUPPRESS_CASTER_PROCS and SPELL_ATTR3_SUPPRESS_TARGET_PROCS based on master branch
* removed a duplicate SpellAuraInterruptFlags::ActionDelayed removal call
- Spell bonus calculation and penalty was done twice, but it's simply flat +SP, which should be taken into account before other bonuses
- Fixed missing code from SpellDamageBonusDone/SpellHealingBonusDone and killed multiplication by stack amount twice for default coefficient spells (already multiplied on level penalty)
We're fixing those by moving calculation to Launch phase, where target taken bonuses haven't been used yet.
- Bronjahm: Magic's Bane
- BPC: Shadow Prison
- Oculus: Shock Lance
- Ymiron: Dark Slash (extra fix, it was wrongly damaging half of total health, it's supposed to be half of CURRENT health!)
- DK: Raise Ally Thrash spell (also extra fix: corrected formula)
- Warrior: Bloodthirst (shouldn't matter much as it's damage class none and those don't get bonuses by default)
- Warrior: Concussion Blow
- Warlock: extra fix for Haunt, healing part shouldn't scale with spell power
Since cb9e72e521 attacker may not be in world when hook is called
(cherry picked from commit 0db5c2df3f)
# Conflicts:
# src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
# src/server/scripts/World/npcs_special.cpp
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling