From 7c43718f1ffe480e682719c3c6cc5ac393215e8c Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 9 Feb 2021 10:37:03 -0500 Subject: [PATCH] Core/Auras: Rename two more aura types Port From (https://github.com/TrinityCore/TrinityCore/commit/94397ac56cf2db87c14ed39917f6de54e6ce48fb) --- .../Constants/Spells/SpellAuraConst.cs | 4 ++-- Source/Game/Spells/Auras/AuraEffect.cs | 22 +++---------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellAuraConst.cs b/Source/Framework/Constants/Spells/SpellAuraConst.cs index 6d10211ee..614804de0 100644 --- a/Source/Framework/Constants/Spells/SpellAuraConst.cs +++ b/Source/Framework/Constants/Spells/SpellAuraConst.cs @@ -164,7 +164,7 @@ namespace Framework.Constants ModRangedHaste = 140, Unk141 = 141, // Old ModRangedAmmoHaste, Unused Now ModBaseResistancePct = 142, - ModRecoveryRate = 143, // NYI + ModRecoveryRateBySpellLabel = 143, // NYI SafeFall = 144, ModPetTalentPoints = 145, AllowTamePetType = 146, @@ -307,7 +307,7 @@ namespace Framework.Constants ModHealingReceived = 283, // Possibly Only For Some Spell Family Class Spells Linked = 284, Linked2 = 285, - AbilityPeriodicCrit = 286, + ModRecoveryRate = 286, DeflectSpells = 287, IgnoreHitDirection = 288, PreventDurabilityLoss = 289, diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 95ec66220..23b6c7ed7 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -540,13 +540,6 @@ namespace Game.Spells GetBase().CallScriptEffectUpdatePeriodicHandlers(this); } - bool CanPeriodicTickCrit(Unit caster) - { - Cypher.Assert(caster); - - return caster.HasAuraTypeWithAffectMask(AuraType.AbilityPeriodicCrit, m_spellInfo); - } - public bool IsAffectingSpell(SpellInfo spell) { if (spell == null) @@ -5461,10 +5454,7 @@ namespace Game.Spells } } - bool crit = false; - if (CanPeriodicTickCrit(caster)) - crit = RandomHelper.randChance(isAreaAura ? caster.GetUnitSpellCriticalChance(target, m_spellInfo, m_spellInfo.GetSchoolMask()) : m_critChance); - + bool crit = RandomHelper.randChance(isAreaAura ? caster.GetUnitSpellCriticalChance(target, m_spellInfo, m_spellInfo.GetSchoolMask()) : m_critChance); if (crit) damage = caster.SpellCriticalDamageBonus(m_spellInfo, damage, target); @@ -5551,10 +5541,7 @@ namespace Game.Spells } } - bool crit = false; - if (CanPeriodicTickCrit(caster)) - crit = RandomHelper.randChance(isAreaAura ? caster.GetUnitSpellCriticalChance(target, m_spellInfo, m_spellInfo.GetSchoolMask()) : m_critChance); - + bool crit = RandomHelper.randChance(isAreaAura ? caster.GetUnitSpellCriticalChance(target, m_spellInfo, m_spellInfo.GetSchoolMask()) : m_critChance); if (crit) damage = caster.SpellCriticalDamageBonus(m_spellInfo, damage, target); @@ -5694,10 +5681,7 @@ namespace Game.Spells damage = (int)target.SpellHealingBonusTaken(caster, GetSpellInfo(), (uint)damage, DamageEffectType.DOT, GetSpellEffectInfo(), GetBase().GetStackAmount()); } - bool crit = false; - if (CanPeriodicTickCrit(caster)) - crit = RandomHelper.randChance(isAreaAura ? caster.GetUnitSpellCriticalChance(target, m_spellInfo, m_spellInfo.GetSchoolMask()) : m_critChance); - + bool crit = RandomHelper.randChance(isAreaAura ? caster.GetUnitSpellCriticalChance(target, m_spellInfo, m_spellInfo.GetSchoolMask()) : m_critChance); if (crit) damage = caster.SpellCriticalHealingBonus(m_spellInfo, damage, target);