aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2025-01-26 12:15:14 +0100
committerOvahlord <dreadkiller@gmx.de>2025-01-26 12:15:14 +0100
commite9105be6d872a7625d10c031a2e55062bd6c2832 (patch)
tree5b12624abd371a760e71a9c44f3a532735238373
parenta777f6768e75abf13aa85c8413a50c85158bd14d (diff)
Scripts/Spells: fixed Seal of Truth
-rw-r--r--sql/updates/world/cata_classic/2025_01_26_02_world.sql3
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp44
2 files changed, 46 insertions, 1 deletions
diff --git a/sql/updates/world/cata_classic/2025_01_26_02_world.sql b/sql/updates/world/cata_classic/2025_01_26_02_world.sql
new file mode 100644
index 00000000000..18110f0057c
--- /dev/null
+++ b/sql/updates/world/cata_classic/2025_01_26_02_world.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_pal_seal_of_truth';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(31801, 'spell_pal_seal_of_truth');
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 8d26e7dd4f4..47c66d47573 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -32,8 +32,10 @@ namespace Scripts::Spells::Paladin
{
enum PaladinSpells
{
+ SPELL_PAL_CENSURE = 31803,
+ SPELL_PAL_JUDGEMENT_DAMAGE = 54158,
SPELL_PAL_SEAL_OF_RIGHTEOUSNESS_DAMAGE = 25742,
- SPELL_PAL_JUDGEMENT_DAMAGE = 54158
+ SPELL_PAL_SEAL_OF_TRUTH_DAMAGE = 42463
};
// 20154 - Seal of Righteousness
@@ -167,6 +169,45 @@ namespace Scripts::Spells::Paladin
private:
int32 _procBasePoints = 0;
};
+
+ // 31801 - Seal of Truth
+ class spell_pal_seal_of_truth: public AuraScript
+ {
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_PAL_CENSURE, SPELL_PAL_SEAL_OF_TRUTH_DAMAGE });
+ }
+
+ bool CheckMeleeProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
+ {
+ if (!eventInfo.GetActionTarget())
+ return false;
+
+ // Only single target spells are allowed to trigger the proc
+ if (eventInfo.GetSpellInfo() && (eventInfo.GetSpellInfo()->IsAffectingArea() || eventInfo.GetSpellInfo()->HasAttribute(SPELL_ATTR5_TREAT_AS_AREA_EFFECT)))
+ return false;
+
+ return true;
+ }
+
+ void HandleMeleeProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
+ {
+ Unit* caster = eventInfo.GetActor();
+
+ // When Censure has reached its max stack amount, trigger an additional spell which will deal extra weapon damage
+ if (AuraEffect const* censureEffect = eventInfo.GetActionTarget()->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PALADIN, flag128(0x20000000), caster->GetGUID()))
+ if (censureEffect->GetBase()->GetStackAmount() >= censureEffect->GetBase()->CalcMaxStackAmount())
+ caster->CastSpell(eventInfo.GetActionTarget(), SPELL_PAL_SEAL_OF_TRUTH_DAMAGE, aurEff);
+
+ caster->CastSpell(eventInfo.GetActionTarget(), SPELL_PAL_CENSURE, aurEff);
+ }
+
+ void Register() override
+ {
+ DoCheckEffectProc += AuraCheckEffectProcFn(spell_pal_seal_of_truth::CheckMeleeProc, EFFECT_0, SPELL_AURA_DUMMY);
+ AfterEffectProc += AuraEffectProcFn(spell_pal_seal_of_truth::HandleMeleeProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
}
void AddSC_paladin_spell_scripts()
@@ -176,4 +217,5 @@ void AddSC_paladin_spell_scripts()
RegisterSpellScript(spell_pal_judgement_of_righteousness);
RegisterSpellScript(spell_pal_seal_of_justice);
RegisterSpellScript(spell_pal_seal_of_righteousness);
+ RegisterSpellScript(spell_pal_seal_of_truth);
}