挂机,不足一次的奖励随机
parent
6e396124ec
commit
8bf9552c0c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue