fix(Core/Scripts): Fix Judgement and Judgements of the Just seal interactions (#24953)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-03-01 11:46:32 -06:00
committed by GitHub
parent e1ebb7099d
commit bd99687040
+73 -23
View File
@@ -96,12 +96,15 @@ enum PaladinSpells
SPELL_PALADIN_HOLY_VENGEANCE = 31803, SPELL_PALADIN_HOLY_VENGEANCE = 31803,
SPELL_PALADIN_BLOOD_CORRUPTION = 53742, SPELL_PALADIN_BLOOD_CORRUPTION = 53742,
SPELL_PALADIN_SEAL_OF_VENGEANCE_EFFECT = 42463, SPELL_PALADIN_SEAL_OF_VENGEANCE_EFFECT = 42463,
SPELL_PALADIN_SEAL_OF_CORRUPTION_EFFECT = 53739 SPELL_PALADIN_SEAL_OF_CORRUPTION_EFFECT = 53739,
SPELL_PALADIN_SEAL_OF_COMMAND = 20375
}; };
enum PaladinSpellIcons enum PaladinSpellIcons
{ {
PALADIN_ICON_ID_RETRIBUTION_AURA = 555, PALADIN_ICON_ID_RETRIBUTION_AURA = 555,
PALADIN_ICON_JUDGEMENTS_OF_THE_JUST = 3015,
PALADIN_ICON_JUDGEMENTS_OF_THE_WISE = 3017, PALADIN_ICON_JUDGEMENTS_OF_THE_WISE = 3017,
PALADIN_ICON_HAMMER_OF_THE_RIGHTEOUS = 3023, PALADIN_ICON_HAMMER_OF_THE_RIGHTEOUS = 3023,
PALADIN_ICON_RIGHTEOUS_VENGEANCE = 3025, PALADIN_ICON_RIGHTEOUS_VENGEANCE = 3025,
@@ -148,6 +151,20 @@ enum PaladinProcSpells
SPELL_PALADIN_T8_HOLY_4P_BONUS = 64895 SPELL_PALADIN_T8_HOLY_4P_BONUS = 64895
}; };
static bool IsJudgementDamageSpell(SpellInfo const* spellInfo)
{
return spellInfo &&
spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN &&
(spellInfo->SpellFamilyFlags[0] & 0x800000);
}
static bool HasJudgementsOfTheJust(Unit const* caster)
{
return caster && caster->GetAuraEffect(
SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_PALADIN,
PALADIN_ICON_JUDGEMENTS_OF_THE_JUST, 0) != nullptr;
}
class spell_pal_seal_of_command_aura : public AuraScript class spell_pal_seal_of_command_aura : public AuraScript
{ {
PrepareAuraScript(spell_pal_seal_of_command_aura); PrepareAuraScript(spell_pal_seal_of_command_aura);
@@ -959,27 +976,26 @@ public:
GetCaster()->CastSpell(GetCaster(), SPELL_IMPROVED_JUDGEMENT_ENERGIZE, true); GetCaster()->CastSpell(GetCaster(), SPELL_IMPROVED_JUDGEMENT_ENERGIZE, true);
} }
// Judgement of the Just // Judgements of the Just
if (GetCaster()->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_PALADIN, 3015, 0)) if (HasJudgementsOfTheJust(GetCaster()))
{ {
if (GetCaster()->CastSpell(GetHitUnit(), SPELL_JUDGEMENTS_OF_THE_JUST, true) && (spellId2 == SPELL_JUDGEMENT_OF_VENGEANCE_EFFECT || spellId2 == SPELL_JUDGEMENT_OF_CORRUPTION_EFFECT)) GetCaster()->CastSpell(GetHitUnit(), SPELL_JUDGEMENTS_OF_THE_JUST, true);
{
//hidden effect only cast when spellcast of judgements of the just is succesful
GetCaster()->CastSpell(GetHitUnit(), SealApplication(spellId2), true); //add hidden seal apply effect for vengeance and corruption
}
}
}
uint32 SealApplication(uint32 correspondingSpellId) // JotJ makes Judgements trigger Seal of Command's
{ // cleave effect
switch (correspondingSpellId) if (AuraEffect const* socEff =
{ GetCaster()->GetAuraEffect(
case SPELL_JUDGEMENT_OF_VENGEANCE_EFFECT: SPELL_PALADIN_SEAL_OF_COMMAND, EFFECT_0))
return SPELL_HOLY_VENGEANCE; {
case SPELL_JUDGEMENT_OF_CORRUPTION_EFFECT: if (GetHitUnit()->IsAlive())
return SPELL_BLOOD_CORRUPTION; {
default: GetCaster()->CastCustomSpell(
return 0; socEff->GetSpellInfo()->Effects[EFFECT_0]
.TriggerSpell,
SPELLVALUE_MAX_TARGETS, 3,
GetHitUnit(), true, nullptr, socEff);
}
}
} }
} }
@@ -1164,11 +1180,14 @@ class spell_pal_seal_of_righteousness : public AuraScript
DamageInfo* damageInfo = eventInfo.GetDamageInfo(); DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage()) if (!damageInfo || !damageInfo->GetDamage())
{
return false; return false;
}
return target->IsAlive() && !eventInfo.GetTriggerAuraSpell() && (damageInfo->GetDamage() || (eventInfo.GetHitMask() & PROC_EX_ABSORB)); if (IsJudgementDamageSpell(eventInfo.GetSpellInfo()))
return target->IsAlive();
return target->IsAlive() && !eventInfo.GetTriggerAuraSpell() &&
(damageInfo->GetDamage() ||
(eventInfo.GetHitMask() & PROC_EX_ABSORB));
} }
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
@@ -1187,6 +1206,17 @@ class spell_pal_seal_of_righteousness : public AuraScript
int32 bp = std::max<int32>(0, int32((ap * 0.022f + 0.044f * holy) * GetTarget()->GetAttackTime(BASE_ATTACK) / 1000)); int32 bp = std::max<int32>(0, int32((ap * 0.022f + 0.044f * holy) * GetTarget()->GetAttackTime(BASE_ATTACK) / 1000));
GetTarget()->CastCustomSpell(SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS, SPELLVALUE_BASE_POINT0, bp, eventInfo.GetProcTarget(), true, nullptr, aurEff); GetTarget()->CastCustomSpell(SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS, SPELLVALUE_BASE_POINT0, bp, eventInfo.GetProcTarget(), true, nullptr, aurEff);
// Judgements of the Just: Seal of Righteousness procs
// twice from Judgements
if (IsJudgementDamageSpell(eventInfo.GetSpellInfo()) &&
HasJudgementsOfTheJust(GetTarget()))
{
GetTarget()->CastCustomSpell(
SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS,
SPELLVALUE_BASE_POINT0, bp,
eventInfo.GetProcTarget(), true, nullptr, aurEff);
}
} }
void Register() override void Register() override
@@ -1884,6 +1914,25 @@ class spell_pal_seal_of_vengeance_aura : public AuraScript
return true; return true;
} }
bool CheckProc(ProcEventInfo& eventInfo)
{
SpellInfo const* procSpell = eventInfo.GetSpellInfo();
if (procSpell &&
procSpell->SpellFamilyName == SPELLFAMILY_PALADIN)
{
// Block re-proc from seal damage effects
if ((procSpell->SpellFamilyFlags[1] & 0x800) &&
!(procSpell->SpellFamilyFlags[0] & 0x800000))
return false;
// Judgements only trigger seal procs with JotJ
if (procSpell->SpellFamilyFlags[0] & 0x800000)
return HasJudgementsOfTheJust(eventInfo.GetActor());
}
return true;
}
void HandleApplyDoT(AuraEffect const* aurEff, ProcEventInfo& eventInfo) void HandleApplyDoT(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{ {
PreventDefaultAction(); PreventDefaultAction();
@@ -1925,6 +1974,7 @@ class spell_pal_seal_of_vengeance_aura : public AuraScript
void Register() override void Register() override
{ {
DoCheckProc += AuraCheckProcFn(spell_pal_seal_of_vengeance_aura::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_pal_seal_of_vengeance_aura::HandleApplyDoT, EFFECT_0, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_pal_seal_of_vengeance_aura::HandleApplyDoT, EFFECT_0, SPELL_AURA_DUMMY);
OnEffectProc += AuraEffectProcFn(spell_pal_seal_of_vengeance_aura::HandleSeal, EFFECT_0, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_pal_seal_of_vengeance_aura::HandleSeal, EFFECT_0, SPELL_AURA_DUMMY);
} }