dc月度挑战问题
This commit is contained in:
@@ -471,9 +471,11 @@ export class Stage extends Laya.Script {
|
|||||||
UIManager.getInstance().loadGameDoneUI(true, this.data)
|
UIManager.getInstance().loadGameDoneUI(true, this.data)
|
||||||
} else if (this.data.get_stageType() === config.STAGE_TYPE.DC) { // dc
|
} else if (this.data.get_stageType() === config.STAGE_TYPE.DC) { // dc
|
||||||
if (progress >= 1) { // 完成每日挑战关卡检查是否或者当月奖杯
|
if (progress >= 1) { // 完成每日挑战关卡检查是否或者当月奖杯
|
||||||
const now = new Date()
|
const stageID = this.data.get_stageID()
|
||||||
const nowYear = now.getFullYear()
|
const list = stageID.split("-")
|
||||||
const nowMonth = now.getMonth() + 1
|
const nowYear = Number(list[0])
|
||||||
|
const nowMonth = Number(list[1])
|
||||||
|
const day = Number(list[2])
|
||||||
const doneCount = user.get_doneCountByDate(nowYear, nowMonth)
|
const doneCount = user.get_doneCountByDate(nowYear, nowMonth)
|
||||||
let dayCount = 0
|
let dayCount = 0
|
||||||
const info = G_getMonthInfo(nowYear, nowMonth)
|
const info = G_getMonthInfo(nowYear, nowMonth)
|
||||||
@@ -481,7 +483,7 @@ export class Stage extends Laya.Script {
|
|||||||
dayCount = info.dayCount
|
dayCount = info.dayCount
|
||||||
console.log("dc完成信息>>>>>>>>>>>>>>>", nowYear, nowMonth, doneCount, dayCount)
|
console.log("dc完成信息>>>>>>>>>>>>>>>", nowYear, nowMonth, doneCount, dayCount)
|
||||||
if (doneCount >= dayCount) { // 当月每日挑战全部完成
|
if (doneCount >= dayCount) { // 当月每日挑战全部完成
|
||||||
user.add_trophy_record(nowYear, nowMonth, now.getDate())
|
user.add_trophy_record(nowYear, nowMonth, day)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UIManager.getInstance().loadGameDoneUI(false, this.data)
|
UIManager.getInstance().loadGameDoneUI(false, this.data)
|
||||||
|
|||||||
Reference in New Issue
Block a user