Quantcast WoWInterface - View Single Post - Combo Points (and related class powers)
View Single Post
10-02-12, 11:55 PM   #25
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,616
Originally Posted by Paopao001 View Post
Then should I divided it by PRIEST_BAR_NUM_ORBS for shadow priest, by 4 for monk, by 3 for warlock, by HOLY_POWER_FULL for paladin? I think that's different from the intent of combine them together in some way.
They're only combined into one element so Haste isn't copy/pasting the same code 3+ times and just changing the name. You don't have to treat them all exactly the same, all the time. ShadowOrbs isn't going to get upset if you pick HolyPower first for the team.

Simply updating the width in your PostUpdate should work, though you may need to set some kind of flag on the element, and update the width if it's set even if oUF didn't think the max changed, to catch that initial update:
self.ClassIcons.PostUpdate = ClassIconsPostUpdate
self.ClassIcons.forceUpdate = true
Then, in your ClassIconsPostUpdate function:
if maxchange or element.forceUpdate then
     element.forceUpdate = nil
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote