5 Commits

Author SHA1 Message Date
florian.berthold 77fa7d7f49 Bump version to 264
Carries the CoAClassColors.lua patch on top of upstream 263.
2026-05-08 23:44:50 +02:00
florian.berthold 4c5c8d42c3 Bump version to 263-coa1
Marks this fork as carrying the CoAClassColors.lua patch, so users can
tell at a glance (e.g. via /reload addon list) that they are running the
guild-patched build. Suffix follows the coa-omen convention
(3.0.9-coa1).
2026-05-08 23:42:59 +02:00
florian.berthold 7c7784eefa Add CoAClassColors.lua: mirror RAID_CLASS_COLORS into CUSTOM_CLASS_COLORS
Kui_Nameplates picks its colour source table once at load
(Modules/ClassColours.lua:90 and Libs/Kui/Kui.lua:56-60):

    cc_table = CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS

with no per-key fallback. When the !ClassColors addon is loaded it
injects a vanilla-10-only CUSTOM_CLASS_COLORS, so the 22 CoA tokens
silently fall through and class-coloured friendly names disappear
(plus a nil-arg in kui.GetClassColour for the str path).

New file mirrors any RAID_CLASS_COLORS entry that CUSTOM_CLASS_COLORS
is missing, when !ClassColors is loaded. Idempotent — only fills nil
keys, so user customisations win. RAID_CLASS_COLORS itself is left
untouched (the Voljin/CoA client populates it from
patch-B.MPQ → SharedXML/SharedConstants.lua).

Same pattern as coa-omen and coa-shadowedunitframes' fixes.
2026-05-08 23:21:50 +02:00
florian.berthold 7c35ddfa8d ci: preserve upstream line endings (CRLF) for clean upstream diffs 2026-05-08 04:03:12 +02:00
andrew6180 1c881ef673 Add popup to disable platebuffs or kui if both enabled 2025-07-29 09:16:04 -07:00
5 changed files with 106 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
* -text
+74
View File
@@ -0,0 +1,74 @@
-- CoAClassColors.lua
--
-- Forwards the live client's RAID_CLASS_COLORS palette into
-- _G.CUSTOM_CLASS_COLORS so Kui_Nameplates renders Conquest-of-Azeroth
-- class names and bars correctly when the !ClassColors addon is
-- loaded.
--
-- Background
-- ----------
-- The CoA Voljin client (and the Ascension classic+ client) ship
-- Interface/SharedXML/SharedConstants.lua with all 32 class
-- file_strings populated in _G.RAID_CLASS_COLORS — 10 vanilla + HERO +
-- 21 CoA customs (BARBARIAN, WITCHDOCTOR, DEMONHUNTER, FLESHWARDEN,
-- MONK = Templar, PROPHET = Venomancer, …).
--
-- Kui_Nameplates picks its source table once in
-- Modules/ClassColours.lua:90 with
-- cc_table = CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS
-- and Libs/Kui/Kui.lua:56-60 has the same shape:
-- if CUSTOM_CLASS_COLORS then class = CUSTOM_CLASS_COLORS[class]
-- else class = RAID_CLASS_COLORS[class]
-- end
-- When !ClassColors is loaded it injects a separate
-- _G.CUSTOM_CLASS_COLORS populated from its own (vanilla-10-only)
-- defaults plus user overrides. There is *no* per-key fallback to
-- RAID_CLASS_COLORS, so on a !ClassColors-equipped client the 22 CoA
-- tokens silently miss and SetTextColor is called with a nil colour
-- (no class-coloured friendly names; nil-arg error in
-- kui.GetClassColour for the str path).
--
-- Strategy
-- --------
-- If CUSTOM_CLASS_COLORS exists at file-load time (i.e. !ClassColors
-- already loaded — Kui_Nameplates.toc declares it as an OptionalDep,
-- so it loads first when installed), copy any RAID_CLASS_COLORS entry
-- that CUSTOM_CLASS_COLORS is missing. Never overwrite —
-- !ClassColors user preferences and any other addon's earlier write
-- win.
--
-- We deliberately don't touch RAID_CLASS_COLORS itself: the client
-- already populates it, and any value we'd choose here would be a
-- guess relative to the realm-authoritative palette in
-- SharedConstants.lua.
--
-- Source of truth: _G.RAID_CLASS_COLORS at FrameXML load time
-- (Voljin/PTR realm: patch-B.MPQ → SharedXML/SharedConstants.lua).
local CCC = _G.CUSTOM_CLASS_COLORS
if type(CCC) ~= "table" then return end
local CC = _G.RAID_CLASS_COLORS
if type(CC) ~= "table" then return end
local function colorStr(r, g, b)
return string.format("ff%02x%02x%02x", r * 255 + 0.5, g * 255 + 0.5, b * 255 + 0.5)
end
local function unpackColor(c)
if type(c) ~= "table" then return end
if c.GetRGB then return c:GetRGB() end
return c.r, c.g, c.b
end
for token, src in pairs(CC) do
if CCC[token] == nil then
local r, g, b = unpackColor(src)
if r and g and b then
CCC[token] = {
r = r, g = g, b = b,
colorStr = colorStr(r, g, b),
}
end
end
end
+16
View File
@@ -1251,3 +1251,19 @@ do
)
end
end
StaticPopupDialogs.KUINAMEPLATES_INCOMPATIBLE = {
text = "KuiNameplates is not compatible with PlateBuffs. Please disable PlateBuffs or KuiNameplates.",
button1 = "Disable PlateBuffs",
button2 = "Disable KuiNameplates",
whileDead = 1,
OnButton1 = function()
DisableAddOn("PlateBuffs")
ReloadUI()
end,
OnButton2 = function()
DisableAddOn("KuiNameplates")
ReloadUI()
end,
hideOnEscape = 0,
}
+4
View File
@@ -500,6 +500,10 @@ function addon:OnInitialize()
-- on messages
addon.Castbar = addon:GetModule("Castbar")
addon.TankModule = addon:GetModule("TankMode")
if IsAddOnLoaded("PlateBuffs") then
StaticPopup_Show("KUINAMEPLATES_INCOMPATIBLE")
end
end
---------------------------------------------------------------------- enable --
function addon:OnEnable()
+10 -1
View File
@@ -1,8 +1,9 @@
## Interface: 30300
## Author: Kesava
## Title: Kui |cff9966ffNameplates|r
## Version: 263
## Version: 264
## Notes: Prettier nameplates.
## OptionalDeps: !ClassColors
## SavedVariables: KuiNameplatesGDB
## X-Curse-Packaged-Version: 262
## X-Curse-Project-Name: KuiNameplates
@@ -13,5 +14,13 @@
Embeds.xml
Locales.xml
## CoA patches ##
# Mirror RAID_CLASS_COLORS into CUSTOM_CLASS_COLORS for the 22 CoA
# class tokens before any module captures cc_table. Loaded after
# Embeds (defensive — this file uses no libs) and before Core/Modules
# so ClassColours.lua:90 sees the populated CCC at OnInitialize time.
CoAClassColors.lua
Core.xml
Modules.xml