Thread Tools Display Modes
12-13-23, 07:20 PM   #1
Kaleesh
A Deviate Faerie Dragon
 
Kaleesh's Avatar
Join Date: May 2010
Posts: 12
rUF error in 10.2-- help updating?

Hey guys. I'm having a minor(?) issue with a rUF, which seems abandoned. After 10.2 it can't display Lunar Power and has a fit every time I change druid forms. Could be related to the power bar updates, idk. I'm trying to learn a little about how to update these things myself but I'm not sure where to start. I've looked at the API changes and suspect C_Console.GetColorFromType is the culprit, but am not sure how to follow that up in the actual addon. Probably barking up the wrong tree. Could anyone look at this and give me a hand on the process?


Errors:
https://pastebin.com/eEuGsSHw
https://pastebin.com/Ur4NVV3k
https://pastebin.com/pg3BffiS
  Reply With Quote
12-13-23, 08:17 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
Blizzard added a spark entry for the PowerBarColor.Stagger entry that doesn't have r, g, b entries.

You could try changing line 145 of RuF\Libs\oUF\colors.lua from:
Lua Code:
  1. colors.power[power][index] = oUF:CreateColor(color_.r, color_.g, color_.b)
too:
Lua Code:
  1. colors.power[power][index] = oUF:CreateColor(color_.r or 1, color_.g or 1, color_.b or 1)
Hopefully it doesn't do anything funny elsewhere.

They also changed the color keys for stagger from numbers to strings ("green", "yellow", "red", [and the new "spark"]) so that may also be problematic but the addon is a bit on the large side to just wander through on the off-chance.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
12-13-23, 11:18 PM   #3
Kaleesh
A Deviate Faerie Dragon
 
Kaleesh's Avatar
Join Date: May 2010
Posts: 12
Oh wonderful, that worked perfectly, thank you!

Is there anywhere I could have gone to find out about this change for myself?
  Reply With Quote
12-13-23, 11:54 PM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
I just followed the stack trace in the colors.lua error back to line 145 (saying that something had been set to nil that should have (and in previous version of the game did have) a value.

The beginning of the loop that contains line 145
Lua Code:
  1. for power, color in next, PowerBarColor do
which is cycling through the PowerBarColor table which is a Blizzard table so I compared the current version with one from a 10.1 patch.

The current STAGGER table entry is
Lua Code:
  1. PowerBarColor["STAGGER"] = {
  2.     green =     { r = 0.52, g = 1.0, b = 0.52, atlas = "Unit_Monk_Stagger_Fill_Green" },
  3.     yellow =    { r = 1.0, g = 0.98, b = 0.72, atlas = "Unit_Monk_Stagger_Fill_Yellow" },
  4.     red =       { r = 1.0, g = 0.42, b = 0.42, atlas = "Unit_Monk_Stagger_Fill_Red" },
  5.     spark =     { atlas = "Unit_Monk_Stagger_EndCap", barHeight = 10, xOffset = 1, showAtMax = true }
  6. };
The one from 10.1 is
Lua Code:
  1. PowerBarColor["STAGGER"] = {
  2.     {r = 0.52, g = 1.0, b = 0.52},
  3.     {r = 1.0, g = 0.98, b = 0.72},
  4.     {r = 1.0, g = 0.42, b = 0.42},
  5. };
The original line 145 was making a colour mixin from the r, g, b values which don't exist in the table of the new "spark" key.

The fix just sets a default colour of white if the r, g, b entries don't exist...simples
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 12-14-23 at 09:06 AM.
  Reply With Quote
12-14-23, 04:59 AM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
Originally Posted by Kaleesh View Post
Oh wonderful, that worked perfectly, thank you!

Is there anywhere I could have gone to find out about this change for myself?
And a link to blizzard code to look at this stuff yourself ( without downloading it yourself from within the game ) is as follows: https://github.com/Gethe/wow-ui-source
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » rUF error in 10.2-- help updating?


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