diff --git a/game-server/app/pubUtils b/game-server/app/pubUtils index a3f89e4da..831ac6847 120000 --- a/game-server/app/pubUtils +++ b/game-server/app/pubUtils @@ -1 +1 @@ -/Users/bantu/zyz_server/shared/pubUtils \ No newline at end of file +../../shared/pubUtils \ No newline at end of file diff --git a/shared/db/Role.ts b/shared/db/Role.ts index d89460f65..93ef62603 100644 --- a/shared/db/Role.ts +++ b/shared/db/Role.ts @@ -156,7 +156,7 @@ export default class Role extends BaseModel { if (cnt < 0) return null; const result = await RoleModel.findOneAndUpdate({roleId}, {$inc: {hangUpSpdUpCnt: -cnt}, lastSpdUpTime: curTime}, {new: true}).lean(lean); - const lastSpdUpTime = result?result.lastSpdUpTime: curTime; + const lastSpdUpTime = result?result.lastSpdUpTime: curTime; let role = null; if (shouldRefresh(lastSpdUpTime, curTime, HANG_UP_CONSTS.REFRESH_TIME, 1) && cnt <= HANG_UP_CONSTS.MAX_SPD_UP_CNT) { role = await RoleModel.findOneAndUpdate({roleId}, {hangUpSpdUpCnt: HANG_UP_CONSTS.MAX_SPD_UP_CNT - cnt, lastSpdUpTime: curTime}, {new: true}).lean(lean); diff --git a/shared/db/TowerTaskRec.ts b/shared/db/TowerTaskRec.ts index 47265b455..180d1417b 100644 --- a/shared/db/TowerTaskRec.ts +++ b/shared/db/TowerTaskRec.ts @@ -1,17 +1,6 @@ import BaseModel from './BaseModel'; import { index, getModelForClass, prop } from '@typegoose/typegoose'; -// class TowerTask { -// @prop({ required: true }) -// id: number; // 任务唯一 Id,来自任务表 -// @prop({ required: true}) -// taskCode: string; // 服务器生成的任务唯一编号 -// @prop({ required: true, type: Number, default: []}) -// heroes: Array; // 派遣武将 hid -// @prop({ required: true }) -// status: boolean; // 派遣任务当前状态,0-可派遣,1-已派遣,2-已完成,3-已领取 -// } - function genCodeTmp(len) { const chars = '123456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijklmnopqrstuvwxyz'; const charArr = chars.split(''); diff --git a/shared/pubUtils/util.ts b/shared/pubUtils/util.ts index 383f2e7dc..d1297f15c 100644 --- a/shared/pubUtils/util.ts +++ b/shared/pubUtils/util.ts @@ -1,9 +1,6 @@ import { getGamedata } from './gamedata'; -// import { CounterModel } from '../db/Counter'; -// import { EquipModel } from '../db/Equip'; import { HeroModel } from '../db/Hero'; -// import { GOOD_TYPE } from '../consts/consts'; const moment = require('moment'); export function genCode(len) { diff --git a/web-server/app/pubUtils b/web-server/app/pubUtils index a3f89e4da..831ac6847 120000 --- a/web-server/app/pubUtils +++ b/web-server/app/pubUtils @@ -1 +1 @@ -/Users/bantu/zyz_server/shared/pubUtils \ No newline at end of file +../../shared/pubUtils \ No newline at end of file