diff --git a/game-server/app/services/comBattleService.ts b/game-server/app/services/comBattleService.ts index 9a49fc4d3..991b7fd68 100644 --- a/game-server/app/services/comBattleService.ts +++ b/game-server/app/services/comBattleService.ts @@ -65,7 +65,7 @@ export function getRandComBtlRobots(topLineupCe: number, ceLimit: number, lv: nu let robotStatus = new RoleStatus({ roleId: robotRoleId, roleName: robotRoleName, - ce: robotCe, + topLineupCe: robotCe, lv: robotLv }, '', false, false, robot, true); robotStArr.push(robotStatus); @@ -159,13 +159,13 @@ export function setComBtlTimer(teamCode: string, timer: NodeJS.Timer, timerMap: export async function getRealReward(blueprtId: number, roleSts: RoleStatus[], roleSt: RoleStatus, hasTimeExtraReward: boolean): Promise { let dicReward = getRewardByBlueprtId(blueprtId); - if(!dicReward || roleSt.isRobot) return []; + if(!dicReward) return []; let fixRewards: RewardInter[] = [], extraRewards: RewardInter[] = []; if (roleSt.isCap) { fixRewards.push(...dicReward.captainReward); } else { - if (roleSt.isFrd) { + if (roleSt.isFrd && !roleSt.isRobot) { // 情谊值有上限,送到上限为止 let frdPointRec = await FriendPointModel.getFrdPointRecToday(roleSt.roleId, FRIEND_DROP_TYPE.COM_BATTLE); let { comBattleCnt = 0 } = frdPointRec || {}; @@ -261,8 +261,10 @@ export async function handleComBtlProgress(teamStatus: MemComBtlTeam, robotHurtT }); for (let st of teamStatus.roleStatus) { st.rewards = await getRealReward(teamStatus.blueprtId, teamStatus.roleStatus, st, teamStatus.hasTimeExtraReward); - await addItems(st.roleId, st.roleName, st.sid, st.rewards, ITEM_CHANGE_REASON.COM_BATTLE_END); - await ComBattleTeamModel.updateRewardSt(teamCode, st.roleId, true); + if(!st.isRobot) { + await addItems(st.roleId, st.roleName, st.sid, st.rewards, ITEM_CHANGE_REASON.COM_BATTLE_END); + await ComBattleTeamModel.updateRewardSt(teamCode, st.roleId, true); + } }; await checkTaskInComBattleEnd(teamStatus.roleStatus, teamStatus.capId);