coa.16: Talents view no longer crashes on CoA custom classes
release / release (push) Successful in 5s

DataStore_Talents._GetTreeReference degrades to nil (was assert) when a custom class
(MONK, etc.) has no/partial talent reference data; Talents.lua skips background render
when GetTreeInfo returns no bg.
This commit is contained in:
2026-05-29 19:36:11 +02:00
parent f305f0a226
commit b8d619c3bb
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
## Author: Thaoky, Telkar-RG
## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at
## Version: 3.3.002b-coa.15
## Version: 3.3.002b-coa.16
## X-Category: Inventory, Tradeskill, Mail
## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU
## X-Website: http://wow.curse.com/downloads/wow-addons/details/altoholic.aspx
+1
View File
@@ -337,6 +337,7 @@ function tns:Update(treeIndex)
-- textures are 90.625% of the original size
local _, bg = DS:GetTreeInfo(class, treeName)
if not bg then return end -- CoA: no talent-tree background for this class (e.g. custom class with no reference data)
AltoholicFrameTalents_bgTopLeft:SetTexture(bg.."-TopLeft")
AltoholicFrameTalents_bgTopRight:SetTexture(bg.."-TopRight")
AltoholicFrameTalents_bgBottomLeft:SetTexture(bg.."-BottomLeft")
+6 -3
View File
@@ -239,9 +239,12 @@ local function _GetClassReference(class)
end
local function _GetTreeReference(class, tree)
assert(type(class) == "string")
assert(type(tree) == "string")
return addon.ref.global[class].Trees[tree]
-- CoA: custom classes (MONK, etc.) may have no/partial talent reference data, so a
-- tree lookup can arrive with a nil tree name. Degrade to nil instead of asserting.
if type(class) ~= "string" or type(tree) ~= "string" then return end
local c = addon.ref.global[class]
if not c or not c.Trees then return end
return c.Trees[tree]
end
local function _IsClassKnown(class)