修改连续签到和累计签到奖励领取规则
This commit is contained in:
parent
393e9e65c4
commit
dd93da8cf7
@ -156,7 +156,7 @@ class GameController extends BaseController {
|
|||||||
throw new ZError(14, 'already claimed')
|
throw new ZError(14, 'already claimed')
|
||||||
}
|
}
|
||||||
|
|
||||||
const score = totalSignScore(days)
|
const score = seqSignScore(days)
|
||||||
if (score === 0) {
|
if (score === 0) {
|
||||||
throw new ZError(15, 'invalid days')
|
throw new ZError(15, 'invalid days')
|
||||||
}
|
}
|
||||||
|
@ -14,12 +14,12 @@ for (let i = 0, l = seqSignCfg.length; i < l; i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const totalSignScore = (days: number) => {
|
export const totalSignScore = (days: number) => {
|
||||||
const data = totalSignCfg2.find(o => days >= o.days)
|
const data = totalSignCfg2.find(o => days === o.days)
|
||||||
return data?.reward || 0
|
return data?.reward || 0
|
||||||
}
|
}
|
||||||
|
|
||||||
export const seqSignScore = (days: number) => {
|
export const seqSignScore = (days: number) => {
|
||||||
const data = seqSignCfg2.find(o => days >= o.days)
|
const data = seqSignCfg2.find(o => days === o.days)
|
||||||
return data?.reward || 0
|
return data?.reward || 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user