月卡开启时间0点修改

lvxinran 2021-04-30 19:48:18 +08:00
parent 80882ce656
commit 3c3beed1cf
1 changed files with 22 additions and 27 deletions

View File

@ -324,12 +324,7 @@ public class BuyGoodsNewLogic {
if(dropArray!=null && dropArray.length>1){
drop = ItemUtil.drop(user,dropArray, BIReason.DIRECT_BUY);
}
//直购礼包
if(type == GiftGoodsType.DIRECTBAG){
}else{
if(type==GiftGoodsType.RED_PACKET){
//红包事件
Poster.getPoster().dispatchEvent(new BuyGoodsDirectEvent(user.getId(),config.getId()));
@ -349,7 +344,7 @@ public class BuyGoodsNewLogic {
.setHadBuy(user.getPlayerInfoManager().getHadBuyTreasure()).setLevel(user.getPlayerInfoManager().getTreasureLevel()).build();
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(user.getId()),1,MessageTypeProto.MessageType.TREASURE_LEVELUP_INDICATION_VALUE,indication,true);
}
}
if(drop!=null&&session!=null){
PlayerInfoProto.DirectBuyIndication build = PlayerInfoProto.DirectBuyIndication.newBuilder().setDrop(drop).build();
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.DIRECT_BUY_GOODS_INDICATION_VALUE,build,true);
@ -367,14 +362,14 @@ public class BuyGoodsNewLogic {
info.setMonthRr(MathUtils.doubleAdd(price,info.getMonthRr()));
if(info.getMonthRr()>=monthline){
sendneed=true;
user.getPlayerInfoManager().getMonthCard().put(Global.MONTHCARDID, (int) (System.currentTimeMillis() / 1000));
user.getPlayerInfoManager().putMonthCard(Global.MONTHCARDID,(int)(TimeUtils.getBeginOfDay(System.currentTimeMillis()))/1000);
}
}
if(info.getsMonthRr()<lmonthline){
info.setsMonthRr(MathUtils.doubleAdd(price,info.getsMonthRr()));
if(info.getsMonthRr()>=lmonthline){
sendneed=true;
user.getPlayerInfoManager().getMonthCard().put(Global.LMONTHCARDID, (int) (System.currentTimeMillis() / 1000));
user.getPlayerInfoManager().putMonthCard(Global.LMONTHCARDID, (int)(TimeUtils.getBeginOfDay(System.currentTimeMillis()))/1000);
Poster.getPoster().dispatchEvent(new NewWelfareEvent(user, NewWelfareTypeEnum.RECHARGE_BUY.getType(),Global.LMONTHCARDID));
}
}
@ -552,7 +547,7 @@ public class BuyGoodsNewLogic {
}else if(con[0].equals("4")){//时间类全部true
return true;
}else if(con[0].equals("5")){//激活高级月卡
return user.getPlayerInfoManager().getMonthCard().get(Global.LMONTHCARDID)==null?false:true;
return user.getPlayerInfoManager().getMonthCard().get(Global.LMONTHCARDID) != null;
}else if(con[0].equals("7")){
return true;
}