HEX_CLASS_COLORS removed?
Idk if it was JUST this last patch (15851) but HEX_CLASS_COLORS is now returning nils and instead is replaced by RAID_CLASS_COLORS[class].colorStr which now contains the hex + 'ff' in the front.
Was this just a recent change? Or has this been like this since MoP beta was available? Lua Code:
Edit: I am a baboon and I completely forgot I made that a global table for my own addon >.> just forgot to include monk. |
The colorStr keys have been part of RAID_CLASS_COLORS at least since they enabled addons in the MoP beta, in case anyone was wondering.
|
Quote:
Lua Code:
edit: local str = gsub(str,"(ff)","",1) seems to do the trick. |
That works, although I'm not sure why you would want to use an indexed table based on Blizzard's arbitrary and unintuitive CLASS_SORT_ORDER values, instead of a hash table with class/color pairs.
On a marginally related note, the MoP betas for !ClassColors support the colorStr key, so if your addon supports that you can read the values from there... and if your addon doesn't support it, it should. :p |
I don't think you need to use CLASS_SORT_ORDER, the order isn't even based on the real class ID's or anything, hehe. I'd just use something like:
Code:
HEX_CLASS_COLORS = {} |
Quote:
As for RAID_CLASS_COLORS, it looks like they adopted their (smart) current idea of "ITEM_QUALITY_COLORS[n].hex", but called the field "colorStr" instead of "hex". But colorStr includes the leading "ff" value, where "hex" includes the entire "|cff" escape-sequence-plus-ff value. (Curious: Is "colorStr" ever used in Blizzard's code without unconditionally prefixing the |c escape? Brief investigation says not. Maybe they plan to do other things with it.) |
Quote:
|
Isn't the leading ff supposed to be alpha channel? If anything, hehe. :)
|
It is, I guess.
|
It is, but it's not specific to the individual color, and it is specific to the |c escape sequence, so it shouldn't really be included in the table values.
|
The leading FF or 00 are non-functional. I guess they added it to go from 24bit to 32bit (24bit RGB color with 8bit alpha channel) but currently it has no effect. Where do you need hex colors? Strings only right. For those you need all the 8 characters.
Maybe they plan on adding text alpha channels? If that's true everyone with 00 leading a color string will get invisibile text strings. ;) *Mark for myself*...check the text strings and swap leading 00 with FF. |
I feel like I've changed those before myself... iirc, it changed the saturation, not the alpha. But I could be misremembering...
|
All times are GMT -6. The time now is 12:52 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI