数数:消耗来源

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
@@ -8,7 +8,7 @@ import { getDungeonData, getDungeonBuyCountCost } from '../../../services/dungeo
import * as dicParam from '../../../pubUtils/dicParam';
import { DungeonFirstModel } from '../../../db/DungeonFirst';
import { DungeonResultParam } from '../../../domain/battleField/dungeon';
import { DEBUG_MAGIC_WORD } from '../../../consts';
import { DEBUG_MAGIC_WORD, ITEM_CHANGE_REASON } from '../../../consts';
export default function(app: Application) {
return new DungeonBattleHandler(app);
@@ -56,7 +56,7 @@ export class DungeonBattleHandler {
if(buyCost > gold) {
return resResult(STATUS.DAILY_REFRESH_GOLD_LACK);
}
await handleCost(roleId, sid, [getGoldObject(buyCost)]);
await handleCost(roleId, sid, [getGoldObject(buyCost)], ITEM_CHANGE_REASON.DUNGEON_BATTLE_BUY_CNT);
await RoleModel.buyCnt(roleId, needRefresh, count, curTime);
let nextCostGold = getDungeonBuyCountCost(dungeonBuyCnt + count + 1);