Thread Tools Display Modes
06-11-17, 10:51 AM   #1
Akkorian
A Flamescale Wyrmkin
 
Akkorian's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 111
Some PostUpdate parameters don't match the upgrade info thread

I just came back to the game and am updating my personal layout, and have noticed a few discrepancies between the oUF 7.0 Upgrade thread and the current code.

The thread says the AlternativePower element's PostUpdate callback should now be sending (unit, cur, min, max) but it's sending (unit, cur, max) with no "min" (additionalpower.lua:125). Hopefully this was just overlooked in the code, and "min" should be added to match the Power element's PostUpdate callback.

The thread says the ClassPower element's PostUpdate callback should be sending (unit, cur, max, hasMaxChanged, powerType) but it's sending (cur, max, hasMaxChanged, powerType) with no "unit" (classpower.lua:158). But, since this element only works on the player unit, the "unit" parameter would always be "player", so this was probably just a mistake in the thread and it isn't supposed to be in the code?

I can make a PR on GitHub, but I didn't know whether it was the code or the info thread that should be updated.

Thanks for all your hard work keeping oUF going!
__________________
“Be humble, for you are made of earth. Be noble, for you are made of stars.”
  Reply With Quote
06-11-17, 11:19 AM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
ClassPower's unit is a typo in our guide. TY <3

There's no typo in add power though, you confused add power w/ alt power, there's two elements w/ kinda similar names: AdditionalPower and AlternativePower.
__________________

Last edited by lightspark : 06-11-17 at 11:31 AM.
  Reply With Quote
06-11-17, 03:10 PM   #3
Akkorian
A Flamescale Wyrmkin
 
Akkorian's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 111
Thanks!

You're right, I did mix up AdditionalPower and AlternativePower when reading the thread. So it's intended that there's not a "min" in the AdditionalPower callback, to match the Power and AlternativePower callbacks? Also, I'm curious, when would a unit's Power have a non-zero min value? Maybe some vehicles?
__________________
“Be humble, for you are made of earth. Be noble, for you are made of stars.”
  Reply With Quote
06-11-17, 11:06 PM   #4
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by Akkorian View Post
Thanks!

You're right, I did mix up AdditionalPower and AlternativePower when reading the thread. So it's intended that there's not a "min" in the AdditionalPower callback, to match the Power and AlternativePower callbacks? Also, I'm curious, when would a unit's Power have a non-zero min value? Maybe some vehicles?
Only when it's used to display altpower too, a bit redundant feature, if you ask me, but it's there.
__________________
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Some PostUpdate parameters don't match the upgrade info thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off