[WOTLK Classic] Player frame drop-down menu bugs with custom class colors

Hi,

I’m using custom class colors because I don’t like the base ones. I’ve made a custom addon that is basically just this:

_G.RAID_CLASS_COLORS = {
[“HUNTER”] = CreateColor(0.67, 0.83, 0.45),
[“WARLOCK”] = CreateColor(0.53, 0.53, 0.93),
[“PRIEST”] = CreateColor(1.0, 1.0, 1.0),
[“PALADIN”] = CreateColor(1.0, 0.86, 0.3),
[“MAGE”] = CreateColor(0.25, 0.78, 0.92),
[“ROGUE”] = CreateColor(0.65, 0.65, 0.65),
[“DRUID”] = CreateColor(0.75, 0.56, 0.40),
[“SHAMAN”] = CreateColor(0.0, 0.44, 0.87),
[“WARRIOR”] = CreateColor(1.0, 0.4, 0.4),
[“DEATHKNIGHT”] = CreateColor(0.0, 0.60 , 0.60),
[“MONK”] = CreateColor(0.0, 1.00 , 0.59),
[“DEMONHUNTER”] = CreateColor(0.64, 0.19, 0.79),
};

(yeah I know WOTLK doesn’t have monk or DH but that’s not an issue)

Now, doing this does change the class colors in chat and my other addons (when using them with this)… but at a price.

I can’t open my portrait frame drop-down menu (the menu you have when you right-click your portrait, where you can set dungeon difficulty, etc) while this is active.

Here’s the lua error I get when right-clicking my portrait:

Message: Interface/FrameXML/UnitPopupShared.lua:134: attempt to concatenate local ‘colorCode’ (a nil value)
Time: Mon Jan 23 23:32:44 2023
Count: 1
Stack: Interface/FrameXML/UnitPopupShared.lua:134: attempt to concatenate local ‘colorCode’ (a nil value)
[string “@Interface/FrameXML/UnitPopupShared.lua”]:134: in function AddDropDownTitle' [string "@Interface/FrameXML/UnitPopupShared.lua"]:92: in function ShowMenu’
[string “@Interface/FrameXML/UnitPopupShared.lua”]:279: in function UnitPopup_ShowMenu' [string "@Interface/FrameXML/PlayerFrame.lua"]:477: in function initFunction’
[string “@Interface/FrameXML/UIDropDownMenu.lua”]:79: in function UIDropDownMenu_Initialize' [string "@Interface/FrameXML/UIDropDownMenu.lua"]:1098: in function ToggleDropDownMenu’
[string “@Interface/FrameXML/PlayerFrame.lua”]:52: in function handler' [string "@Interface/FrameXML/SecureTemplates.lua"]:625: in function SecureActionButton_OnClick’
[string “@Interface/FrameXML/SecureTemplates.lua”]:665: in function <Interface/FrameXML/SecureTemplates.lua:657>

Locals: self =

{
GetMostRecentDropdownMenu = defined @Interface/FrameXML/UnitPopupShared.lua:261
currentlyShowingMenu =
{
}
ShowMenu = defined @Interface/FrameXML/UnitPopupShared.lua:24
GetMenu = defined @Interface/FrameXML/UnitPopupShared.lua:265
AddDropDownButton = defined @Interface/FrameXML/UnitPopupShared.lua:140
CheckAddSubsection = defined @Interface/FrameXML/UnitPopupShared.lua:3
mostRecentDropdownMenu = PlayerFrameDropDown {
}
RegisterMenu = defined @Interface/FrameXML/UnitPopupShared.lua:269
AddDropDownTitle = defined @Interface/FrameXML/UnitPopupShared.lua:111
OnUpdate = defined @Interface/FrameXML/UnitPopupShared.lua:224
}
unit = “player”
name = “Darquemechat”
userData = nil
info =
{
notCheckable = true
text = “Darquemechat”
isTitle = true
}
titleText = “Darquemechat”
class = “PRIEST”
colorCode = nil
(*temporary) = “|c”
(*temporary) = nil
(*temporary) = 1
(*temporary) = “attempt to concatenate local ‘colorCode’ (a nil value)”

It looks like my custom colors are the problem but I can’t uderstand why.

Some more info:

  • My addon worked perfectly throughout TBC classic. I only have this issue since the WOTLK prepatch
  • I know for sure the error is due to this because I tested it without any other addon
  • I tested _G.RAID_CLASS_COLORS, RAID_CLASS_COLORS, and local RAID_CLASS_COLORS. All of them
  • The error I c/ped was generated on a Priest caracter, even though my custom color for this class is the same as the base one (complete 1,1,1 white)

Any idea if this is fixable, or do I have to stick with Blizzard’s default class colors?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.