feat(后台): 封禁玩家时踢出游戏

This commit is contained in:
luying
2023-05-11 10:55:11 +08:00
parent 30e011bcad
commit e8f162f7b2

View File

@@ -29,6 +29,7 @@ import { JewelModel } from '../../../db/Jewel';
import { RoleCeModel } from '../../../db/RoleCe';
import { setTrainLv } from '../../../services/gmService';
import { ArtifactModel } from '../../../db/Artifact';
import { roleLeave } from '../../../services/redisService';
let timer: NodeJS.Timer;
export default function (app: Application) {
@@ -79,6 +80,7 @@ export class GmRoleHandler {
await this.app.rpc.connector.connectorRemote.setOtherUserSession.toServer(sid,[{ roleId, blockType }]);
if(blockType == BLOCK_TYPE.BLOCK) { // 踢走
await this.app.rpc.connector.connectorRemote.remoteLogin.toServer(sid, roleId, STATUS.BLOCKED);
await roleLeave(roleId);
}
}
return resResult(STATUS.SUCCESS);