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

This commit is contained in:
luying
2023-05-12 09:33:48 +08:00
parent 30e011bcad
commit e8f162f7b2
@@ -29,6 +29,7 @@ import { JewelModel } from '../../../db/Jewel';
import { RoleCeModel } from '../../../db/RoleCe'; import { RoleCeModel } from '../../../db/RoleCe';
import { setTrainLv } from '../../../services/gmService'; import { setTrainLv } from '../../../services/gmService';
import { ArtifactModel } from '../../../db/Artifact'; import { ArtifactModel } from '../../../db/Artifact';
import { roleLeave } from '../../../services/redisService';
let timer: NodeJS.Timer; let timer: NodeJS.Timer;
export default function (app: Application) { export default function (app: Application) {
@@ -79,6 +80,7 @@ export class GmRoleHandler {
await this.app.rpc.connector.connectorRemote.setOtherUserSession.toServer(sid,[{ roleId, blockType }]); await this.app.rpc.connector.connectorRemote.setOtherUserSession.toServer(sid,[{ roleId, blockType }]);
if(blockType == BLOCK_TYPE.BLOCK) { // 踢走 if(blockType == BLOCK_TYPE.BLOCK) { // 踢走
await this.app.rpc.connector.connectorRemote.remoteLogin.toServer(sid, roleId, STATUS.BLOCKED); await this.app.rpc.connector.connectorRemote.remoteLogin.toServer(sid, roleId, STATUS.BLOCKED);
await roleLeave(roleId);
} }
} }
return resResult(STATUS.SUCCESS); return resResult(STATUS.SUCCESS);