🐞 fix(gvg): 检查接口参数引用函数错误
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { checkArray } from "pinus-rpc/lib/util/utils";
|
||||
import { isArray, isBoolean, isNumber, isString } from "underscore";
|
||||
import { BLOCK_OPEATE, DEBUG_MAGIC_WORD, GM_MAIL_TYPE, GUILD_AUTH, GUILD_STRUCTURE, GVG_RESOURCE_TYPE, LEAGUE_JOB, LINEUP_NUM, MSG_TYPE } from "../consts";
|
||||
import { pvpEndParamInter } from "../pubUtils/interface";
|
||||
@@ -1356,7 +1355,7 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
case "guild.gvgProduceHandler.plant":
|
||||
{
|
||||
if(!checkNaturalNumbers(msg.farmId)) return false;
|
||||
if(!checkArray(msg.seeds)) return false;
|
||||
if(!checkArrayCanEmpty(msg.seeds)) return false;
|
||||
for(let { fieldId, seedType } of msg.seeds) {
|
||||
if(!checkNaturalNumbers(fieldId, seedType)) return false;
|
||||
}
|
||||
@@ -1412,7 +1411,7 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
case "guild.gvgFighterHandler.saveLineup":
|
||||
{
|
||||
if(!checkNaturalNumbers(msg.vestigeId)) return false;
|
||||
if(!checkArray(msg.lineup)) return false;
|
||||
if(!checkArrayCanEmpty(msg.lineup)) return false;
|
||||
for(let { actorId, dataId, order } of msg.lineup) {
|
||||
if(!checkNaturalNumbers(actorId, dataId, order)) return false;
|
||||
}
|
||||
@@ -1439,7 +1438,7 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
case "guild.gvgFighterHandler.checkBattle":
|
||||
{
|
||||
if(!checkNaturalStrings(msg.battleCode)) return false;
|
||||
if(!checkArray(msg.heroes)) return false;
|
||||
if(!checkArrayCanEmpty(msg.heroes)) return false;
|
||||
for(let { actorId, dataId, order } of msg.heroes) {
|
||||
if(!checkNaturalNumbers(actorId, dataId, order)) return false;
|
||||
}
|
||||
@@ -1454,7 +1453,7 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
case "guild.gvgBattleHandler.saveTeam":
|
||||
{
|
||||
if(!checkNaturalNumbers(msg.index, msg.head, msg.frame, msg.spine)) return false;
|
||||
if(!checkArray(msg.lineup)) return false;
|
||||
if(!checkArrayCanEmpty(msg.lineup)) return false;
|
||||
for(let { actorId, dataId, order } of msg.lineup) {
|
||||
if(!checkNaturalNumbers(actorId, dataId, order)) return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user