feat(class): add CoA custom-class stat-summary defaults via CoAClassPrimaryStats
release / release (push) Successful in 2s

Copy CoAClassSpecData.lua into the addon folder and load it before
RatingBuster.lua in the .toc.  After the vanilla if/elseif ladder in
applyClassProfileDefaults(), a new CoA branch checks
CoAClassPrimaryStats[cls]: if the player's token is a CoA custom class,
enable the stat-summary keys that match the class's union of primary
stats (Agility→physical melee block, Strength→physical melee block,
Intellect→spell block, Spirit→healing/mp5 block, Stamina→health/sta).
Vanilla classes and unrelated settings are not touched.
This commit is contained in:
2026-05-30 01:27:49 +02:00
parent e7b3d4fb93
commit 694f6262ee
3 changed files with 208 additions and 0 deletions
+62
View File
@@ -558,6 +558,68 @@ elseif cls == "DEATHKNIGHT" then
profileDefault.showAPFromArmor = true
profileDefault.sumIgnorePlate = false
end
-- CoA custom classes: enable stat-summary defaults based on primary stats.
-- CoAClassPrimaryStats is defined in CoAClassSpecData.lua (loaded before this file).
if CoAClassPrimaryStats and CoAClassPrimaryStats[cls] then
local stats = CoAClassPrimaryStats[cls]
local hasAgi, hasStr, hasInt, hasSpi, hasSta = false, false, false, false, false
for _, stat in ipairs(stats) do
if stat == "Agility" then hasAgi = true end
if stat == "Strength" then hasStr = true end
if stat == "Intellect" then hasInt = true end
if stat == "Spirit" then hasSpi = true end
if stat == "Stamina" then hasSta = true end
end
-- Always: HP and resilience
profileDefault.sumHP = true
profileDefault.sumResilience = true
if hasAgi then
profileDefault.ratingPhysical = true
profileDefault.sumAgi = true
profileDefault.sumAP = true
profileDefault.sumHit = true
profileDefault.sumCrit = true
profileDefault.sumHaste = true
profileDefault.sumExpertise = true
profileDefault.sumArmorPenetration = true
end
if hasStr then
profileDefault.ratingPhysical = true
profileDefault.sumStr = true
profileDefault.sumAP = true
profileDefault.sumHit = true
profileDefault.sumCrit = true
profileDefault.sumHaste = true
profileDefault.sumExpertise = true
profileDefault.sumArmorPenetration = true
end
if hasInt then
profileDefault.ratingSpell = true
profileDefault.sumMP = true
profileDefault.sumInt = true
profileDefault.sumSpellDmg = true
profileDefault.sumSpellHit = true
profileDefault.sumSpellCrit = true
profileDefault.sumSpellHaste = true
profileDefault.sumHealing = true
profileDefault.sumMP5 = true
profileDefault.showSpellDmgFromInt = true
profileDefault.showMP5FromInt = true
end
if hasSpi then
profileDefault.ratingSpell = true
profileDefault.sumMP = true
profileDefault.sumSpi = true
profileDefault.sumHealing = true
profileDefault.sumMP5 = true
profileDefault.showMP5FromSpi = true
profileDefault.showHealingFromSpi = true
end
if hasSta then
profileDefault.sumSta = true
end
end
end -- applyClassProfileDefaults
local defaults = {}