任务:排查及修复

This commit is contained in:
luying
2021-11-17 18:09:03 +08:00
parent 2b157c9ef4
commit 08fffc2b54
5 changed files with 24 additions and 21 deletions

View File

@@ -112,7 +112,7 @@ export class RoleHandler {
let calResult = await calAllHeroCe(HERO_SYSTEM_TYPE.TITLE, sid, roleId, update);
// 任务
await checkTask(roleId, sid, TASK_TYPE.ROLE_TITLE, 1, false, { title });
await checkTask(roleId, sid, TASK_TYPE.ROLE_TITLE, 1, false, { oldTitle: title, title: update.title });
//成长任务
await checkActivityTask(serverId, sid, roleId, TASK_TYPE.ROLE_TITLE, update.title)

View File

@@ -1,20 +1,20 @@
module.exports = {
"battle.normalBattleHandler.getBattleList": {
'message Data': {
'message BattleList': {
'required uInt32 battleId': 1,
'required uInt32 status': 2,
'required uInt32 star': 3,
'repeated uInt32 stars': 4,
'required string scriptBefore': 5,
'required string scriptAfter': 6,
},
'repeated BattleList list': 1
},
'required string msg': 1,
'required uInt32 code': 2,
'required Data data': 3
},
// "battle.normalBattleHandler.getBattleList": {
// 'message Data': {
// 'message BattleList': {
// 'required uInt32 battleId': 1,
// 'required uInt32 status': 2,
// 'required uInt32 star': 3,
// 'repeated uInt32 stars': 4,
// 'optional string scriptBefore': 5,
// 'optional string scriptAfter': 6,
// },
// 'repeated BattleList list': 1
// },
// 'required string msg': 1,
// 'required uInt32 code': 2,
// 'required Data data': 3
// },
// "battle.normalBattleHandler.checkBattle": {
// 'message Data': {
// "optional uInt32 battleId": 1,

View File

@@ -20,6 +20,7 @@ export class TaskParam {
heroScores?: HeroScore[];
rankLv?: number;
title?: number;
oldTitle?: number;
job?: number;
aid?: number;
isDebug?: boolean;

View File

@@ -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);
}

View File

@@ -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;