Energy Capped

Energy Capped will show you a short text message every time you cap energy in combat and will present you a short summary of how many times you capped and how much energy you wasted during that time.
It will also display your average and maximumg energy regeneration values for the last fight.

Note that the amount of regenerated energy is likely not 100% perfect, but I did my best to do this as accurately as possible. Blame Blizzard for not providing any event for that.
It doesl not detect any interruptions in the fight, so be prepared for some huge numbers on fights like Alysrazor.

The addon uses LibBossIDs to make sure it only activates when fighting boss type mobs; additionally it waits until you first damaged the boss before it starts with its capped calculations (max and avg energy regeneration value calculations start as soon as combat starts though).

If you add a new chat window named "EnergyCapped" the addon will print all its messages into that window in addition to your default frame. You can disable the output to the default frame in the lua file, by changing "doPrint" to false.

You can test the addon by beating the Raider's Training Dummy located in every major city (the boss level dummy).

Originally posted by sp00n
It's using SPELL_ENERGIZE and SPELL_PERIODIC_ENERGIZE to check any energy procs. No idea if that's applicable for hunter focus as well.

It also observes PLAYER_DAMAGE_DONE_MODS to trigger on energy rate changes (alongside UNIT_SPELL_HASTE). No idea why Blizzard chose PLAYER_DAMAGE_DONE_MODS to do that and no idea if it's the same for hunters.

As far as the game API is concerned, there's very little difference between mana, focus, energy, RP, etc. The only major differences (again, as far as the API is concerned) are the string/ID for the name, and the max value. It treats all mana, energy, focus, etc gains as power gains, this is reflected a number of times in the API like the ENERGIZE events and GetPowerRegen() method you use. The game leaves it up to the UI to determine how to format and show what a unit's power is at, but the game couldn't care less whether you just gained mana or if you just gained focus, so they pipe everything through the same methods.

I've tried this a little on my Hunter and something feels off, but I haven't bothered to try and track it down. It looks like it has the right general approximation (maybe a little high), just the focus breakdown doesn't look quite right. It might be where the focus is distributed if it caps on a proc or SS/CS hit such that capping from any portion of it causes the addon to think the entire proc was wasted. I haven't really looked into it since I don't play my hunter enough. It could also be something I broke by accident too.

I was a little surprised that PLAYER_DAMAGE_DONE_MODS is the trigger for changes in power generation though. It's a rather odd event name to contain something like that.

Originally posted by Tabinou It's not working, I guess he's checking with the "ENERGY" ressource, and not the "FOCUS" one.

Basically, it's the same way, there is a regen rate depending on haste rating.
But the difference is that there are two shots, Cobra and Steady that gives focus back too, plus talents (termination, rapid recuperation) and a glyph (dazzled prey)
I don't know how it is handled in the addon (calculations, or through the combat log ?) and if those informations are useful.

It's using SPELL_ENERGIZE and SPELL_PERIODIC_ENERGIZE to check any energy procs. No idea if that's applicable for hunter focus as well.

It also observes PLAYER_DAMAGE_DONE_MODS to trigger on energy rate changes (alongside UNIT_SPELL_HASTE). No idea why Blizzard chose PLAYER_DAMAGE_DONE_MODS to do that and no idea if it's the same for hunters.

// Edit
The changes Shmii proposed should (at least syntactically) be correct, as far as I can tell from eyeballing them.

It's not working, I guess he's checking with the "ENERGY" ressource, and not the "FOCUS" one.

Basically, it's the same way, there is a regen rate depending on haste rating.
But the difference is that there are two shots, Cobra and Steady that gives focus back too, plus talents (termination, rapid recuperation) and a glyph (dazzled prey)
I don't know how it is handled in the addon (calculations, or through the combat log ?) and if those informations are useful.

@sp00n, would you mind using the change log a bit more? I've been modding this myself a little bit to personalize it and I'm wondering if I should merge the two releases (or any subsequent releases).

Originally posted by Lily.Petal My mac doesn't have a rar opener :P most of the addons on this site are .zip as well from what I've noticed <3 If something was .rar I would just go to my laptop DL to a flash then transfer it over~

I love using UnrarX when I'm using OS X. It's very clean, lightweight and supports split archives. It doesn't create rar archives though.

Originally posted by Tabinou I tried this on my hunter, but it doesn't seem to work.
Any way you can improve this ?

Thanks !

The code for getting focus rather than energy isn't too big of a difference, I haven't tried this on my Hunter so I'm not positive on what's working and what isn't. But it shouldn't be too hard, and if sp00n isn't up to it I'll give it a go.

EDIT: The fix to make this work for Hunter's is very simple, I'll edit post this after raid tonight with how to turn it on. You basically just have to remove Hunter's from the blacklist then add a power type check later on in the file.

EDIT2: The fix! For any occurance (there should only be one) of

Code:

if (class ~= "ROGUE" and class ~= "DRUID") then

replace with

Code:

if (class ~= "ROGUE" and class ~= "DRUID" and class ~= "HUNTER") then

For any occurance (there should also only be one) of

Code:

if (powerType == 3) then

replace with

Code:

if (powerType == 3 or powerType == 2) then

I've been trying it on my hunter and it appears to be working fine, but others more experienced with the class should probably double check.

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.