coa.17: comprehensive partial-data hardening + DataStore_Characters login scan + Skills strip cap
release / release (push) Successful in 5s
release / release (push) Successful in 5s
- Hardening sweep across DataStore_* (softened crash-asserts in Talents/Containers/Quests to graceful nil) + Altoholic frames (guarded remaining getter results). - DataStore_Characters: scan on login (was ghost-gated -> name/level/class never populated; the core 'no character data' cause). - Skills tab: cap inline professions at 6 (+N) so the strip stops overflowing into Cooking.
This commit is contained in:
@@ -625,6 +625,9 @@ local function _GetProfessionInfo(profession)
|
||||
end
|
||||
|
||||
local function _GetNumCraftLines(profession)
|
||||
-- CoA: profession is nil for an unscanned/custom profession on a partial-data alt;
|
||||
-- callers use this as a numeric `for` limit, so return 0 instead of crashing on #nil.Crafts
|
||||
if type(profession) ~= "table" or type(profession.Crafts) ~= "table" then return 0 end
|
||||
return #profession.Crafts
|
||||
end
|
||||
|
||||
@@ -709,7 +712,7 @@ local function _GetNumRecipesByColor(profession)
|
||||
for i = 1, _GetNumCraftLines(profession) do
|
||||
local isHeader, color = _GetCraftLineInfo(profession, i)
|
||||
|
||||
if not isHeader then
|
||||
if not isHeader and color and counts[color] then -- CoA: custom-profession craft lines can carry an out-of-range/nil color
|
||||
counts[color] = counts[color] + 1
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user