后台添加推送奇遇事件功能
This commit is contained in:
@@ -24,4 +24,16 @@ export function battle(session: Session, msg: any, app: Application, cb: (err: E
|
||||
|
||||
let res = dispatch(session.get('roleId'), battleServers);
|
||||
cb(null, res.id);
|
||||
}
|
||||
|
||||
export function gm(session: Session, msg: any, app: Application, cb: (err: Error , serverId ?: string) => void) {
|
||||
let gmServers = app.getServersByType('gm');
|
||||
|
||||
if(!gmServers || gmServers.length === 0) {
|
||||
cb(new Error('can not find gm servers.'));
|
||||
return;
|
||||
}
|
||||
|
||||
let res = dispatch(session.get('roleId'), gmServers);
|
||||
cb(null, res.id);
|
||||
}
|
||||
Reference in New Issue
Block a user