Scripts/Spells: Fixed mage talent Firestarter
Port From (https://github.com/TrinityCore/TrinityCore/commit/d6c43b3d63b4ef601223b2a3efefc481c75c23bc)
This commit is contained in:
@@ -47,6 +47,7 @@ namespace Scripts.Spells.Mage
|
||||
public const uint DradonhawkForm = 32818;
|
||||
public const uint EverwarmSocks = 320913;
|
||||
public const uint FingersOfFrost = 44544;
|
||||
public const uint Firestarter = 205026;
|
||||
public const uint FrostNova = 122;
|
||||
public const uint GiraffeForm = 32816;
|
||||
public const uint IceBarrier = 11426;
|
||||
@@ -462,6 +463,51 @@ namespace Scripts.Spells.Mage
|
||||
}
|
||||
}
|
||||
|
||||
// 133 - Fireball
|
||||
[Script] // 11366 - Pyroblast
|
||||
class spell_mage_firestarter : SpellScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.Firestarter);
|
||||
}
|
||||
|
||||
void CalcCritChance(Unit victim, ref float critChance)
|
||||
{
|
||||
AuraEffect aurEff = GetCaster().GetAuraEffect(SpellIds.Firestarter, 0);
|
||||
if (aurEff != null)
|
||||
if (victim.GetHealthPct() >= aurEff.GetAmount())
|
||||
critChance = 100.0f;
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnCalcCritChance.Add(new OnCalcCritChanceHandler(CalcCritChance));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 321712 - Pyroblast
|
||||
class spell_mage_firestarter_dots : AuraScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.Firestarter);
|
||||
}
|
||||
|
||||
void CalcCritChance(AuraEffect aurEff, Unit victim, ref float critChance)
|
||||
{
|
||||
AuraEffect aurEff0 = GetCaster().GetAuraEffect(SpellIds.Firestarter, 0);
|
||||
if (aurEff0 != null)
|
||||
if (victim.GetHealthPct() >= aurEff0.GetAmount())
|
||||
critChance = 100.0f;
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
DoEffectCalcCritChance.Add(new EffectCalcCritChanceHandler(CalcCritChance, SpellConst.EffectAll, AuraType.PeriodicDamage));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 11426 - Ice Barrier
|
||||
class spell_mage_ice_barrier : AuraScript
|
||||
{
|
||||
@@ -751,7 +797,7 @@ namespace Scripts.Spells.Mage
|
||||
|
||||
Unit caster = GetCaster();
|
||||
if (caster)
|
||||
caster.CastSpell(GetTarget(), SpellIds.LivingBombExplosion, new CastSpellExtraArgs (TriggerCastFlags.FullMask).AddSpellMod(SpellValueMod.BasePoint0, aurEff.GetAmount()));
|
||||
caster.CastSpell(GetTarget(), SpellIds.LivingBombExplosion, new CastSpellExtraArgs(TriggerCastFlags.FullMask).AddSpellMod(SpellValueMod.BasePoint0, aurEff.GetAmount()));
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
|
||||
Reference in New Issue
Block a user