Jump to content

[patch] Fix Anger Management generating rage out of combat


Guest stfx

Recommended Posts

What bug does the patch fix? What features does the patch add?

Fixes Anger Management generating rage out of combat. It should only generate rage while being in combat.

Based on tooltip and http://www.wowwiki.com/Anger_Management ... "The difference between the two is that Berserker Rage can generate rage out of combat as well."

For which repository revision was the patch created?

[11369]

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

No.

Who has been writing this patch? Please include either forum user names or email addresses.

I only ported it to mangos. Original one is from lukaasm - http://code.google.com/p/oregoncore/source/detail?r=3a96765eb55d

6cd3106f52f5b2530dcdf8bd3a7d9f11ad6e17eb
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 6727fae..0d2fb26 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -7383,7 +7383,7 @@ void Aura::PeriodicTick()
            // Anger Management
            // amount = 1+ 16 = 17 = 3,4*5 = 10,2*5/3
            // so 17 is rounded amount for 5 sec tick grow ~ 1 range grow in 3 sec
-            if(pt == POWER_RAGE)
+            if (pt == POWER_RAGE && target->isInCombat())
                target->ModifyPower(pt, m_modifier.m_amount * 3 / 5);
            break;
        }

PS: While you are at it you might also fix the coding style in the lines above this change ... like spaces around if and brackets

Link to comment
Share on other sites

I think you interpret that comment incorrectly. With your change, rage decay out-of-combat is not affected anymore, which it definitely does according to wowhead comments.

You of course can't *generate* rage because it still decays faster than Anger Management generates it. But Berserker Rage *instantly* gives you an amount of rage, not periodically.

The only thing i'm unsure about is whether Aura::PeriodicTick() is the best place to implement it, its periodic time is hardcoded and SPELL_AURA_MOD_POWER_REGEN_PERCENT is handled in Player::Regenerate(), so why not SPELL_AURA_MOD_POWER_REGEN too...

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use