Scripts/Warlock: Implemented Burning Rush
Port From (https://github.com/TrinityCore/TrinityCore/commit/9ad227f0756aa91f9b772ecf13b40c1f38863e68)
This commit is contained in:
@@ -4382,6 +4382,12 @@ namespace Game.Entities
|
|||||||
spellInfo.AttributesEx &= ~SpellAttr1.IsChannelled;
|
spellInfo.AttributesEx &= ~SpellAttr1.IsChannelled;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Burning Rush
|
||||||
|
ApplySpellFix(new[] {111400 }, spellInfo =>
|
||||||
|
{
|
||||||
|
spellInfo.AttributesEx4 |= SpellAttr4.AuraIsBuff;
|
||||||
|
});
|
||||||
|
|
||||||
foreach (var spellInfo in mSpellInfoMap.Values)
|
foreach (var spellInfo in mSpellInfoMap.Values)
|
||||||
{
|
{
|
||||||
// Fix range for trajectory triggered spell
|
// Fix range for trajectory triggered spell
|
||||||
|
|||||||
@@ -76,6 +76,50 @@ namespace Scripts.Spells.Warlock
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Script] // 111400 - Burning Rush
|
||||||
|
class spell_warl_burning_rush : SpellScript
|
||||||
|
{
|
||||||
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
|
{
|
||||||
|
return ValidateSpellEffect((spellInfo.Id, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
SpellCastResult CheckApplyAura()
|
||||||
|
{
|
||||||
|
Unit caster = GetCaster();
|
||||||
|
if (caster.GetHealthPct() <= GetEffectInfo(1).CalcValue(caster))
|
||||||
|
{
|
||||||
|
SetCustomCastResultMessage(SpellCustomErrors.YouDontHaveEnoughHealth);
|
||||||
|
return SpellCastResult.CustomError;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SpellCastResult.SpellCastOk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnCheckCast.Add(new CheckCastHandler(CheckApplyAura));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Script] // 111400 - Burning Rush
|
||||||
|
class spell_warl_burning_rush_aura : AuraScript
|
||||||
|
{
|
||||||
|
void PeriodicTick(AuraEffect aurEff)
|
||||||
|
{
|
||||||
|
if (GetTarget().GetHealthPct() <= aurEff.GetAmount())
|
||||||
|
{
|
||||||
|
PreventDefaultAction();
|
||||||
|
Remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectPeriodic.Add(new EffectPeriodicHandler(PeriodicTick, 1, AuraType.PeriodicDamagePercent));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script] // 116858 - Chaos Bolt
|
[Script] // 116858 - Chaos Bolt
|
||||||
class spell_warl_chaos_bolt : SpellScript
|
class spell_warl_chaos_bolt : SpellScript
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user