🐞 fix(recordBattleCheat): 添加secV为null保护
This commit is contained in:
@@ -541,7 +541,7 @@ export class NormalBattleHandler {
|
||||
let roleName = session.get('roleName');
|
||||
let sid = session.get('sid');
|
||||
|
||||
const rec = await BattleCheatRecModel.createRecord(dataId, type, iKey, value, secV, roleId, roleName);
|
||||
const rec = await BattleCheatRecModel.createRecord(dataId || 0, type, iKey || 0, value || 0, secV || 0, roleId, roleName);
|
||||
if (!rec) {
|
||||
return resResult(STATUS.BATTLE_CHECK_REC_SAVE_ERR);
|
||||
}
|
||||
@@ -576,16 +576,16 @@ export class NormalBattleHandler {
|
||||
}
|
||||
|
||||
// 仅当为open状态才执行封号
|
||||
if(isCheckBlock && parseInt(isCheckBlock) == CHECT_BLOCK_TYPE.OPEN){
|
||||
if (isCheckBlock && parseInt(isCheckBlock) == CHECT_BLOCK_TYPE.OPEN) {
|
||||
const blockType: BLOCK_TYPE = BLOCK_TYPE.BLOCK;
|
||||
const blockReason: string = "使用第三方软件, 封停账号, 封停时间为:" + new Date();;
|
||||
let role = await RoleModel.updateRoleInfo(roleId, { blockType, blockReason });
|
||||
if (!role) return resResult(STATUS.ROLE_NOT_FOUND);
|
||||
|
||||
|
||||
await this.app.rpc.connector.connectorRemote.setOtherUserSession.toServer(sid, [{ roleId, blockType }]);
|
||||
await this.app.rpc.connector.connectorRemote.remoteLogin.toServer(sid, roleId, STATUS.BLOCKED);
|
||||
await roleLeave(roleId);
|
||||
}else{
|
||||
} else {
|
||||
console.log("blockByRecordBattleCheat-防破解查封功能已关闭!!!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user