fix: pcall GetSpecInfoByID, fix specs_per_class indexing, FDID->string
Three CoA 3.3.5 compatibility fixes for Details: 1. LibOpenRaid/LibOpenRaid.lua:1298 - C_ClassInfo.GetSpecInfoByID is now pcall-guarded. On CoA, specId can be non-numeric and the API errors out, taking the unit-info update with it. Matches the pcall pattern already shipped for GetSpecInfo(class, spec) in 7 sibling files. 2. Libs/DF/fw.lua:4257 - specs_per_class[index] was writing into the outer table by numeric index, clobbering keys and never populating the nested per-class table initialised on line 4253. Corrected to specs_per_class[class][index] so DF:GetClassSpecIDs(engClass) returns the right list. 3. Libs/DF/icongeneric.lua:211 - SetTexture(130759) passed a FileDataID to a 3.3.5 client that only resolves string paths, leaving icon borders blank. Replaced with the documented mapping [[Interface\COMMON\WhiteIconFrame]] (same path already used in frames/window_mythicplus/window_end_of_run.lua:358). Follows the FDID->string pattern shipped in coa-ace3 d422ad3.
This commit is contained in:
+1
-1
@@ -4254,7 +4254,7 @@ for _, class in ipairs(CLASS_SORT_ORDER) do
|
||||
for index, spec in ipairs(specs) do
|
||||
local ok, specInfo = pcall(C_ClassInfo.GetSpecInfo, class, spec)
|
||||
if ok and specInfo then
|
||||
specs_per_class[index] = specInfo.ID
|
||||
specs_per_class[class][index] = specInfo.ID
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -208,7 +208,7 @@ detailsFramework.IconGenericMixin = {
|
||||
iconFrame.Border:ClearAllPoints()
|
||||
iconFrame.Border:SetPoint("topleft", iconFrame, "topleft", -1, 1)
|
||||
iconFrame.Border:SetPoint("bottomright", iconFrame, "bottomright", 1, -1)
|
||||
iconFrame.Border:SetTexture(130759)
|
||||
iconFrame.Border:SetTexture([[Interface\COMMON\WhiteIconFrame]])
|
||||
iconFrame.Border:SetTexCoord(0.296875, 0.5703125, 0, 0.515625)
|
||||
iconFrame.Border:SetDrawLayer("overlay", 7)
|
||||
|
||||
|
||||
@@ -1295,8 +1295,8 @@ end
|
||||
end
|
||||
role = "DAMAGER"
|
||||
else
|
||||
local specInfo = C_ClassInfo.GetSpecInfoByID(specId or 0)
|
||||
if specInfo then
|
||||
local ok, specInfo = pcall(C_ClassInfo.GetSpecInfoByID, specId or 0)
|
||||
if ok and specInfo then
|
||||
specName = specInfo.Name
|
||||
specDescription = specInfo.Description
|
||||
specIcon = "Interface\\Icons\\"..specInfo.SpecFilename
|
||||
|
||||
Reference in New Issue
Block a user