领取宝箱奖励

This commit is contained in:
mamengke01
2021-02-03 10:44:17 +08:00
parent f836d6586a
commit 585a741be5

View File

@@ -77,7 +77,7 @@ export class DonationHandler {
let { boxRewards, fund } = getArmyDonateBoxBaseById(id);
let { donateFund, donationLv } = await getDonation(code, serverId);
let { boxRewardRatio, requireRewardRatio } = getArmyDonateBaseByLv(donationLv);
if (donateFund < fund * (100 + requireRewardRatio) )
if (donateFund < Math.floor(fund * (100 + requireRewardRatio)/100) )
return resResult(STATUS.GUILD_DONATE_BOXS_NOT_GOT);
boxRewards = boxRewards.map(({id, count})=>{
return { id, count: count * (boxRewardRatio + 100) };