coa.18: guard DataStore_Achievements nil criteria quantity
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:
2026-05-29 20:05:03 +02:00
parent 0a56cbe560
commit 219e749046
2 changed files with 3 additions and 3 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.17
## Version: 3.3.002b-coa.18
## 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
@@ -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