From 88a604889032df23ea23ede8ccaace64f5b4c75d Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Fri, 20 Feb 2026 11:04:41 -0600 Subject: [PATCH] fix(Core/Spells): Use base mana cost for Illumination and Thrill of the Hunt (#24776) Co-authored-by: blinkysc --- .../updates/pending_db_world/rev_1771519000000000000.sql | 3 +++ src/server/scripts/Spells/spell_hunter.cpp | 7 +++++-- src/server/scripts/Spells/spell_paladin.cpp | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1771519000000000000.sql diff --git a/data/sql/updates/pending_db_world/rev_1771519000000000000.sql b/data/sql/updates/pending_db_world/rev_1771519000000000000.sql new file mode 100644 index 000000000..346e2df6f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1771519000000000000.sql @@ -0,0 +1,3 @@ +-- Fix spell_pal_illumination bound to wrong spell (-20234 = Improved Lay on Hands instead of -20210 = Illumination) +DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_pal_illumination'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (-20210, 'spell_pal_illumination'); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index c116241a8..52537630a 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1349,10 +1349,13 @@ class spell_hun_thrill_of_the_hunt : public AuraScript return; } if (AuraEffect const* pEff = victim->GetAuraEffect(SPELL_AURA_PERIODIC_DUMMY, SPELLFAMILY_HUNTER, 0x0, 0x80000000, 0x0, caster->GetGUID())) - mana = pEff->GetSpellInfo()->CalcPowerCost(caster, SpellSchoolMask(pEff->GetSpellInfo()->SchoolMask)) * 4 / 10 / 3; + { + SpellInfo const* expSpell = pEff->GetSpellInfo(); + mana = (expSpell->ManaCost + int32(CalculatePct(caster->GetCreateMana(), expSpell->ManaCostPercentage))) * 4 / 10 / 3; + } } else - mana = procSpell->CalcPowerCost(caster, SpellSchoolMask(procSpell->SchoolMask)) * 4 / 10; + mana = (procSpell->ManaCost + int32(CalculatePct(caster->GetCreateMana(), procSpell->ManaCostPercentage))) * 4 / 10; if (spell) caster->ToPlayer()->SetSpellModTakingSpell(spell, true); diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 8dd6e0d59..89a3a571a 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -2063,7 +2063,7 @@ private: bool _isVengeance = true; }; -// -20234 - Illumination +// -20210 - Illumination class spell_pal_illumination : public AuraScript { PrepareAuraScript(spell_pal_illumination); @@ -2095,7 +2095,8 @@ class spell_pal_illumination : public AuraScript if (originalSpell && aurEff->GetSpellInfo()) { Unit* target = eventInfo.GetActor(); // Paladin is the target of the energize - int32 bp = CalculatePct(static_cast(originalSpell->CalcPowerCost(target, originalSpell->GetSchoolMask())), aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue()); + int32 baseCost = originalSpell->ManaCost + int32(CalculatePct(target->GetCreateMana(), originalSpell->ManaCostPercentage)); + int32 bp = CalculatePct(baseCost, aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue()); target->CastCustomSpell(target, SPELL_PALADIN_ILLUMINATION_ENERGIZE, &bp, nullptr, nullptr, true, nullptr, aurEff); } }