aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index d72bbff34b9..c4440aa44e4 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -40,6 +40,7 @@
enum PriestSpells
{
+ SPELL_PRIEST_ABYSSAL_REVERIE = 373054,
SPELL_PRIEST_ANGELIC_FEATHER_AREATRIGGER = 158624,
SPELL_PRIEST_ANGELIC_FEATHER_AURA = 121557,
SPELL_PRIEST_ANSWERED_PRAYERS = 394289,
@@ -393,6 +394,12 @@ public:
return _appliedAtonements;
}
+ struct TriggerArgs
+ {
+ SpellInfo const* TriggeredBy = nullptr;
+ SpellSchoolMask DamageSchoolMask = SPELL_SCHOOL_MASK_NONE;
+ };
+
void TriggerAtonementHealOnTargets(AuraEffect const* atonementEffect, ProcEventInfo const& eventInfo)
{
Unit* priest = GetUnitOwner();
@@ -402,6 +409,10 @@ public:
// Note: atonementEffect holds the correct amount since we passed the effect in the AuraScript that calls this method.
args.AddSpellMod(SPELLVALUE_BASE_POINT0, CalculatePct(damageInfo->GetDamage(), atonementEffect->GetAmount()));
+ args.SetCustomArg(TriggerArgs{
+ .TriggeredBy = eventInfo.GetSpellInfo(),
+ .DamageSchoolMask = eventInfo.GetDamageInfo()->GetSchoolMask() });
+
float distanceLimit = GetEffectInfo(EFFECT_1).CalcValue();
std::erase_if(_appliedAtonements, [priest, distanceLimit, &args](ObjectGuid const& targetGuid)
@@ -429,6 +440,30 @@ public:
}
};
+// 81751 - Atonement (Heal)
+class spell_pri_abyssal_reverie : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellEffect({ { SPELL_PRIEST_ABYSSAL_REVERIE, EFFECT_0 } });
+ }
+
+ void CalculateHealingBonus(Unit const* /*victim*/, int32 const& /*healing*/, int32 const& /*flatMod*/, float& pctMod) const
+ {
+ spell_pri_atonement::TriggerArgs const* args = std::any_cast<spell_pri_atonement::TriggerArgs>(&GetSpell()->m_customArg);
+ if (!args || !(args->DamageSchoolMask & SPELL_SCHOOL_MASK_SHADOW))
+ return;
+
+ if (AuraEffect* const abyssalReverieEffect = GetCaster()->GetAuraEffect(SPELL_PRIEST_ABYSSAL_REVERIE, EFFECT_0))
+ AddPct(pctMod, abyssalReverieEffect->GetAmount());
+ }
+
+ void Register() override
+ {
+ CalcHealing += SpellCalcHealingFn(spell_pri_abyssal_reverie::CalculateHealingBonus);
+ }
+};
+
// 195178 - Atonement (Passive)
class spell_pri_atonement_passive : public AuraScript
{
@@ -460,7 +495,7 @@ class spell_pri_atonement_passive : public AuraScript
}
};
-// 194384, 214206 - Atonement
+// 194384 - Atonement (Buff), 214206 - Atonement [Trinity] (Buff)
class spell_pri_atonement_triggered : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
@@ -2618,6 +2653,7 @@ void AddSC_priest_spell_scripts()
{
RegisterSpellScript(spell_pri_angelic_feather_trigger);
RegisterAreaTriggerAI(areatrigger_pri_angelic_feather);
+ RegisterSpellScript(spell_pri_abyssal_reverie);
RegisterSpellScript(spell_pri_answered_prayers);
RegisterSpellScript(spell_pri_aq_3p_bonus);
RegisterSpellScript(spell_pri_atonement);