debug接口添加env限制
This commit is contained in:
@@ -95,7 +95,7 @@ export async function checkPopUpConditions(serverId: number, roleId: string, con
|
|||||||
let pushItems: PopUpShopItemShow[] = [];
|
let pushItems: PopUpShopItemShow[] = [];
|
||||||
for(let { conditionType, param } of conditions) {
|
for(let { conditionType, param } of conditions) {
|
||||||
for(let pkg of playerData.packages) {
|
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)) { // 筛选推送
|
if( !pkg.checkPackageCanPush(conditionType)) { // 筛选推送
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { isArray, isBoolean, isNumber, isString } from "underscore";
|
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 { BLOCK_OPEATE, DEBUG_MAGIC_WORD, GM_MAIL_TYPE, GUILD_AUTH, GUILD_STRUCTURE, LINEUP_NUM, MSG_TYPE } from "../consts";
|
||||||
import { pvpEndParamInter } from "../pubUtils/interface";
|
import { pvpEndParamInter } from "../pubUtils/interface";
|
||||||
|
import { isDevelopEnv } from "./utilService";
|
||||||
|
|
||||||
export function checkRouteParam(route: string, msg: any) {
|
export function checkRouteParam(route: string, msg: any) {
|
||||||
switch(route) {
|
switch(route) {
|
||||||
@@ -1550,7 +1551,7 @@ export function checkRouteParam(route: string, msg: any) {
|
|||||||
}
|
}
|
||||||
case "role.heroHandler.addItem":
|
case "role.heroHandler.addItem":
|
||||||
{
|
{
|
||||||
if(!checkNaturalNumbers(msg.id, msg.count)) return false;
|
if(!isDevelopEnv() && !checkNaturalNumbers(msg.id, msg.count)) return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'activity.activityHandler.debugActivityMemory':
|
case 'activity.activityHandler.debugActivityMemory':
|
||||||
@@ -1628,7 +1629,7 @@ export function checkRouteParam(route: string, msg: any) {
|
|||||||
case "activity.gachaHandler.debugClearGachaRecord":
|
case "activity.gachaHandler.debugClearGachaRecord":
|
||||||
case "battle.eventBattleHandler.debugRefEvent":
|
case "battle.eventBattleHandler.debugRefEvent":
|
||||||
{
|
{
|
||||||
if (msg.magicWord !== DEBUG_MAGIC_WORD) return false;
|
if (msg.magicWord !== DEBUG_MAGIC_WORD || !isDevelopEnv()) return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "battle.comBattleHandler.getTeams":
|
case "battle.comBattleHandler.getTeams":
|
||||||
|
|||||||
@@ -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) {
|
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);
|
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode: teamData.teamCode }, {$set :{...teamData, roleCnt: teamData.roleStatus.length, timeout}}, {new: true}).lean(lean);
|
||||||
return team;
|
return team;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user