aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2025-07-18 21:55:48 +0200
committerGitHub <noreply@github.com>2025-07-18 21:55:48 +0200
commitd9ee8783a553c0b35dace39ee118fadf3155947d (patch)
tree343c18e33422a9d95f3ffd4cbc3cd48da7ee150c
parentf26f6c62202c77acf430225662dc7691212cdee3 (diff)
Scripts/Spells: Implement mage talent Scald (#31086)
-rw-r--r--sql/updates/world/master/2025_07_18_00_world.sql3
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp31
2 files changed, 34 insertions, 0 deletions
diff --git a/sql/updates/world/master/2025_07_18_00_world.sql b/sql/updates/world/master/2025_07_18_00_world.sql
new file mode 100644
index 00000000000..73197d11ca1
--- /dev/null
+++ b/sql/updates/world/master/2025_07_18_00_world.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_mage_scald';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(2948, 'spell_mage_scald');
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index f1f11eee6b0..7185843174d 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -91,6 +91,7 @@ enum MageSpells
SPELL_MAGE_RING_OF_FROST_DUMMY = 91264,
SPELL_MAGE_RING_OF_FROST_FREEZE = 82691,
SPELL_MAGE_RING_OF_FROST_SUMMON = 113724,
+ SPELL_MAGE_SCALD = 450746,
SPELL_MAGE_SERPENT_FORM = 32817,
SPELL_MAGE_SHEEP_FORM = 32820,
SPELL_MAGE_SHIMMER = 212653,
@@ -1619,6 +1620,35 @@ class spell_mage_ring_of_frost_freeze_AuraScript : public AuraScript
}
};
+// 450746 - Scald (attached to 2948 - Scorch)
+class spell_mage_scald : public SpellScript
+{
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ SPELL_MAGE_SCALD })
+ && ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->HasAura(SPELL_MAGE_SCALD);
+ }
+
+ void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit const* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
+ {
+ if (!victim->HealthBelowPct(GetEffectInfo(EFFECT_1).CalcValue(GetCaster())))
+ return;
+
+ if (AuraEffect const* aurEff = GetCaster()->GetAuraEffect(SPELL_MAGE_SCALD, EFFECT_0))
+ AddPct(pctMod, aurEff->GetAmount());
+ }
+
+ void Register() override
+ {
+ CalcDamage += SpellCalcDamageFn(spell_mage_scald::CalculateDamage);
+ }
+};
+
// 451875 - Spontaneous Combustion (attached to 190319 - Combustion)
class spell_mage_spontaneous_combustion : public SpellScript
{
@@ -1803,6 +1833,7 @@ void AddSC_mage_spell_scripts()
RegisterSpellAndAuraScriptPair(spell_mage_ray_of_frost, spell_mage_ray_of_frost_aura);
RegisterSpellScript(spell_mage_ring_of_frost);
RegisterSpellAndAuraScriptPair(spell_mage_ring_of_frost_freeze, spell_mage_ring_of_frost_freeze_AuraScript);
+ RegisterSpellScript(spell_mage_scald);
RegisterSpellScript(spell_mage_spontaneous_combustion);
RegisterSpellScript(spell_mage_supernova);
RegisterSpellScript(spell_mage_tempest_barrier);