WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Alternate UnitPower (https://www.wowinterface.com/forums/showthread.php?t=53897)

gwyd 07-15-16 08:00 PM

Alternate UnitPower
 
How are we getting at alternate unit power as well as unit power (insanity + mana for shadow priest)?

I hadn't been paying a ton of attention and just realized that I needed to handle this.

lightspark 07-16-16 03:15 AM

Quote:

Originally Posted by gwyd (Post 316451)
How are we getting at alternate unit power as well as unit power (insanity + mana for shadow priest)?

I hadn't been paying a ton of attention and just realized that I needed to handle this.

In oUF it's called druidmana, name may be a bit misleading now, but previously only dudus had this feature.

BTW, if anyone needs latest version of oUF for Legion, you may use mine, I merged many p3lim's, Sticklord's and my PRs into it. I keep it up to date, cuz I use it too :D

gwyd 07-16-16 05:20 AM

Thanks. I've done the same thing merging the PRs.

Folji 07-16-16 03:30 PM

Quote:

Originally Posted by lightspark (Post 316458)
BTW, if anyone needs latest version of oUF for Legion, you may use mine, I merged many p3lim's, Sticklord's and my PRs into it. I keep it up to date, cuz I use it too :D

Ohh, cheers luv! I've been fretting a bit myself over what to do with oUF in terms of having my own UI ready for Legion, but this solves those worries rather nicely!

lightspark 07-16-16 03:47 PM

Quote:

Originally Posted by Folji (Post 316486)
Ohh, cheers luv! I've been fretting a bit myself over what to do with oUF in terms of having my own UI ready for Legion, but this solves those worries rather nicely!

Haha, you're welcome :D

gwyd 07-17-16 05:13 PM

Does it make sense that the following always prints the additional power bar name for the spec being swapped from (not the one being swapped to) or am I doing something wrong?

Lua Code:
  1. self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED", function(self)
  2.   print(ADDITIONAL_POWER_BAR_NAME)
  3. end)

lightspark 07-17-16 10:31 PM

Quote:

Originally Posted by gwyd (Post 316508)
Does it make sense that the following always prints the additional power bar name for the spec being swapped from (not the one being swapped to) or am I doing something wrong?

Lua Code:
  1. self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED", function(self)
  2.   print(ADDITIONAL_POWER_BAR_NAME)
  3. end)

Wrong. There's only one name in ADDITIONAL_POWER_BAR_NAME and it's "MANA", cuz it's a constant. If you're interested in such things, you should always check related Blizz code first.

badness 07-18-16 10:29 PM

So if i use this latest version of oUF for Legion I don't have to change anything in my layout? Because I use oUF_Freeb

lightspark 07-19-16 04:56 AM

Quote:

Originally Posted by badness (Post 316531)
So if i use this latest version of oUF for Legion I don't have to change anything in my layout? Because I use oUF_Freeb

You may have to, we tried to keep everything as backward compatible as possible, but some things had to be changed. TBH, I'm not really sure right now, cuz too many changes were made.

p3lim 07-19-16 05:56 AM

Quote:

Originally Posted by lightspark (Post 316539)
You may have to, we tried to keep everything as backward compatible as possible, but some things had to be changed. TBH, I'm not really sure right now, cuz too many changes were made.

Only a few callbacks/hooks were changed, there's a lot of additions though, mostly classicons class/spec support.

The most affected callback(s) is/are probably the one(s) for the runes element.

Edit: Oh, and the eclipse element was removed straight up.

gwyd 07-19-16 06:06 AM

Quote:

Originally Posted by lightspark (Post 316515)
Wrong. There's only one name in ADDITIONAL_POWER_BAR_NAME and it's "MANA", cuz it's a constant. If you're interested in such things, you should always check related Blizz code first.

You're right. Sorry. Confused myself. I was actually looking at UnitClass("player") which always returns the power type of the previous spec. It's not super hard to work around, just odd. Thanks for pointing me to the bliz code. That's pretty useful to have.

badness 07-21-16 08:24 PM

Combo points for rogue doesn't update/show, only when I switch target it would show then it wouldn't update unless I switch to another target. Anything I can do to fix this?

neverg 08-01-16 05:54 PM

Quote:

Originally Posted by badness (Post 316745)
Combo points for rogue doesn't update/show, only when I switch target it would show then it wouldn't update unless I switch to another target. Anything I can do to fix this?

Use the ClassIcons implementation. I bet you are using the old CPoints ?

Regarding DruidPower, have any of you use it recently on your Frames?
I have mine working fine except for the fact that it doesn't show for Druids. Which is a bit ironic. :D

Another thing, by default the element should disappear if full mana, correct? At least I think it is how it used to work. Not seeing this too.

EDIT - Been looking at druidmana.lua and it seems there is no inbuilt functionality to hide when full mana. And about it not displaying for Druid it only works for pre-Legion. I don't play much druid nowadays or nothing at all, but is is not necessary anymore for Druid players? I guess they don't use much mana then.

Just for reference if someone wants to do the same (hide on full mana). It is very simple, just call the PostUpdate hook.

Lua Code:
  1. -- Post Update
  2. DruidMana.PostUpdate = druidManaPostUpdate

Then call something like:

Lua Code:
  1. -- Druid Mana post update callback
  2. local druidManaPostUpdate = function(self, unit, cur, max)
  3.   -- Hide DruidMana if full
  4.   if(cur == max) then
  5.     self:Hide()
  6.   else
  7.     self:Show()
  8.   end
  9. end

Azgaurd 08-02-16 10:56 PM

It is not really needed for druids anymore since it does not cost mana to shape shift. Even the proc to cast healing touch does not cost mana.

p3lim 08-03-16 04:38 AM

Quote:

Originally Posted by neverg (Post 317299)
Use the ClassIcons implementation. I bet you are using the old CPoints ?

Regarding DruidPower, have any of you use it recently on your Frames?
I have mine working fine except for the fact that it doesn't show for Druids. Which is a bit ironic. :D

Another thing, by default the element should disappear if full mana, correct? At least I think it is how it used to work. Not seeing this too.

EDIT - Been looking at druidmana.lua and it seems there is no inbuilt functionality to hide when full mana. And about it not displaying for Druid it only works for pre-Legion. I don't play much druid nowadays or nothing at all, but is is not necessary anymore for Druid players? I guess they don't use much mana then.

Just for reference if someone wants to do the same (hide on full mana). It is very simple, just call the PostUpdate hook.

Lua Code:
  1. -- Post Update
  2. DruidMana.PostUpdate = druidManaPostUpdate

Then call something like:

Lua Code:
  1. -- Druid Mana post update callback
  2. local druidManaPostUpdate = function(self, unit, cur, max)
  3.   -- Hide DruidMana if full
  4.   if(cur == max) then
  5.     self:Hide()
  6.   else
  7.     self:Show()
  8.   end
  9. end

https://github.com/haste/oUF/pull/268

The element is shown the same as the blizzard one, it'll show full stop if mana is not your primary resource.

https://github.com/tekkub/wow-ui-sou...ar.lua#L69-L79

Quote:

Originally Posted by Azgaurd (Post 317367)
It is not really needed for druids anymore since it does not cost mana to shape shift. Even the proc to cast healing touch does not cost mana.

Casting HT a few times will drain all your mana though.

neverg 08-03-16 06:09 PM

Forgot to test on a Moonkin Druid!
Again Druid and DK are probably the classes I know less about now.

Thanks for that.

p3lim 08-03-16 07:17 PM

I added overrides to the element so that layouts can add more if they wanted to, like for cat and bear forms (energy and rage) as well.


All times are GMT -6. The time now is 04:09 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI