diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2018-01-13 06:45:21 -0300 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-06-13 00:59:13 +0200 |
| commit | fccf1a8c62820004df92b9ac567ba75f7281e6e2 (patch) | |
| tree | 063326fad1f3fa51c633e4b8d0c7745341ec113e /src/server/scripts/Spells | |
| parent | fa4e2d3935b0184623a6d816dc25a41bad30b1d8 (diff) | |
Core/Auras: removed caster dependency from core
- 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
Closes #19876
(cherry picked from commit cb9e72e521d3cc415dd15bf6912c87f89e41b92a)
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_monk.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 0f59df198c1..12ff19eb64c 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -286,7 +286,7 @@ class spell_dk_dancing_rune_weapon : public AuraScript int32 amount = static_cast<int32>(damageInfo->GetDamage()) / 2; SpellNonMeleeDamage log(drw, drw->GetVictim(), spellInfo, { spellInfo->GetSpellXSpellVisualId(drw), 0 }, spellInfo->GetSchoolMask()); log.damage = amount; - drw->DealDamage(drw->GetVictim(), amount, nullptr, SPELL_DIRECT_DAMAGE, spellInfo->GetSchoolMask(), spellInfo, true); + Unit::DealDamage(drw, drw->GetVictim(), amount, nullptr, SPELL_DIRECT_DAMAGE, spellInfo->GetSchoolMask(), spellInfo, true); drw->SendSpellNonMeleeDamageLog(&log); } diff --git a/src/server/scripts/Spells/spell_monk.cpp b/src/server/scripts/Spells/spell_monk.cpp index b12aa458e68..721ca1f829e 100644 --- a/src/server/scripts/Spells/spell_monk.cpp +++ b/src/server/scripts/Spells/spell_monk.cpp @@ -309,7 +309,7 @@ class spell_monk_stagger_damage_aura : public AuraScript if (AuraEffect* auraEff = auraStagger->GetEffect(AuraStaggerEffectTotal)) { float total = float(auraEff->GetAmount()); - float tickDamage = float(aurEff->GetDamage()); + float tickDamage = float(aurEff->GetAmount()); auraEff->ChangeAmount(total - tickDamage); } } @@ -382,7 +382,7 @@ private: if (auraDamage) if (AuraEffect* eff = auraDamage->GetEffect(AuraStaggerEffectTick)) - eff->SetDamage(tickDamage); + eff->ChangeAmount(tickDamage); } }; |
