抽卡:添加activity server
This commit is contained in:
@@ -187,6 +187,7 @@ app.configure(ALL_ENVS, function () {
|
||||
app.route('battle', routeUtil.battle);
|
||||
app.route('gm', routeUtil.gm);
|
||||
app.route('guild', routeUtil.guild);
|
||||
app.route('activity', routeUtil.activity);
|
||||
|
||||
// filter configures
|
||||
app.filter(new pinus.filters.time());
|
||||
|
||||
@@ -93,6 +93,18 @@ export function guild(session: Session, msg: any, app: Application, cb: (err: Er
|
||||
cb(null, res.id);
|
||||
}
|
||||
|
||||
export function activity(session: Session, msg: any, app: Application, cb: (err: Error , serverId ?: string) => void) {
|
||||
let activityServers = app.getServersByType('activity');
|
||||
|
||||
if(!activityServers || activityServers.length === 0) {
|
||||
cb(new Error('can not find activity servers.'));
|
||||
return;
|
||||
}
|
||||
|
||||
let res = dispatch(session.get('roleId'), activityServers);
|
||||
cb(null, res.id);
|
||||
}
|
||||
|
||||
export function gm(session: Session, msg: any, app: Application, cb: (err: Error , serverId ?: string) => void) {
|
||||
let gmServers = app.getServersByType('gm');
|
||||
|
||||
|
||||
@@ -22,4 +22,7 @@ module.exports = [{
|
||||
}, {
|
||||
'type': 'guild',
|
||||
'token': 'agarxhqb98rpajloaxn34ga8xrunpagkjwlaw3ruxnpaagl29w4rxn'
|
||||
}, {
|
||||
'type': 'activity',
|
||||
'token': 'agarxhqb98rpajloaxn34ga8xrunpagkjwlaw3ruxnpaagl29w4rxn'
|
||||
}];
|
||||
@@ -47,6 +47,9 @@ module.exports = {
|
||||
'guild': [
|
||||
{'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239"},
|
||||
{'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058, "args": " --inspect=9240"}
|
||||
],
|
||||
'activity': [
|
||||
{'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241"},
|
||||
]
|
||||
},
|
||||
'production': {
|
||||
@@ -83,6 +86,9 @@ module.exports = {
|
||||
'guild': [
|
||||
{'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239"},
|
||||
{'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058, "args": " --inspect=9240"}
|
||||
],
|
||||
'activity': [
|
||||
{'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241"},
|
||||
]
|
||||
},
|
||||
'alpha': {
|
||||
@@ -121,6 +127,9 @@ module.exports = {
|
||||
'guild': [
|
||||
{'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239"},
|
||||
{'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058, "args": " --inspect=9240"}
|
||||
],
|
||||
'activity': [
|
||||
{'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241"},
|
||||
]
|
||||
},
|
||||
'dev': {
|
||||
@@ -160,6 +169,9 @@ module.exports = {
|
||||
'guild': [
|
||||
{'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239"},
|
||||
{'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058, "args": " --inspect=9240"}
|
||||
],
|
||||
'activity': [
|
||||
{'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241"},
|
||||
]
|
||||
},
|
||||
'isbn': {
|
||||
@@ -196,6 +208,9 @@ module.exports = {
|
||||
'guild': [
|
||||
{'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239"},
|
||||
{'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058, "args": " --inspect=9240"}
|
||||
],
|
||||
'activity': [
|
||||
{'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241"},
|
||||
]
|
||||
},
|
||||
'monitor': {
|
||||
@@ -226,6 +241,9 @@ module.exports = {
|
||||
'guild': [
|
||||
{'id': 'guild-server-1', 'host': '127.0.0.1', 'port': 6057, "args": " --inspect=9239"},
|
||||
{'id': 'guild-server-2', 'host': '127.0.0.1', 'port': 6058, "args": " --inspect=9240"}
|
||||
],
|
||||
'activity': [
|
||||
{'id': 'activity-server-1', 'host': '127.0.0.1', 'port': 6059, "args": " --inspect=9241"},
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user