日常任务初始值问题修复
This commit is contained in:
xcy 2023-12-20 16:56:23 +08:00
parent e2d9eea5ed
commit dacd312bfe

View File

@ -390,8 +390,11 @@ export module manager {
async initVal(call: ApiCall, con) {
const data = await TanXianFun.getData(call);
if (data?.resetTime > PublicShared.getToDayZeroTime()) {
return data.useFastGuaJiNum || 0
}
return 0
}
}
// 第25个任务 竞技场中挑战 n 次对手
@ -401,8 +404,11 @@ export module manager {
async initVal(call: ApiCall, con) {
let data = await JJCFun.getData(call);
if (data?.resetTime >= PublicShared.getToDayZeroTime()) {
return data?.useFightNum || 0
}
return 0
}
}
// 第26个任务 斩草除根进行 n 次通关或扫荡
@ -418,8 +424,11 @@ export module manager {
async initVal(call: ApiCall, con) {
let myData = await G.mongodb.cPlayerInfo('meirishilian').findOne({uid: call.uid, type: 'meirishilian'});
if (myData.data.refreshTime > PublicShared.getToDayZeroTime()) {
return R.compose(R.sum(), R.map(i => i[0].useFightNum), R.values())(myData.data.numInfo) || 0
}
return 0
}
}
// 第28个任务 地盘争夺抢夺或战领 n 次
@ -435,7 +444,10 @@ export module manager {
async initVal(call: ApiCall, con) {
let myData = await G.mongodb.cPlayerInfo('qjzzd').findOne({uid: call.uid, type: 'qjzzd'});
return myData.useFightNum || 0
if (myData?.refreFightTime > PublicShared.getToDayZeroTime()) {
return myData?.useFightNum || 0
}
return 0
}
}
@ -491,8 +503,11 @@ export module manager {
async initVal(call: ApiCall, con) {
let data: Partial<CollectionWanted> = await G.mongodb.collection('wanted').findOne({uid: call.uid}) || {};
if (data.refreshTime > PublicShared.getToDayZeroTime()) {
return data.toDayUseNum || 0
}
return 0
}
}
// 第35个任务 进行 x 教会招募
@ -766,6 +781,7 @@ export module manager {
return call.conn.gud?.helpHeros?.length || 0;
}
}
// 第56个任务 完成圣诞活动小游戏
export class Class_task_154 extends BaseClass {
stype = 154
@ -775,6 +791,7 @@ export module manager {
return 1;
}
}
// 第57个任务 领取每日任务最终宝箱
export class Class_task_155 extends BaseClass {
stype = 155