Scripts/Spells: Move shaman Lava Burst crit chance calculation to scripts and add Lava Burst Overload
Port From (https://github.com/TrinityCore/TrinityCore/commit/1696d738608fa8ed30321b5b4050d5516b5765f6)
This commit is contained in:
@@ -684,16 +684,6 @@ namespace Game.Entities
|
|||||||
if (caster.FindCurrentSpellBySpellId(5938) != null)
|
if (caster.FindCurrentSpellBySpellId(5938) != null)
|
||||||
crit_chance = 0.0f;
|
crit_chance = 0.0f;
|
||||||
break;
|
break;
|
||||||
case SpellFamilyNames.Shaman:
|
|
||||||
// Lava Burst
|
|
||||||
if (spellInfo.SpellFamilyFlags[1].HasAnyFlag(0x00001000u))
|
|
||||||
{
|
|
||||||
if (GetAuraEffect(AuraType.PeriodicDamage, SpellFamilyNames.Shaman, new FlagArray128(0x10000000, 0, 0), caster.GetGUID()) != null)
|
|
||||||
if (GetTotalAuraModifier(AuraType.ModAttackerSpellAndWeaponCritChance) > -100)
|
|
||||||
return 100.0f;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spell crit suppression
|
// Spell crit suppression
|
||||||
|
|||||||
@@ -935,6 +935,33 @@ namespace Scripts.Spells.Shaman
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 285452 - Lava Burst damage
|
||||||
|
[Script] // 285466 - Lava Burst Overload damage
|
||||||
|
class spell_sha_lava_crit_chance : SpellScript
|
||||||
|
{
|
||||||
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo(SpellIds.LavaBurstRank2, SpellIds.FlameShock);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CalcCritChance(Unit victim, ref float chance)
|
||||||
|
{
|
||||||
|
Unit caster = GetCaster();
|
||||||
|
|
||||||
|
if (caster == null || victim == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (caster.HasAura(SpellIds.LavaBurstRank2) && victim.HasAura(SpellIds.FlameShock, caster.GetGUID()))
|
||||||
|
if (victim.GetTotalAuraModifier(AuraType.ModAttackerSpellAndWeaponCritChance) > -100)
|
||||||
|
chance = 100.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnCalcCritChance.Add(new OnCalcCritChanceHandler(CalcCritChance));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script] // 77756 - Lava Surge
|
[Script] // 77756 - Lava Surge
|
||||||
class spell_sha_lava_surge : AuraScript
|
class spell_sha_lava_surge : AuraScript
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user