|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
ZO_ACHIEVEMENTS_COMPLETION_STATUS = { NOT_APPLICABLE = 1, INCOMPLETE = 2, IN_PROGRESS = 3, COMPLETE = 4,} local completed = 0 local total = 0 for criterionIndex = 1, numCriteria do completed = completed + numCompleted total = total + numRequired end if total > 0 then if completed > 0 then if completed == total then return ZO_ACHIEVEMENTS_COMPLETION_STATUS.COMPLETE else return ZO_ACHIEVEMENTS_COMPLETION_STATUS.IN_PROGRESS end else return ZO_ACHIEVEMENTS_COMPLETION_STATUS.INCOMPLETE end end return ZO_ACHIEVEMENTS_COMPLETION_STATUS.NOT_APPLICABLEend |