合成藏宝图不消耗元宝
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 });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,8 +257,7 @@ export const GOLD_COST_RATIO = {
|
||||
"TOWER_HANG_SPDUP": { "A": 0, "B": 50 }, // 天梯挂机加速花费
|
||||
"TOWER_TASK_REF": { "A": 0, "B": 50 }, // 天梯派遣刷新花费
|
||||
"DAILY_REF_NUM": { "A": 50, "B": 0 }, // 每日购买次数花费
|
||||
"DUNGRON_BUY_NUM": { "A": 0, "B": 50 }, // 秘境购买次数花费
|
||||
"BLUEPRT_COMPOSE_COST": { "A": 0, "B": 1000 } // 寻宝合成花费
|
||||
"DUNGRON_BUY_NUM": { "A": 0, "B": 50 } // 秘境购买次数花费
|
||||
}
|
||||
|
||||
export const EXPRESSION = {
|
||||
|
||||
Reference in New Issue
Block a user