From 6c854c03f62ba87dc481c348fb3a931bb8042b77 Mon Sep 17 00:00:00 2001 From: EricksOliveira Date: Mon, 16 Nov 2026 13:33:41 -0300 Subject: [PATCH] fix(DuelReset): Fill druid mana in feral forms ResetAllPowers only fills the active power type, so a druid in Cat, Bear or Dire Bear Form started the duel without full mana. Fill the druid's mana after the reset; the value saved before the duel is still restored when it ends. Closes #30 --- src/DuelReset_scripts.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DuelReset_scripts.cpp b/src/DuelReset_scripts.cpp index 6c2fa4c..36da617 100644 --- a/src/DuelReset_scripts.cpp +++ b/src/DuelReset_scripts.cpp @@ -75,6 +75,10 @@ class DuelResetScript : public PlayerScript { sDuelReset->SaveManaBeforeDuel(player1); } player1->ResetAllPowers(); + // ResetAllPowers only fills the active power; druids in Cat/Bear + // Form keep their mana in the background + if (player1->getClass() == CLASS_DRUID) + player1->SetPower(POWER_MANA, player1->GetMaxPower(POWER_MANA)); sDuelReset->SaveHealthBeforeDuel(player2); if (player2->getPowerType() == POWER_MANA || player2->getClass() == CLASS_DRUID) @@ -82,6 +86,8 @@ class DuelResetScript : public PlayerScript { sDuelReset->SaveManaBeforeDuel(player2); } player2->ResetAllPowers(); + if (player2->getClass() == CLASS_DRUID) + player2->SetPower(POWER_MANA, player2->GetMaxPower(POWER_MANA)); } }