合成藏宝图不消耗元宝
This commit is contained in:
@@ -770,12 +770,6 @@ export class ComBattleHandler {
|
||||
if(originalSum != dicCompose.blueprtNum) {
|
||||
return resResult(STATUS.COM_BLUEPRT_COUNT_ERROR);
|
||||
}
|
||||
// 检查元宝
|
||||
const role = await RoleModel.findByRoleId(roleId);
|
||||
const costGold = calculateNum(GOLD_COST_RATIO.BLUEPRT_COMPOSE_COST, {num: originalQuality}, 1000);
|
||||
if(!role || role.gold < costGold) {
|
||||
return resResult(STATUS.TOWER_GOLD_NOT_ENOUGH);
|
||||
}
|
||||
// 添加寻宝币
|
||||
original.push({
|
||||
id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.TREASURE_POINT),
|
||||
@@ -786,8 +780,6 @@ export class ComBattleHandler {
|
||||
if(!rec) {
|
||||
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
|
||||
}
|
||||
// 消耗元宝
|
||||
await RoleModel.costGold(roleId, costGold);
|
||||
|
||||
const targetList = getBluePrtByQuality(dicCompose.targetQuality);
|
||||
const target = getRandomByLen(targetList);
|
||||
@@ -795,6 +787,6 @@ export class ComBattleHandler {
|
||||
const goods = await handleReward(roleId, roleName, reward);
|
||||
|
||||
|
||||
return resResult(STATUS.SUCCESS, { ...goods, costGold });
|
||||
return resResult(STATUS.SUCCESS, { ...goods, costGold: 0 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user