diff --git a/Source/Framework/Constants/UnitConst.cs b/Source/Framework/Constants/UnitConst.cs index f215d5efd..81f2b197d 100644 --- a/Source/Framework/Constants/UnitConst.cs +++ b/Source/Framework/Constants/UnitConst.cs @@ -395,6 +395,7 @@ namespace Framework.Constants RadiusMod, MaxTargets, AuraStack, + CritChance, DurationPct } diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index d0041b1e2..7880caaaa 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -6872,7 +6872,9 @@ namespace Game.Spells } } - float critChance = m_caster.SpellCritChanceDone(this, null, m_spellSchoolMask, m_attackType); + float critChance = m_spellValue.CriticalChance; + if (critChance == 0.0f) + critChance = m_caster.SpellCritChanceDone(this, null, m_spellSchoolMask, m_attackType); targetInfo.crit = RandomHelper.randChance(unit.SpellCritChanceTaken(m_caster, this, null, m_spellSchoolMask, critChance, m_attackType)); } @@ -6965,6 +6967,9 @@ namespace Game.Spells case SpellValueMod.AuraStack: m_spellValue.AuraStackAmount = value; break; + case SpellValueMod.CritChance: + m_spellValue.CriticalChance = value / 100.0f; // @todo ugly /100 remove when basepoints are double + break; case SpellValueMod.DurationPct: m_spellValue.DurationMul = (float)value / 100.0f; break; @@ -7771,6 +7776,7 @@ namespace Game.Spells MaxAffectedTargets = proto.MaxAffectedTargets; RadiusMod = 1.0f; AuraStackAmount = 1; + CriticalChance = 0.0f; DurationMul = 1; } @@ -7780,6 +7786,7 @@ namespace Game.Spells public float RadiusMod; public int AuraStackAmount; public float DurationMul; + public float CriticalChance; } // Spell modifier (used for modify other spells) diff --git a/Source/Game/Spells/SpellManager.cs b/Source/Game/Spells/SpellManager.cs index 1d82632b3..4ede40443 100644 --- a/Source/Game/Spells/SpellManager.cs +++ b/Source/Game/Spells/SpellManager.cs @@ -2860,7 +2860,7 @@ namespace Game.Entities spellInfo._InitializeExplicitTargetMask(); } - // addition for binary spells, ommit spells triggering other spells + // addition for binary spells, omit spells triggering other spells foreach (var spellInfo in mSpellInfoMap.Values) { if (!spellInfo.HasAttribute(SpellCustomAttributes.BinarySpell))