寻宝助战匹配简单机器人
This commit is contained in:
@@ -27,7 +27,7 @@ export function battle(session: Session, msg: any, app: Application, cb: (err: E
|
||||
if (msg.args && msg.args.length > 0) {
|
||||
for (let arg of msg.args) {
|
||||
if (!arg.route) continue;
|
||||
if (arg.route === 'battle.comBattleHandler.createTeam') {
|
||||
if (['battle.comBattleHandler.createTeam', 'battle.comBattleHandler.searchTeam'].indexOf(arg.route) !== -1) {
|
||||
rid = Math.random().toString(36).slice(-8);
|
||||
session.set('teamCode', rid);
|
||||
} else if (arg.route.indexOf('battle.comBattleHandler') !== -1) {
|
||||
|
||||
Reference in New Issue
Block a user