试炼调试数据
This commit is contained in:
@@ -33,7 +33,7 @@ export class GuildTrainHandler {
|
||||
if (!userGuild)
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
const { guildCode: code } = userGuild;
|
||||
let { trainId } = await GuildModel.findGuild(code, serverId, 'trainId');
|
||||
let { trainId, trainLv } = await GuildModel.findGuild(code, serverId, 'trainId trainLv');
|
||||
let guildTrain = await GuildTrainModel.findTrainByTrainIdNotLock(code, trainId);
|
||||
if (!guildTrain ) {
|
||||
guildTrain = await unlockTrain(code, trainId);
|
||||
@@ -41,6 +41,7 @@ export class GuildTrainHandler {
|
||||
let { trainCount, trainRewards, buyTrainCount } = userGuild;
|
||||
let result:any = getGuildTrainInfo(guildTrain, roleId, trainCount, trainRewards);
|
||||
result.buyTrainCount = buyTrainCount;
|
||||
result.trainLv = trainLv;
|
||||
return resResult(STATUS.SUCCESS, result);
|
||||
}
|
||||
//获得试炼战报
|
||||
@@ -65,7 +66,7 @@ export class GuildTrainHandler {
|
||||
}
|
||||
reports.push(...resReports);
|
||||
});
|
||||
return resResult(STATUS.SUCCESS, {reports});
|
||||
return resResult(STATUS.SUCCESS, { reports });
|
||||
}
|
||||
|
||||
//获得试炼宝箱
|
||||
@@ -199,7 +200,7 @@ export class GuildTrainHandler {
|
||||
ranks.push({score: addScore, roleId});
|
||||
}
|
||||
let needLockNext = false;
|
||||
let report = {roleName, trainId, hid, score: addScore, time: nowSeconds(), isSuccessed: isSuccess, type: 1};//1表示普通战报, 2表示系统战报即:被成功压制
|
||||
let report = {roleName, trainId, hid, score: addScore, time: nowSeconds(), type: isSuccess?2:1, difficulty: battleRecord.record.difficulty};//1表示普通战报, 2表示系统战报即:被成功压制
|
||||
reports.push(report);
|
||||
if (trainInstance.progress < instance.progress ) {
|
||||
if (trainInstance.progress + addScore >= instance.progress) {
|
||||
@@ -217,7 +218,7 @@ export class GuildTrainHandler {
|
||||
let progress = instance.progress;
|
||||
guildTrain = await GuildTrainModel.updateGuildTrainProgress(code, trainId, hid, progress, ranks, isComplete);
|
||||
if (needLockNext) { //
|
||||
reports.push({ isSuccessed: true, type: 2, time:nowSeconds(), score: addScore, roleName, trainId, hid });
|
||||
reports.push({ type: 3, time:nowSeconds(), score: addScore, roleName, trainId, hid, difficulty: battleRecord.record.difficulty });
|
||||
guildTrain = await unlockTrain(code, trainId + 1);
|
||||
}
|
||||
res.releaseCallback();//解锁
|
||||
|
||||
Reference in New Issue
Block a user