🐞 fix(guild): 修改捐献宝箱重复领取问题
This commit is contained in:
@@ -129,8 +129,13 @@ export class DonationHandler {
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
}
|
||||
|
||||
if (resReceiveBoxs.indexOf(id) != -1)
|
||||
return resResult(STATUS.GUILD_DONATE_BOXS_IS_GOT);
|
||||
// 捐献宝箱-每级有4个
|
||||
const TOTAL_BOX_COUNT = 4;
|
||||
for (let haveGotId of resReceiveBoxs) {
|
||||
if ((haveGotId % TOTAL_BOX_COUNT) === (id % TOTAL_BOX_COUNT)) {
|
||||
return resResult(STATUS.GUILD_DONATE_BOXS_IS_GOT);
|
||||
}
|
||||
}
|
||||
let { boxRewards, fund, level } = getArmyDonateBoxBaseById(id);
|
||||
let { donateFund, donationLv } = await getDonation(code, guild);
|
||||
if( donationLv < level) return resResult(STATUS.GUILD_DONATE_LV_NOT_ENOUGH)
|
||||
|
||||
Reference in New Issue
Block a user