领取宝箱奖励
This commit is contained in:
@@ -77,7 +77,7 @@ export class DonationHandler {
|
|||||||
let { boxRewards, fund } = getArmyDonateBoxBaseById(id);
|
let { boxRewards, fund } = getArmyDonateBoxBaseById(id);
|
||||||
let { donateFund, donationLv } = await getDonation(code, serverId);
|
let { donateFund, donationLv } = await getDonation(code, serverId);
|
||||||
let { boxRewardRatio, requireRewardRatio } = getArmyDonateBaseByLv(donationLv);
|
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);
|
return resResult(STATUS.GUILD_DONATE_BOXS_NOT_GOT);
|
||||||
boxRewards = boxRewards.map(({id, count})=>{
|
boxRewards = boxRewards.map(({id, count})=>{
|
||||||
return { id, count: count * (boxRewardRatio + 100) };
|
return { id, count: count * (boxRewardRatio + 100) };
|
||||||
|
|||||||
Reference in New Issue
Block a user