diff --git a/Leatrix_Plus.lua b/Leatrix_Plus.lua index 3dd534e..3d828ee 100644 --- a/Leatrix_Plus.lua +++ b/Leatrix_Plus.lua @@ -15164,7 +15164,7 @@ function LeaPlusLC:Player() pTex:SetAlpha(0.2) pTex:SetTexCoord(0, 1, 1, 0) - InterfaceOptions_AddCategory(interPanel) + if InterfaceOptions_AddCategory then InterfaceOptions_AddCategory(interPanel) end end @@ -16443,8 +16443,8 @@ function LeaPlusLC:RunOnce() ---------------------------------------------------------------------- -- Hide Leatrix Plus if game options panel is shown - InterfaceOptionsFrame:HookScript("OnShow", LeaPlusLC.HideFrames); - VideoOptionsFrame:HookScript("OnShow", LeaPlusLC.HideFrames); + if InterfaceOptionsFrame then InterfaceOptionsFrame:HookScript("OnShow", LeaPlusLC.HideFrames); end + if VideoOptionsFrame then VideoOptionsFrame:HookScript("OnShow", LeaPlusLC.HideFrames); end ---------------------------------------------------------------------- -- Block friend requests @@ -17150,7 +17150,7 @@ local function eventHandler(self, event, arg1, arg2, ...) -- Remove hover from configuration button if there is one local temp = { LeaPlusCB[option]:GetChildren() } if temp and temp[1] and temp[1].t and temp[1].t:GetTexture() == "Interface\\WorldMap\\Gear_64.png" then - temp[1]:SetHighlightTexture(0) + temp[1]:SetHighlightTexture("") temp[1]:SetScript("OnEnter", nil) end end @@ -20027,8 +20027,12 @@ function LeaPlusLC:SlashFunc(str) -- Create main table LeaPlusDB["Cooldowns"] = {} - -- Create class tables - local classList = { "WARRIOR", "PALADIN", "HUNTER", "SHAMAN", "ROGUE", "DRUID", "MAGE", "WARLOCK", "PRIEST" } + -- Create class tables (dynamic: covers DEATHKNIGHT and CoA custom classes) + local classList = {} + for i = 1, GetNumClasses() do + local _, classFile = GetClassInfo(i) + if classFile then tinsert(classList, classFile) end + end for index = 1, #classList do if LeaPlusDB["Cooldowns"][classList[index]] == nil then LeaPlusDB["Cooldowns"][classList[index]] = {}