创建公会

This commit is contained in:
luying
2021-01-18 21:05:25 +08:00
parent 97216647b2
commit 3c35852495
17 changed files with 281 additions and 37 deletions
@@ -1,5 +1,5 @@
import { STATUS } from './../../../consts/statusCode';
import { HANG_UP_CONSTS, GOLD_COST_RATIO, TOWER_TASK_CONST, REDIS_KEY, CURRENCY_BY_TYPE, CURRENCY_TYPE } from './../../../consts';
import { HANG_UP_CONSTS, GOLD_COST_RATIO, TOWER_TASK_CONST, REDIS_KEY } from './../../../consts';
import { TowerTaskRecModel } from './../../../db/TowerTaskRec';
import { HangUpSpdUpRecModel } from './../../../db/HangUpSpdUpRec';
import { HangUpRecordModel } from './../../../db/HangUpRecord';
@@ -13,6 +13,7 @@ import { handleFixedReward, addItems, handleCost } from '../../../services/rewar
import { checkBattleHeroes } from '../../../services/normalBattleService';
import { getRank, setRank, initRank, existsRank } from '../../../services/redisService';
import { RankParam } from '../../../pubUtils/interface';
import { getGoldObject } from '../../../pubUtils/itemUtils';
export default function(app: Application) {
return new TowerBattleHandler(app);
@@ -135,7 +136,7 @@ export class TowerBattleHandler {
return resResult(STATUS.TOWER_GOLD_NOT_ENOUGH);
}
await handleCost(roleId, sid, [{id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.GOLD), count: costGold}])
await handleCost(roleId, sid, [getGoldObject(costGold)])
const spdUpResult = await RoleModel.hangUpSpdUp(roleId, msg.speedUpCnt, curTime);
if (!spdUpResult) {