镇念塔:修复加速次数

This commit is contained in:
luying
2021-08-19 12:01:06 +08:00
parent 13b0cf18d0
commit c17afa200e
3 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -299,7 +299,7 @@ export async function calcuHangUpReward(roleId: string, speedUp = false, speedUp
}
if (speedUp) { // 加速,直接收取6小时收益,小数的累积和普通收取独立
if (hangUpSpdUpCnt < speedUpCnt || !lastSpdUpTime || shouldRefresh(lastSpdUpTime, new Date)) { // 可加速
if (hangUpSpdUpCnt + speedUpCnt < dicParam.TOWER_BOOST.TOWER_BOOSTTIME || !lastSpdUpTime || shouldRefresh(lastSpdUpTime, new Date)) { // 可加速
let multi = Math.floor(HANG_UP_CONSTS.SPD_UP_REC_TIME / HANG_UP_CONSTS.UNIT_TIME);
let spdUpRec = await HangUpSpdUpRecModel.getSpdUpRec(roleId, towerLv - 1);
let goods = [];
@@ -646,7 +646,7 @@ export function getHangSpdUpCostGold(times:number) {
if(times <= dicParam.TOWER_BOOST.TOWER_BOOSTFREETIME) {
return 0
} else {
let cost = (times - dicParam.TOWER_BOOST.TOWER_BOOSTFREETIME) * dicParam.TOWER_BOOST.TOWER_BOOSTCAST; // TODO 改成系统参数表
let cost = (times - dicParam.TOWER_BOOST.TOWER_BOOSTFREETIME) * dicParam.TOWER_BOOST.TOWER_BOOSTCAST;
if(cost > dicParam.TOWER_BOOST.TOWER_BOOSTCASTMAX) cost = dicParam.TOWER_BOOST.TOWER_BOOSTCASTMAX;
return cost;
}