数数:消耗来源

This commit is contained in:
luying
2021-12-14 13:18:29 +08:00
parent e9c471c583
commit b6501ee4a2
70 changed files with 503 additions and 305 deletions
@@ -7,7 +7,7 @@ import { getDailyNum, getDailyBattleList, getDailyBuyCountCost } from '../../../
import { handleCost } from '../../../services/rewardService';
import { getGoldObject } from '../../../pubUtils/itemUtils';
import { gameData } from '../../../pubUtils/data';
import { DEBUG_MAGIC_WORD } from '../../../consts';
import { DEBUG_MAGIC_WORD, ITEM_CHANGE_REASON } from '../../../consts';
export default function(app: Application) {
return new DailyBattleHandler(app);
@@ -55,7 +55,7 @@ export class DailyBattleHandler {
return resResult(STATUS.DAILY_REFRESH_GOLD_LACK);
}
await handleCost(roleId, sid, [getGoldObject(buyCost)]);
await handleCost(roleId, sid, [getGoldObject(buyCost)], ITEM_CHANGE_REASON.DAILY_BATTLE_BUY_CNT);
let newDailyRecord = await DailyRecordModel.increseBuyCount(roleId, type, count);
let checkDailyResult = await getDailyNum(newDailyRecord, timesPerDay, timesCanBuy);