coa.18: guard DataStore_Achievements nil criteria quantity
release / release (push) Successful in 5s
release / release (push) Successful in 5s
GetAchievementCriteriaInfo returns nil reqQuantity/quantity for some CoA achievements; 'reqQuantity > 1' crashed. Guarded both.
This commit is contained in:
@@ -55,8 +55,8 @@ local function ScanSingleAchievement(id, isCompleted, month, day, year)
|
||||
if critCompleted then
|
||||
table.insert(CriteriaCache, tostring(j))
|
||||
else
|
||||
if reqQuantity > 1 then
|
||||
table.insert(CriteriaCache, j .. ":" .. quantity)
|
||||
if (reqQuantity or 0) > 1 then -- CoA: GetAchievementCriteriaInfo can return nil quantities for custom/partial achievements
|
||||
table.insert(CriteriaCache, j .. ":" .. (quantity or 0))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user