🐞 fix(防加速): 添加校验参数
This commit is contained in:
@@ -558,10 +558,10 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
}
|
||||
case "comBattle.comBattleHandler.action":
|
||||
{
|
||||
let { teamCode, bossHurts, killed, curRnd, timegap = 0 } = msg;
|
||||
let { teamCode, bossHurts, killed, curRnd, timegap = 0, roundTime = 0 } = msg;
|
||||
if (!checkNaturalStrings(teamCode)) return false;
|
||||
if (!checkNumberArray(killed)) return false;
|
||||
if (!checkNaturalNumbers(curRnd, timegap)) return false;
|
||||
if (!checkNaturalNumbers(curRnd, timegap, roundTime)) return false;
|
||||
if (!checkArrayCanEmpty(bossHurts)) return false;
|
||||
for (let { hid, dataId, hurtHp } of bossHurts) {
|
||||
if (hid && !checkNaturalNumbers(hid)) return false;
|
||||
@@ -1082,10 +1082,8 @@ export function checkRouteParam(route: string, msg: any) {
|
||||
}
|
||||
case "guild.cityActivityHandler.hitGate":
|
||||
{
|
||||
let { cityId, code, damage, hid, round, timegap = 0 } = msg;
|
||||
console.log('###### timegap 1', timegap)
|
||||
if (!checkNaturalNumbers(cityId, damage, hid, round, timegap)) return false;
|
||||
console.log('###### timegap 2', timegap)
|
||||
let { cityId, code, damage, hid, round, timegap = 0, roundTime = 0 } = msg;
|
||||
if (!checkNaturalNumbers(cityId, damage, hid, round, timegap, roundTime)) return false;
|
||||
if (!checkNaturalStrings(code)) return false;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user