任务:排查及修复
This commit is contained in:
@@ -20,6 +20,7 @@ export class TaskParam {
|
||||
heroScores?: HeroScore[];
|
||||
rankLv?: number;
|
||||
title?: number;
|
||||
oldTitle?: number;
|
||||
job?: number;
|
||||
aid?: number;
|
||||
isDebug?: boolean;
|
||||
|
||||
@@ -287,6 +287,7 @@ export class CreateHeroes extends UpdateHeroes {
|
||||
// 皮肤使用初始加载进内存的数据
|
||||
let skins = await this.getSkinsOfThisHero(hid, { ...skinInfo, _id: new SkinModel()._id }, false);
|
||||
initHeroInfos.push({ ...heroInfo, skins, _id: new HeroModel()._id });
|
||||
this.heroNum ++;
|
||||
}
|
||||
// 武将使用初始加载数据插入
|
||||
this.resultHeroes = await HeroModel.insertHeroes(this.roleId, this.roleName, this.serverId, initHeroInfos);
|
||||
@@ -310,6 +311,7 @@ export class CreateHeroes extends UpdateHeroes {
|
||||
let model = new SkinModel();
|
||||
let skins = await this.getSkinsOfThisHero(hid, { ...skinInfo, _id: model._id }, true);
|
||||
heroeInfos.push({ ...heroInfo, skins, _id: new HeroModel()._id});
|
||||
this.heroNum ++;
|
||||
}
|
||||
this.resultHeroes = await HeroModel.insertHeroes(this.roleId, this.roleName, this.serverId, heroeInfos);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export async function checkTaskWithHeroes(roleId: string, taskType: number, hero
|
||||
let pushMessage = new Array<TaskListReturn>();
|
||||
for (let hero of heroes) {
|
||||
let singlePush = await checkTaskWithHero(roleId, taskType, hero, []);
|
||||
pushMessage.concat(singlePush);
|
||||
pushMessage.push(...singlePush);
|
||||
}
|
||||
return pushMessage
|
||||
}
|
||||
@@ -342,7 +342,7 @@ export async function checkTaskRec(roleId: string, type: number, group: number,
|
||||
let checkHistory = false; // 是否检查历史
|
||||
switch (taskType) {
|
||||
case TASK_TYPE.ROLE_TITLE:
|
||||
isMatch = taskParam[0] == param.title;
|
||||
isMatch = param.title >= taskParam[0] && param.oldTitle < taskParam[0];
|
||||
checkHistory = true;
|
||||
break;
|
||||
case TASK_TYPE.HERO_STAR_UP:
|
||||
@@ -369,9 +369,9 @@ export async function checkTaskRec(roleId: string, type: number, group: number,
|
||||
break;
|
||||
case TASK_TYPE.EQUIP_BY_HERO:
|
||||
isMatch = false;
|
||||
if (param.isPutOn && param.count == taskParam[1]) { // 装上之后达到 +1
|
||||
if (param.isPutOn == 1 && param.count == taskParam[1]) { // 装上之后达到 +1
|
||||
isMatch = true;
|
||||
} else if (!param.isPutOn && param.count < taskParam[1]) { // 脱下后不能达到 -1
|
||||
} else if (param.isPutOn == -1 && param.count < taskParam[1]) { // 脱下后不能达到 -1
|
||||
isMatch = true;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user