挂机,不足一次的奖励随机

back_recharge
duhui 2021-01-21 14:37:17 +08:00
parent 6e396124ec
commit 8bf9552c0c
1 changed files with 8 additions and 0 deletions

View File

@ -342,6 +342,14 @@ public class ItemUtil {
// 次数
long num = time / sRewardGroup.getDrapRate();
combineRewardDropGroup(user, new int[]{id}, num, itemMap, cardMap, equipMap, randomMap,itemObj);
// 不足掉落的时间,看脸随机
int remainder = time % sRewardGroup.getDrapRate();
// 1-掉落时间,随机数值
int random = MathUtils.random(1, sRewardGroup.getDrapRate());
if (random <= remainder){
combineRewardDropGroup(user, new int[]{id}, 1, itemMap, cardMap, equipMap, randomMap,itemObj);
}
}
if(!isLoop){
extraAddItem(user,itemMap,reason);