mod-paragon: combined Arcane Torrent also refunds 15 rage

Extend spell_paragon_arcane_torrent to EnergizeBySpell POWER_RAGE 150 (15
displayed; rage uses the same 10x internal scaling as runic power, see the
`-20` rage decay step in Player::Regenerate). Paragon's combined Arcane
Torrent now refunds mana, rage, energy, and runic power -- whichever pool
the character is using at the moment. ModifyPower no-ops on pools with
MaxPower == 0, so it's safe even before the Paragon picks up rage abilities.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Docker Build
2026-05-09 15:51:37 -04:00
parent 16717acdd3
commit 3a2ae82593
+11 -6
View File
@@ -275,10 +275,10 @@ std::unordered_map<ObjectGuid, Paragon_PlayerScript::ParagonRuneSyncState> Parag
// energy, 50613 DK runic power). For Paragon Blood Elves we keep only 28730 // energy, 50613 DK runic power). For Paragon Blood Elves we keep only 28730
// (see migration 2026_05_10_03.sql) and turn it into a "combined" version: // (see migration 2026_05_10_03.sql) and turn it into a "combined" version:
// the stock spell already silences nearby enemies and energizes mana via its // the stock spell already silences nearby enemies and energizes mana via its
// own effects; this script adds energy and runic power energize on top when // own effects; this script adds energy, rage, and runic power energize on
// the caster is class 12, so a single button refunds whichever resource pool // top when the caster is class 12, so a single button refunds whichever
// the player is actually using. Non-Paragon casters are untouched and keep // resource pool the player is actually using. Non-Paragon casters are
// learning their stock racial variant. // untouched and keep learning their stock racial variant.
class spell_paragon_arcane_torrent : public SpellScript class spell_paragon_arcane_torrent : public SpellScript
{ {
PrepareSpellScript(spell_paragon_arcane_torrent); PrepareSpellScript(spell_paragon_arcane_torrent);
@@ -298,15 +298,20 @@ class spell_paragon_arcane_torrent : public SpellScript
// 50613 Arcane Torrent (Runic Power) -> 15 displayed RP (= 150 // 50613 Arcane Torrent (Runic Power) -> 15 displayed RP (= 150
// internal; AC stores RP scaled 10x, see Player::SetMaxPower // internal; AC stores RP scaled 10x, see Player::SetMaxPower
// POWER_RUNIC_POWER, 1000). // POWER_RUNIC_POWER, 1000).
// Rage uses the same 10x internal scaling as runic power (see
// Player.cpp:Regenerate where rage decay is `-20` for "2 rage by
// tick"), so 15 displayed rage = 150 internal.
// ModifyPower no-ops on pools the player has no max for, so this is // ModifyPower no-ops on pools the player has no max for, so this is
// safe even before the Paragon picks up energy/RP-using abilities. // safe even before the Paragon picks up energy/rage/RP abilities.
constexpr int32 kEnergyGain = 15; constexpr int32 kEnergyGain = 15;
constexpr int32 kRageGain = 150;
constexpr int32 kRunicPowerGain = 150; constexpr int32 kRunicPowerGain = 150;
SpellInfo const* spellInfo = GetSpellInfo(); SpellInfo const* spellInfo = GetSpellInfo();
uint32 const spellId = spellInfo ? spellInfo->Id : 28730u; uint32 const spellId = spellInfo ? spellInfo->Id : 28730u;
caster->EnergizeBySpell(player, spellId, kEnergyGain, POWER_ENERGY); caster->EnergizeBySpell(player, spellId, kEnergyGain, POWER_ENERGY);
caster->EnergizeBySpell(player, spellId, kRageGain, POWER_RAGE);
caster->EnergizeBySpell(player, spellId, kRunicPowerGain, POWER_RUNIC_POWER); caster->EnergizeBySpell(player, spellId, kRunicPowerGain, POWER_RUNIC_POWER);
} }