From ece5263894410b3bcc79a669f2f839cf33ae9f6b Mon Sep 17 00:00:00 2001 From: luying Date: Fri, 2 Sep 2022 14:07:24 +0800 Subject: [PATCH] =?UTF-8?q?debug=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0env?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/activity/popUpShopService.ts | 2 +- game-server/app/services/checkParam.ts | 5 +++-- shared/db/ComBattleTeam.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/game-server/app/services/activity/popUpShopService.ts b/game-server/app/services/activity/popUpShopService.ts index c32cb5cea..86d7a4b46 100644 --- a/game-server/app/services/activity/popUpShopService.ts +++ b/game-server/app/services/activity/popUpShopService.ts @@ -95,7 +95,7 @@ export async function checkPopUpConditions(serverId: number, roleId: string, con let pushItems: PopUpShopItemShow[] = []; for(let { conditionType, param } of conditions) { for(let pkg of playerData.packages) { - console.log('##### 3', pkg.id, pkg.checkPackageCanPush(conditionType)) + // console.log('##### 3', pkg.id, pkg.checkPackageCanPush(conditionType)) if( !pkg.checkPackageCanPush(conditionType)) { // 筛选推送 continue; } diff --git a/game-server/app/services/checkParam.ts b/game-server/app/services/checkParam.ts index 81b854a83..dc2d96334 100644 --- a/game-server/app/services/checkParam.ts +++ b/game-server/app/services/checkParam.ts @@ -1,6 +1,7 @@ import { isArray, isBoolean, isNumber, isString } from "underscore"; import { BLOCK_OPEATE, DEBUG_MAGIC_WORD, GM_MAIL_TYPE, GUILD_AUTH, GUILD_STRUCTURE, LINEUP_NUM, MSG_TYPE } from "../consts"; import { pvpEndParamInter } from "../pubUtils/interface"; +import { isDevelopEnv } from "./utilService"; export function checkRouteParam(route: string, msg: any) { switch(route) { @@ -1550,7 +1551,7 @@ export function checkRouteParam(route: string, msg: any) { } case "role.heroHandler.addItem": { - if(!checkNaturalNumbers(msg.id, msg.count)) return false; + if(!isDevelopEnv() && !checkNaturalNumbers(msg.id, msg.count)) return false; break; } case 'activity.activityHandler.debugActivityMemory': @@ -1628,7 +1629,7 @@ export function checkRouteParam(route: string, msg: any) { case "activity.gachaHandler.debugClearGachaRecord": case "battle.eventBattleHandler.debugRefEvent": { - if (msg.magicWord !== DEBUG_MAGIC_WORD) return false; + if (msg.magicWord !== DEBUG_MAGIC_WORD || !isDevelopEnv()) return false; break; } case "battle.comBattleHandler.getTeams": diff --git a/shared/db/ComBattleTeam.ts b/shared/db/ComBattleTeam.ts index 6e2c7b0bd..92b799e40 100644 --- a/shared/db/ComBattleTeam.ts +++ b/shared/db/ComBattleTeam.ts @@ -273,7 +273,7 @@ export default class ComBattleTeam extends BaseModel { } public static async syncTeamData(teamData: {teamCode: string, status: number, roleStatus: RoleStatus[], bossHpArr: BossHp[], endTime?: number}, timeout = false, lean = true) { - console.log('syncTeamData bossHpArr: ', teamData.bossHpArr); + // console.log('syncTeamData bossHpArr: ', teamData.bossHpArr); const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode: teamData.teamCode }, {$set :{...teamData, roleCnt: teamData.roleStatus.length, timeout}}, {new: true}).lean(lean); return team; }