练兵场:注释掉ranks
This commit is contained in:
@@ -193,12 +193,12 @@ export class GuildTrainHandler {
|
||||
let goods = await addItems(roleId, roleName, sid, [{ id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.HONOUR), count: Math.floor((isSuccess ? trainSoloReward.winHonour : trainSoloReward.failHonour) * (soloRewardRatio + 100) / 100) }]);
|
||||
let { isComplete, ranks } = guildTrain;
|
||||
let reports = [];
|
||||
let index = findIndex(ranks, { roleId });
|
||||
if (index !== -1) {
|
||||
ranks[index].score += addScore;//更新原有的排名信息
|
||||
} else {
|
||||
ranks.push({ score: addScore, roleId });//新增排名
|
||||
}
|
||||
// let index = findIndex(ranks, { roleId });
|
||||
// if (index !== -1) {
|
||||
// ranks[index].score += addScore;//更新原有的排名信息
|
||||
// } else {
|
||||
// ranks.push({ score: addScore, roleId });//新增排名
|
||||
// }
|
||||
let needLockNext = false;
|
||||
let report = { roleName, trainId, hid, score: addScore, time: nowSeconds(), type: isSuccess ? 2 : 1, difficulty: battleRecord.record.difficulty };//type 1:失败, 2:成功,3:表示系统战报即:被成功压制
|
||||
reports.push(report);
|
||||
@@ -234,8 +234,8 @@ export class GuildTrainHandler {
|
||||
res.releaseCallback();//解锁
|
||||
}
|
||||
} else {
|
||||
//玩家结算前已经完成进度,修改玩家的排名
|
||||
guildTrain = await GuildTrainModel.updateGuildTrain(code, trainId, { ranks });
|
||||
// //玩家结算前已经完成进度,修改玩家的排名
|
||||
// guildTrain = await GuildTrainModel.updateGuildTrain(code, trainId, { ranks });
|
||||
res.releaseCallback();//解锁
|
||||
}
|
||||
if (isComplete) {//解锁下一关,弹出礼包 // 1 true true 6Sjkgp(trainId, isComplete, needLockNext, code)
|
||||
|
||||
Reference in New Issue
Block a user