五星成长礼按天刷新
parent
3cdb228594
commit
aab51ba39c
|
|
@ -25,6 +25,7 @@ import com.ljsd.jieling.logic.mission.GameMisionType;
|
||||||
import com.ljsd.jieling.logic.mission.data.DataManagerDistributor;
|
import com.ljsd.jieling.logic.mission.data.DataManagerDistributor;
|
||||||
import com.ljsd.jieling.logic.mission.event.MissionEventDistributor;
|
import com.ljsd.jieling.logic.mission.event.MissionEventDistributor;
|
||||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||||
|
import com.ljsd.jieling.logic.store.BuyGoodsLogic;
|
||||||
import com.ljsd.jieling.logic.store.StoreLogic;
|
import com.ljsd.jieling.logic.store.StoreLogic;
|
||||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||||
import com.ljsd.jieling.netty.cocdex.Tea;
|
import com.ljsd.jieling.netty.cocdex.Tea;
|
||||||
|
|
@ -302,6 +303,7 @@ public class GlobalDataManaager {
|
||||||
ActivityLogic.getInstance().flushEveryDay(user,fBuilder);
|
ActivityLogic.getInstance().flushEveryDay(user,fBuilder);
|
||||||
PlayerLogic.getInstance().vipflushEveryDay(user,fBuilder);
|
PlayerLogic.getInstance().vipflushEveryDay(user,fBuilder);
|
||||||
PlayerLogic.getInstance().flushUserdataEvery(user,fBuilder);
|
PlayerLogic.getInstance().flushUserdataEvery(user,fBuilder);
|
||||||
|
BuyGoodsLogic.flushEveryDay(user);
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_REFRESH,0);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.DAILY_REFRESH,0);
|
||||||
user.getUserMissionManager().onGameEvent(user, GameEvent.BLOODY_REFRESH,0);
|
user.getUserMissionManager().onGameEvent(user, GameEvent.BLOODY_REFRESH,0);
|
||||||
FriendLogic.getInstance().refreshState(session);
|
FriendLogic.getInstance().refreshState(session);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public class RechargeInfo extends MongoBase{
|
||||||
|
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private Set<Integer> cacheSendedIds = new ConcurrentSet<>();
|
private volatile Set<Integer> cacheSendedIds = new ConcurrentSet<>();
|
||||||
private Map<Integer,Long> levelBagMap = new HashMap<>();
|
private Map<Integer,Long> levelBagMap = new HashMap<>();
|
||||||
|
|
||||||
private Map<Integer,Integer> buyGoodsTimes = new HashMap<>();
|
private Map<Integer,Integer> buyGoodsTimes = new HashMap<>();
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,19 @@ public class BuyGoodsLogic {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(BuyGoodsLogic.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(BuyGoodsLogic.class);
|
||||||
|
|
||||||
|
public static void flushEveryDay(User user) throws Exception {
|
||||||
|
//更新5星成长礼
|
||||||
|
user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes().put(21,0);
|
||||||
|
List<CommonProto.GiftGoodsInfo> goodsBagInfo = new ArrayList<>(SRechargeCommodityConfig.rechargeCommodityConfigMap.size());
|
||||||
|
BuyGoodsLogic.getGoodsBagInfo(user.getId(), goodsBagInfo,false);
|
||||||
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
|
if(session!=null){
|
||||||
|
PlayerInfoProto.AllGiftGoodsIndication build = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build();
|
||||||
|
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE,build,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void testBuyGoods(ISession session,int goodsId) throws Exception {
|
public static void testBuyGoods(ISession session,int goodsId) throws Exception {
|
||||||
int uid = session.getUid();
|
int uid = session.getUid();
|
||||||
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue