diff --git a/Decursive/Dcr_lists.lua b/Decursive/Dcr_lists.lua
index fde4fe5..746c7b8 100644
--- a/Decursive/Dcr_lists.lua
+++ b/Decursive/Dcr_lists.lua
@@ -598,4 +598,54 @@ function D:PopulateButtonPress(frame) --{{{
end --}}}
+-- CoA: append PopulateListFrame buttons for class indices 22+ (CoA custom
+-- classes added in Dcr_Raid.lua). The vanilla 11 buttons stay hardcoded in
+-- Dcr_lists.xml so this fork keeps working on stock clients with no extras.
+function D:BuildPopulateExtraClassButtons(frame) --{{{
+ if frame.coa_extras_built then return end
+
+ local extras = {}
+ for k in pairs(DC.ClassNumToUName) do
+ if k >= 22 then extras[#extras + 1] = k end
+ end
+ table.sort(extras)
+
+ if #extras == 0 then
+ frame.coa_extras_built = true
+ return
+ end
+
+ -- Each row added below the existing 6-row class grid is 20px tall. The
+ -- first extra slots into row 6's empty right column, so only ceil((n-1)/2)
+ -- new rows are needed.
+ local newRows = math.ceil((#extras - 1) / 2)
+ frame:SetHeight(frame:GetHeight() + newRows * 20)
+
+ local frameName = frame:GetName()
+ local prevLeft = _G[frameName .. "Hero"]
+ local prevRight = _G[frameName .. "Deathknight"]
+
+ for i, classIdx in ipairs(extras) do
+ local class = DC.ClassNumToUName[classIdx]
+ local btn = CreateFrame("Button", frameName .. "Coa" .. classIdx, frame, "GameMenuButtonTemplate")
+ btn:SetSize(80, 20)
+ btn.ClassType = class
+ btn:SetText(D:ColorText(LC[class] or class, "FF" .. D:GetClassHexColor(class)))
+ btn:SetScript("OnClick", function(b) D:PopulateButtonPress(b) end)
+
+ if i == 1 then
+ btn:SetPoint("TOP", prevRight, "BOTTOM", 0, 0)
+ prevRight = btn
+ elseif i % 2 == 0 then
+ btn:SetPoint("TOP", prevLeft, "BOTTOM", 0, 0)
+ prevLeft = btn
+ else
+ btn:SetPoint("TOP", prevRight, "BOTTOM", 0, 0)
+ prevRight = btn
+ end
+ end
+
+ frame.coa_extras_built = true
+end --}}}
+
T._LoadedFiles["Dcr_lists.lua"] = "2.5.1-6-gd3885c5";
diff --git a/Decursive/Dcr_lists.xml b/Decursive/Dcr_lists.xml
index 26b957d..948018f 100644
--- a/Decursive/Dcr_lists.xml
+++ b/Decursive/Dcr_lists.xml
@@ -440,6 +440,7 @@
_G[self:GetName().."Title"]:SetText(Dcr.L["STR_QUICK_POP"]);
+ if Dcr.BuildPopulateExtraClassButtons then Dcr:BuildPopulateExtraClassButtons(self); end
diff --git a/Decursive/Decursive.toc b/Decursive/Decursive.toc
index 86bf006..ca09301 100644
--- a/Decursive/Decursive.toc
+++ b/Decursive/Decursive.toc
@@ -18,7 +18,7 @@
## SavedVariables: DecursiveDB
-## Version: Asc-1.1.0-coa (orig 2.5.1-6-gd3885c5)
+## Version: Asc-1.1.1-coa (orig 2.5.1-6-gd3885c5)
## Author: Archarodim
## X-License: All Rights Reserved