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:
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
## Author: Thaoky, Telkar-RG
|
## Author: Thaoky, Telkar-RG
|
||||||
## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at
|
## 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-Category: Inventory, Tradeskill, Mail
|
||||||
## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU
|
## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU
|
||||||
## X-Website: http://wow.curse.com/downloads/wow-addons/details/altoholic.aspx
|
## 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
|
if critCompleted then
|
||||||
table.insert(CriteriaCache, tostring(j))
|
table.insert(CriteriaCache, tostring(j))
|
||||||
else
|
else
|
||||||
if reqQuantity > 1 then
|
if (reqQuantity or 0) > 1 then -- CoA: GetAchievementCriteriaInfo can return nil quantities for custom/partial achievements
|
||||||
table.insert(CriteriaCache, j .. ":" .. quantity)
|
table.insert(CriteriaCache, j .. ":" .. (quantity or 0))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user