Scripts/Spells: Implemented Priest talent Pain Transformation
Port From (https://github.com/TrinityCore/TrinityCore/commit/89438607ae6595396cfdb6c93429805da132c7c6)
This commit is contained in:
@@ -108,6 +108,8 @@ namespace Scripts.Spells.Priest
|
||||
public const uint MindgamesVenthyr = 323673;
|
||||
public const uint MindBombStun = 226943;
|
||||
public const uint OracularHeal = 26170;
|
||||
public const uint PainTransformation = 372991;
|
||||
public const uint PainTransformationHeal = 372994;
|
||||
public const uint Penance = 47540;
|
||||
public const uint PenanceChannelDamage = 47758;
|
||||
public const uint PenanceChannelHealing = 47757;
|
||||
@@ -1633,6 +1635,35 @@ namespace Scripts.Spells.Priest
|
||||
}
|
||||
}
|
||||
|
||||
// 372991 - Pain Transformation
|
||||
[Script] // Triggered by 33206 - Pain Suppression
|
||||
class spell_pri_pain_transformation : SpellScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.AtonementEffect, SpellIds.Trinity, SpellIds.PainTransformation, SpellIds.PainTransformationHeal);
|
||||
}
|
||||
|
||||
public override bool Load()
|
||||
{
|
||||
return GetCaster().HasAura(SpellIds.PainTransformation) && !GetCaster().HasAura(SpellIds.Trinity);
|
||||
}
|
||||
|
||||
void HandleHit(uint effIndex)
|
||||
{
|
||||
CastSpellExtraArgs args = new(GetSpell());
|
||||
args.SetTriggerFlags(TriggerCastFlags.IgnoreCastInProgress | TriggerCastFlags.DontReportCastError);
|
||||
|
||||
GetCaster().CastSpell(GetHitUnit(), SpellIds.PainTransformationHeal, args);
|
||||
GetCaster().CastSpell(GetHitUnit(), SpellIds.AtonementEffect, args);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHitTarget.Add(new(HandleHit, 0, SpellEffectName.ApplyAura));
|
||||
}
|
||||
}
|
||||
|
||||
[Script("spell_pri_penance", SpellIds.PenanceChannelDamage, SpellIds.PenanceChannelHealing)] // 47540 - Penance
|
||||
[Script("spell_pri_dark_reprimand", SpellIds.DarkReprimandChannelDamage, SpellIds.DarkReprimandChannelHealing)] // 400169 - Dark Reprimand
|
||||
class spell_pri_penance : SpellScript
|
||||
|
||||
Reference in New Issue
Block a user