商店限购
parent
29805f877a
commit
2d361b777f
|
@ -422,7 +422,12 @@ public class StoreLogic {
|
|||
if(rewardId==0){
|
||||
continue;
|
||||
}
|
||||
itemNumMap.put(rewardId, 0);
|
||||
int rewardNum = 0;
|
||||
SStoreConfig storeItem = SStoreConfig.getStoreItem(storeId, rewardId);
|
||||
if (storeItem.getRelatedtoVIP() == 1){
|
||||
rewardNum = user.getPlayerInfoManager().getVipInfo().getOrDefault(storeItem.getLimit(), new VipInfo()).getCount();
|
||||
}
|
||||
itemNumMap.put(rewardId, rewardNum);
|
||||
}
|
||||
return itemNumMap;
|
||||
}
|
||||
|
@ -670,11 +675,7 @@ public class StoreLogic {
|
|||
if(limit > buyTimes){
|
||||
//判断购买物品数量是否超出可购数量
|
||||
int canBuyTimes = limit - buyTimes;
|
||||
if(itemNum > canBuyTimes) {
|
||||
check = false;
|
||||
}else{
|
||||
check = true;
|
||||
}
|
||||
check = itemNum <= canBuyTimes;
|
||||
}else{
|
||||
check = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue