商店购买提示修改

back_recharge
duhui 2022-09-09 17:09:14 +08:00
parent 85943157a9
commit 3f66ac83b5
1 changed files with 4 additions and 20 deletions

View File

@ -601,15 +601,6 @@ public class StoreLogic implements IEventHandler {
LOGGER.info("buyStoreItem==> uid={},itemId={}",user.getId(),itemId);
throw new ErrorCodeException(ErrorCode.SHOP_NO_ITEM);
}
// if(storeId==Global.VIPSTORID){
// int vipLeve = user.getPlayerInfoManager().getVipLevel();
// if(vipLeve<(sStoreConfig.getSort()-1)){
// return "vip leve limit";
// }
//// if(user.getPlayerInfoManager().getHadTakeLevelBoxVip().contains(vipLeve)){
//// return "vip time limit 1";
//// }
// }
int[] buyRule = sStoreConfig.getBuyRule();
String err = "";
if (buyRule != null && buyRule.length > 0){
@ -645,7 +636,7 @@ public class StoreLogic implements IEventHandler {
int limit = sStoreConfig.getLimit();
int relatedtoVIP = sStoreConfig.getRelatedtoVIP();
if(limit!=0){
boolean check =true;
boolean check;
if(relatedtoVIP == 1){
if(limit == 6){
int goodsNum = sStoreConfig.getGoods()[0][1]*itemNum;
@ -657,7 +648,7 @@ public class StoreLogic implements IEventHandler {
check = limit > buyTimes;
}
if(!check){
throw new ErrorCodeException(ErrorCode.HERO_MAX);
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
}
}
int[][] cost = getCost(buyTimes ,itemNum, sStoreConfig.getCost(), sStoreConfig.getPremiumType(),sStoreConfig.getIsDiscount(),sStoreConfig.getDiscountDegree());
@ -665,13 +656,6 @@ public class StoreLogic implements IEventHandler {
if (!result){
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
// if(relatedtoVIP == 1 && limit!=0){
// int updateValue = itemNum;
// if(limit == 6){
// updateValue= sStoreConfig.getGoods()[0][1]*itemNum;
// }
// playerInfoManager.updateVipPrivilage(limit,updateValue);
// }
itemNumMap.put(itemId,buyTimes +itemNum);
storeInfo.setItemNumMap(itemNumMap);
KtEventUtils.onKtEvent(user, ParamEventBean.UserStoreEvent,storeId,itemId,cost[0][0],itemNum,cost[0][1]);