✨ feat(icon): 保护代码
This commit is contained in:
@@ -235,7 +235,7 @@ export class LadderHandler {
|
||||
|
||||
await checkTaskInLadderEnd(serverId, roleId, sid, isSuccess, historyRank, atkLadderMatch.rank);
|
||||
|
||||
if (isSuccess && !rec.defenseInfo?.isRobot) await pushLadderIconShow(rec.roleId2, true);
|
||||
if (isSuccess && (!rec.defenseInfo?.isRobot)) await pushLadderIconShow(rec.roleId2, true);
|
||||
return resResult(STATUS.SUCCESS, {...pick(result, ['rank', 'historyRank', 'challengeCnt','status', 'time', 'oppPlayers']), battleGoods, breakGoods});
|
||||
}
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@ export class GVGProduceHandler {
|
||||
|
||||
await saveScoreToRank(rec);
|
||||
addVestigeBattleEndRec(rec);
|
||||
if (isSuccess && !rec.defenseInfo?.isRobot) await pushGvgFightIconShow(rec.defenseRoleId, battleCode);
|
||||
if (isSuccess && (!rec.defenseInfo?.isRobot)) await pushGvgFightIconShow(rec.defenseRoleId, battleCode);
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
vestigeId: rec.vestigeId,
|
||||
|
||||
@@ -141,7 +141,7 @@ export default class LadderMatchRec extends BaseModel {
|
||||
];
|
||||
const recs: LadderMatchRecType[] = await LadderMatchRecModel.aggregate(pipeline);
|
||||
for (let obj of recs) {
|
||||
if (obj.roleId2 === roleId && !obj.defenseInfo.isSuccess) return true;
|
||||
if (obj.roleId2 === roleId && (!obj.defenseInfo.isSuccess)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user