✨ feat(防破解): 防加速和防跳过

This commit is contained in:
luying
2023-08-03 16:54:31 +08:00
parent 8c2be216dd
commit 34c5f4b2ce
9 changed files with 124 additions and 16 deletions
+11 -4
View File
@@ -557,10 +557,10 @@ export function checkRouteParam(route: string, msg: any) {
}
case "comBattle.comBattleHandler.action":
{
let { teamCode, bossHurts, killed, curRnd } = msg;
let { teamCode, bossHurts, killed, curRnd, timegap = 0 } = msg;
if (!checkNaturalStrings(teamCode)) return false;
if (!checkNumberArray(killed)) return false;
if (!checkNaturalNumbers(curRnd)) return false;
if (!checkNaturalNumbers(curRnd, timegap)) return false;
if (!checkArrayCanEmpty(bossHurts)) return false;
for (let { hid, dataId, hurtHp } of bossHurts) {
if (hid && !checkNaturalNumbers(hid)) return false;
@@ -709,6 +709,11 @@ export function checkRouteParam(route: string, msg: any) {
if (!checkNaturalNumbers(msg.chapter, msg.warType)) return false;
break;
}
case "battle.normalBattleHandler.checkSkip":
{
if (!checkNaturalStrings(msg.battleCode)) return false;
break;
}
case "battle.pvpHandler.getOppPlayer":
case "battle.pvpHandler.getPlayerDetail":
{
@@ -1076,8 +1081,10 @@ export function checkRouteParam(route: string, msg: any) {
}
case "guild.cityActivityHandler.hitGate":
{
let { cityId, code, damage, hid, round } = msg;
if (!checkNaturalNumbers(cityId, damage, hid, round)) return false;
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)
if (!checkNaturalStrings(code)) return false;
break;
}