月卡开启时间0点修改
parent
80882ce656
commit
3c3beed1cf
|
@ -324,32 +324,27 @@ 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()));
|
||||
}
|
||||
if(type==GiftGoodsType.SKY_TREASURE){
|
||||
user.getExpeditionManager().addScore(SSpecialConfig.getIntegerValue(SSpecialConfig.SKY_TREASURE_SCORE_INGIFT));
|
||||
user.getExpeditionManager().getWorldTreasureReward().setIsBuy(1);
|
||||
Map<Integer, Integer> rewardStatusMap = user.getExpeditionManager().getWorldTreasureReward().getRewardStatusMap();
|
||||
ExpeditionLogic.sendTreasureRewardUpdate(session,user.getExpeditionManager().getWorldTreasureReward().getScore(),
|
||||
rewardStatusMap,user.getExpeditionManager().getWorldTreasureReward().getCreateTime(),1);
|
||||
}
|
||||
if(type == GiftGoodsType.SUN_LONG){
|
||||
PlayerManager playerManager = user.getPlayerInfoManager();
|
||||
playerManager.setHadBuyTreasure(1);
|
||||
playerManager.setTreasureLevel(playerManager.getTreasureLevel()+15);
|
||||
PlayerInfoProto.TreasureLevelUpIndication indication = PlayerInfoProto.TreasureLevelUpIndication.newBuilder()
|
||||
.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(type==GiftGoodsType.RED_PACKET){
|
||||
//红包事件
|
||||
Poster.getPoster().dispatchEvent(new BuyGoodsDirectEvent(user.getId(),config.getId()));
|
||||
}
|
||||
if(type==GiftGoodsType.SKY_TREASURE){
|
||||
user.getExpeditionManager().addScore(SSpecialConfig.getIntegerValue(SSpecialConfig.SKY_TREASURE_SCORE_INGIFT));
|
||||
user.getExpeditionManager().getWorldTreasureReward().setIsBuy(1);
|
||||
Map<Integer, Integer> rewardStatusMap = user.getExpeditionManager().getWorldTreasureReward().getRewardStatusMap();
|
||||
ExpeditionLogic.sendTreasureRewardUpdate(session,user.getExpeditionManager().getWorldTreasureReward().getScore(),
|
||||
rewardStatusMap,user.getExpeditionManager().getWorldTreasureReward().getCreateTime(),1);
|
||||
}
|
||||
if(type == GiftGoodsType.SUN_LONG){
|
||||
PlayerManager playerManager = user.getPlayerInfoManager();
|
||||
playerManager.setHadBuyTreasure(1);
|
||||
playerManager.setTreasureLevel(playerManager.getTreasureLevel()+15);
|
||||
PlayerInfoProto.TreasureLevelUpIndication indication = PlayerInfoProto.TreasureLevelUpIndication.newBuilder()
|
||||
.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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue