军团活动:粮草先行精度问题
This commit is contained in:
@@ -155,10 +155,6 @@ Filter.prototype.before = async function (routeRecord: RouteRecord, msg: any, se
|
|||||||
case 'guild.guildHandler.createGuild':
|
case 'guild.guildHandler.createGuild':
|
||||||
case 'guild.guildHandler.setGuildInfo':
|
case 'guild.guildHandler.setGuildInfo':
|
||||||
{
|
{
|
||||||
if(!guildCode) {
|
|
||||||
guildCode = genCode(6);
|
|
||||||
msg.guildCode = guildCode;
|
|
||||||
}
|
|
||||||
let result = await checkGuildName(guildCode, serverId, msg.name, msg.notice);
|
let result = await checkGuildName(guildCode, serverId, msg.name, msg.notice);
|
||||||
if(!result) hasBlockWords = true;
|
if(!result) hasBlockWords = true;
|
||||||
break;
|
break;
|
||||||
@@ -166,6 +162,11 @@ Filter.prototype.before = async function (routeRecord: RouteRecord, msg: any, se
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(routeRecord.route == 'guild.guildHandler.createGuild') {
|
||||||
|
let guildCode = genCode(6);
|
||||||
|
msg.guildCode = guildCode;
|
||||||
|
}
|
||||||
|
|
||||||
if(hasBlockWords) return next(new Error('globalFilter'), resResult(STATUS.BLOCK_WORDS));
|
if(hasBlockWords) return next(new Error('globalFilter'), resResult(STATUS.BLOCK_WORDS));
|
||||||
|
|
||||||
next(null);
|
next(null);
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ export function guild(session: Session, msg: any, app: Application, cb: (err: Er
|
|||||||
|
|
||||||
let rid = session.get('roleId');
|
let rid = session.get('roleId');
|
||||||
|
|
||||||
|
console.log('#### arg', msg.args);
|
||||||
if (msg.args && msg.args.length > 0) {
|
if (msg.args && msg.args.length > 0) {
|
||||||
for (let arg of msg.args) {
|
for (let arg of msg.args) {
|
||||||
if (!arg.route) continue;
|
if (!arg.route) continue;
|
||||||
|
|||||||
@@ -351,9 +351,10 @@ export class RaceActivityRankParam {
|
|||||||
this.code = woodenHorse.guildCode;
|
this.code = woodenHorse.guildCode;
|
||||||
this.name = woodenHorse.guildName;
|
this.name = woodenHorse.guildName;
|
||||||
this.durability = woodenHorse.durability;
|
this.durability = woodenHorse.durability;
|
||||||
this.sortDistance = woodenHorse.distance
|
let distance = woodenHorse.distance > 1000? 1000: woodenHorse.distance;
|
||||||
|
this.sortDistance = distance;
|
||||||
this.sortTime = woodenHorse.time - woodenHorse.allStartTime;
|
this.sortTime = woodenHorse.time - woodenHorse.allStartTime;
|
||||||
this.num = Math.floor(woodenHorse.distance);
|
this.num = Math.floor(distance);
|
||||||
this.time = Math.floor((woodenHorse.time - woodenHorse.allStartTime)/1000)
|
this.time = Math.floor((woodenHorse.time - woodenHorse.allStartTime)/1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user