五星英雄成长礼

back_recharge
zhangshanxue 2019-11-25 22:12:44 +08:00
parent 26f06a54ae
commit ba1cb23fb2
1 changed files with 11 additions and 5 deletions

View File

@ -204,7 +204,13 @@ public class BuyGoodsLogic {
int temptype = discountType[0];
int tempvalue = discountType[1];
if(temptype == 4&&tempvalue==5){
rechargeInfo.removeTypeBagMap(tempvalue);
if (rechargeInfo.getTypeBagMap().containsKey(tempvalue)){
rechargeInfo.removeTypeBagMap(tempvalue);
}
if (rechargeInfo.getCacheSendedTypes().containsKey(tempvalue)){
rechargeInfo.getCacheSendedTypes().remove(temptype);
}
List<CommonProto.GiftGoodsInfo> goodsBagInfo = new ArrayList<>(SRechargeCommodityConfig.rechargeCommodityConfigMap.size());
BuyGoodsLogic.getGoodsBagInfo(uid, goodsBagInfo,false);
PlayerInfoProto.AllGiftGoodsIndication build = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build();
@ -346,18 +352,18 @@ public class BuyGoodsLogic {
}
endTime = startTime + addtime * 3600 * 1000;
if (rechargeInfo.getCacheSendedTypes().containsKey(5)) {
long lasttime = rechargeInfo.getCacheSendedTypes().get(5);
if (rechargeInfo.getCacheSendedTypes().containsKey(value)) {
long lasttime = rechargeInfo.getCacheSendedTypes().get(value);
if(lasttime != startTime){
needChange = true;
int diffHourTemp = (int) ((now - lasttime) / 3600 / 1000);
if (diffHourTemp < addtime) {
startTime =0;
}
rechargeInfo.getCacheSendedTypes().put(5, System.currentTimeMillis());
rechargeInfo.getCacheSendedTypes().put(value, System.currentTimeMillis());
}
}else {
rechargeInfo.getCacheSendedTypes().put(5, System.currentTimeMillis());
rechargeInfo.getCacheSendedTypes().put(value, System.currentTimeMillis());
}
}