diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-01-13 06:45:21 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2018-01-13 06:45:21 -0300 |
commit | cb9e72e521d3cc415dd15bf6912c87f89e41b92a (patch) | |
tree | be9e692f0ddf9f080f923c7396de19e4ca869c6f /src/server/game/Spells/SpellMgr.cpp | |
parent | 1c60af632888433b29a27bee76e82e96632d4096 (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
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
-rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 274d77c0134..731d4f4dfb7 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2977,6 +2977,21 @@ void SpellMgr::LoadSpellInfoCorrections() }); } + // Allows those to crit + ApplySpellFix({ + 379, // Earth Shield + 33778, // Lifebloom Final Bloom + 64844, // Divine Hymn + 71607, // Item - Bauble of True Blood 10m + 71646, // Item - Bauble of True Blood 25m + 71610, // Item - Althor's Abacus trigger 10m + 71641 // Item - Althor's Abacus trigger 25m + }, [](SpellInfo* spellInfo) + { + // We need more spells to find a general way (if there is any) + spellInfo->DmgClass = SPELL_DAMAGE_CLASS_MAGIC; + }); + // Spell Reflection ApplySpellFix({ 57643 }, [](SpellInfo* spellInfo) { @@ -3172,6 +3187,14 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_20_YARDS); }); + // Arcane Potency + ApplySpellFix({ 57529, 57531 }, [](SpellInfo* spellInfo) + { + spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(); + spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER; + spellInfo->Effects[EFFECT_0].MiscValue = SPELLMOD_CRITICAL_CHANCE; + }); + ApplySpellFix({ 44978, // Wild Magic 45001, // Wild Magic |