同步冲榜活动,心愿活动,相对开服时间活动改动
parent
d6489ed691
commit
2b5e48af3a
|
|
@ -317,10 +317,15 @@ public class RedisKey {
|
|||
//玉虚论道
|
||||
public static final String CROSS_YUXULUNDAO_RANK = "CROSS_YUXULUNDAO_RANK";//排行榜信息 废弃
|
||||
public static final String CROSS_YUXULUNDAO_RANK_PERSON = "CROSS_YUXULUNDAO_RANK_PERSON";//排行榜信息
|
||||
public static final String CROSS_YUXULUNDAO_SEASON_LOCK = "CROSS_YUXULUNDAO_SEASON_LOCK";//玉虚论道赛季结算锁
|
||||
public static final String CROSS_YUXULUNDAO_SEASON_LOCK_MARK = "CROSS_YUXULUNDAO_SEASON_LOCK_MARK";//玉虚论道赛季结算锁标识,记录结算的分组和服务器id
|
||||
public static final String CROSS_YUXULUNDAO_ROBOT_INFO = "CROSS_YUXULUNDAO_ROBOT_INFO";//机器人信息
|
||||
public static final String CROSS_YUXULUNDAO_RECORD = "CROSS_YUXULUNDAO_RECORD";//战斗回放
|
||||
public static final String CROSS_SERVER_USER = "CROSS_SERVER_USER";//redis存储个人基本信息
|
||||
|
||||
public static final String CROSS_YUXULUNDAO_DEAL_MARK = "CROSS_YUXULUNDAO_DEAL_MARK";//玉虚异常处理标记
|
||||
public static final String CROSS_YUXULUNDAO_DEAL_SERVER = "CROSS_YUXULUNDAO_DEAL_SERVER";//玉虚异常需要处理的服务器标识,无记录则不处理,不影响正常渠道
|
||||
|
||||
//跨服 灵脉秘境
|
||||
public static final String CROSS_LINGMAISECRET_INFO= "CROSS_LINGMAISECRET_INFO";//灵脉所有的占领信息
|
||||
public static final String CROSS_LINGMAISECRET_RECORD = "CROSS_LINGMAISECRET_RECORD";//灵脉记录
|
||||
|
|
@ -350,6 +355,26 @@ public class RedisKey {
|
|||
|
||||
public static final String SOUL_SEAL_RANK = "SOUL_SEAL_RANK";//魂印排行榜
|
||||
|
||||
public static final String MONEY_RANK = "MONEY_RANK";//现金点券消耗排行榜
|
||||
public static final String HERO_RANK = "HERO_RANK";//英雄召唤排行榜
|
||||
public static final String FABAO_RANK = "FABAO_RANK";//法宝召唤啊排行榜
|
||||
public static final String XUNXIAN_RANK = "XUNXIAN_RANK";//寻仙召唤排行榜
|
||||
public static final String CROSS_MONEY_RANK = "CROSS_MONEY_RANK";//跨服现金点券消耗排行榜
|
||||
public static final String CROSS_HERO_RANK = "CROSS_HERO_RANK";//跨服英雄召唤排行榜
|
||||
public static final String CROSS_FABAO_RANK = "CROSS_FABAO_RANK";//跨服法宝召唤啊排行榜
|
||||
public static final String CROSS_XUNXIAN_RANK = "CROSS_XUNXIAN_RANK";//跨服寻仙召唤排行榜
|
||||
|
||||
public static final String BACK_MONEY_RANK = "BACK_MONEY_RANK";//备份现金点券消耗排行榜
|
||||
public static final String BACK_HERO_RANK = "BACK_HERO_RANK";//备份英雄召唤排行榜
|
||||
public static final String BACK_FABAO_RANK = "BACK_FABAO_RANK";//备份法宝召唤啊排行榜
|
||||
public static final String BACK_XUNXIAN_RANK = "BACK_XUNXIAN_RANK";//备份寻仙召唤排行榜
|
||||
public static final String CROSS_BACK_MONEY_RANK = "CROSS_BACK_MONEY_RANK";//跨服备份现金点券消耗排行榜
|
||||
public static final String CROSS_BACK_HERO_RANK = "CROSS_BACK_HERO_RANK";//跨服备份英雄召唤排行榜
|
||||
public static final String CROSS_BACK_FABAO_RANK = "CROSS_BACK_FABAO_RANK";//跨服备份法宝召唤啊排行榜
|
||||
public static final String CROSS_BACK_XUNXIAN_RANK = "CROSS_BACK_XUNXIAN_RANK";//跨服备份寻仙召唤排行榜
|
||||
public static final String CROSS_CHONG_RANK_LOCK = "CROSS_CHONG_RANK_LOCK";//跨服冲榜结算分布式锁
|
||||
public static final String CROSS_CHONG_RANK_LOCK_MARK = "CROSS_CHONG_RANK_LOCK_MARK";//跨服冲榜结算锁标记
|
||||
|
||||
/**
|
||||
* 助战
|
||||
* 第一种
|
||||
|
|
@ -381,13 +406,15 @@ public class RedisKey {
|
|||
public static final String NEW_ARENA_REFRESH_FIRST_MARK = "NEW_ARENA_REFRESH_FIRST_MARK";//新竞技场第一次匹配标记
|
||||
// public static final String NEW_ARENA_FIRST_PUSH = "NEW_ARENA_FIRST_PUSH";//竞技场第一名推送标记
|
||||
|
||||
public static final String ONLINE_MAIL_FIRST_MARK = "ONLINE_MAIL_FIRST_MARK";//上线福利邮件,只有一次
|
||||
|
||||
// 唯一key生成
|
||||
public static final String UUID_KEY = "UUID_KEY";//唯一key
|
||||
// 补单
|
||||
public static final String ANEW_RECHARGE_ORDER = "ANEW_RECHARGE_ORDER";//补单订单
|
||||
|
||||
public static final String FANLI = "FANLI";//返利名单
|
||||
public static final String FANLI_STATUS = "FANLI_STATUS";//返利状态
|
||||
public static final String ONLINE_MAIL_FIRST_MARK = "ONLINE_MAIL_FIRST_MARK";//返利状态
|
||||
|
||||
|
||||
//进程排行 合区统一
|
||||
public static Set<String> newAreaCacChe = new HashSet<>();
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@ public class GetWishDrawCardInfoHandler extends BaseHandler<PlayerInfoProto.choi
|
|||
set = ActivityLogic.getInstance().getDesireOpenFabaoList();
|
||||
tmpId = user.getPlayerInfoManager().getDesireDraw().getOrDefault(type, 0);
|
||||
break;
|
||||
case 15://法宝聚灵卡池
|
||||
set = ActivityLogic.getInstance().getDesireOpenTrumpList();
|
||||
tmpId = user.getPlayerInfoManager().getDesireDraw().getOrDefault(type, 0);
|
||||
break;
|
||||
default:
|
||||
throw new ErrorCodeException(ErrorCode.SYS_ERROR_CODE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class ChoiceDrawCardHandler extends BaseHandler<ActivityProto.choiceDrawC
|
|||
int activityId = proto.getActivityId();
|
||||
int type = proto.getType();
|
||||
|
||||
ActivityLogic.getInstance().choiceDrawCard(user,activityId,type);
|
||||
ActivityLogic.getInstance().choiceDrawCard(iSession,user,activityId,type);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.ljsd.jieling.db.redis.RedisKey;
|
|||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.exception.ErrorTableException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.globals.GlobalItemType;
|
||||
import com.ljsd.jieling.handler.activity.BlessInfoConfig;
|
||||
|
|
@ -23,11 +24,16 @@ import com.ljsd.jieling.logic.dao.SecretBoxManager;
|
|||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.item.ItemLog;
|
||||
import com.ljsd.jieling.logic.item.ItemLogic;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
import com.ljsd.jieling.logic.mission.event.MissionEventDistributor;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
|
||||
import com.ljsd.jieling.logic.store.StoreLogic;
|
||||
import com.ljsd.jieling.logic.store.newRechargeInfo.PushRechargeType;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.tools.Utils;
|
||||
import com.ljsd.jieling.util.InnerMessageUtil;
|
||||
|
|
@ -132,7 +138,7 @@ public class ActivityLogic implements IEventHandler{
|
|||
*
|
||||
*/
|
||||
// private void webPayHandlerLogin(User user){
|
||||
// 获取key
|
||||
// 获取key
|
||||
// String subKey = RedisUtil.getInstence().getKey(String.valueOf(user.getId()), String.valueOf(ActivityType.DAILY_RECHARGE),false);
|
||||
// String key = RedisUtil.getInstence().getKey(RedisKey.WEB_PAY, subKey);
|
||||
//
|
||||
|
|
@ -153,6 +159,8 @@ public class ActivityLogic implements IEventHandler{
|
|||
checkActivityIsFinish(user);
|
||||
sendLuckWheelPool(user,iSession);
|
||||
checkActivityOfUser(user, null);
|
||||
//修复部分活动更改开启等级条件的活动,导致没有及时刷新(之前只有升级的时候才刷新)
|
||||
this.refreshLevelActivty(user);
|
||||
}
|
||||
|
||||
public static class Instance {
|
||||
|
|
@ -216,7 +224,7 @@ public class ActivityLogic implements IEventHandler{
|
|||
HashMap<Integer, Long> activityPreMap = globalSystemControl.getActivityPreEnd();
|
||||
if(activityPreMap.containsKey(id)){
|
||||
if(activityPreMap.get(id)>=endTime && activityPreMap.get(id)<=gapEndTime){
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
activity.onActivityPreEnd();
|
||||
|
|
@ -454,6 +462,18 @@ public class ActivityLogic implements IEventHandler{
|
|||
goRewardActivity(user,activityId,builder, isRemove);
|
||||
continue;
|
||||
}
|
||||
// todo 影响所有创角类型活动,已有的暂时不受影响,新增活动注意initactivtiy方法
|
||||
// ActivityMission activityMission = activityMissionMap.get(activityId);
|
||||
// if (activityMission != null) {
|
||||
// continue;
|
||||
// }
|
||||
//牛气冲天活动要判断任务是否存在再刷新,防止任务一直刷新,后续新增的创角活动也要做此判断,防止活动无限刷新
|
||||
if(sGlobalActivity.getType() == ActivityType.COW_FLY_SKY){
|
||||
ActivityMission activityMission = activityMissionMap.get(activityId);
|
||||
if (activityMission != null) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
boolean checked = checkStateAndInitFromActivity(user, activityId);
|
||||
if (checked){
|
||||
continue;
|
||||
|
|
@ -1604,9 +1624,9 @@ public class ActivityLogic implements IEventHandler{
|
|||
}
|
||||
|
||||
/**
|
||||
* 心愿抽奖
|
||||
* 寻仙招募
|
||||
*/
|
||||
public void choiceDrawCard(User user,int activityId,int type) throws Exception {
|
||||
public void choiceDrawCard(ISession iSession,User user,int activityId,int type) throws Exception {
|
||||
// 初始值
|
||||
ActivityProto.choiceDrawCardResponse.Builder build = ActivityProto.choiceDrawCardResponse.newBuilder();
|
||||
SWishActivitySetting setting = getConfig(SWishActivitySetting.class).get(1);
|
||||
|
|
@ -1672,6 +1692,10 @@ public class ActivityLogic implements IEventHandler{
|
|||
int choiceRewardId = user.getActivityManager().getActivityMissionMap().get(activityId).getChoiceRewardIdByActivity(activityId);
|
||||
//限时招募 计次数
|
||||
user.getUserMissionManager().onGameEvent(user, GameEvent.ONE_MISSION_TYPE_CONSUME, MissionType.LIMIT_TIME_CHOICE_CARD, num);
|
||||
//冲榜活动
|
||||
Poster.getPoster().dispatchEvent(new OpenServerActivityEvent(user.getId(),num, RankEnum.XUNXIAN_RANK.getType()));
|
||||
//推送礼包
|
||||
BuyGoodsNewLogic.openPush(iSession, user, PushRechargeType.XUNAXIAN_ZHOAHUAN.getType(), SPackPushConfig.getPushCostItemId(PushRechargeType.XUNAXIAN_ZHOAHUAN.getType()));
|
||||
List<String> list = rewardArrayToList(markRewards);
|
||||
ReportUtil.onReportEvent(user, ReportEventEnum.CHOICE_DRAW_CARD.getType(), choiceRewardId, num, markReward[0], markReward[1], list);
|
||||
// 返回奖励信息
|
||||
|
|
@ -1979,6 +2003,26 @@ public class ActivityLogic implements IEventHandler{
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新加入的心愿法宝聚灵
|
||||
*/
|
||||
public Set<Integer> getDesireOpenTrumpList() {
|
||||
Set<Integer> result = new HashSet<>();
|
||||
// 当前时间戳
|
||||
long now = TimeUtils.now();
|
||||
|
||||
Map<Integer, STrumpLottery> map = STrumpLottery.map;
|
||||
for (STrumpLottery lottery : map.values()) {
|
||||
long start = TimeUtils.stringToTimeLong(lottery.getStartTime(), TimeUtils.Stand_CeHua_Data_format);
|
||||
long end = TimeUtils.stringToTimeLong(lottery.getEndtime(), TimeUtils.Stand_CeHua_Data_format);
|
||||
if (now >= start && now < end){
|
||||
result = Arrays.stream(lottery.getDrop()).boxed().collect(Collectors.toSet());
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新加入的心愿法宝
|
||||
*/
|
||||
|
|
@ -1999,4 +2043,93 @@ public class ActivityLogic implements IEventHandler{
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 天天0.1折购买校验
|
||||
*/
|
||||
public void EveryDayDiscountBuyCheck(User user, int goodId, int update) throws ErrorTableException {
|
||||
long now = TimeUtils.now();
|
||||
Map<Integer, SEveryDayGift> giftMap = SEveryDayGift.giftactivitymap.get(goodId);
|
||||
if (giftMap == null || giftMap.isEmpty()){
|
||||
return;
|
||||
}
|
||||
for (Map.Entry<Integer, SEveryDayGift> entry : giftMap.entrySet()) {
|
||||
Integer activityId = entry.getKey();
|
||||
ActivityMission mission = user.getActivityManager().getActivityMissionMap().get(activityId);
|
||||
if (mission == null){
|
||||
LOGGER.error("天天0.1折扣活动,查验购买次数退出,玩家没有活动信息,uid:{},活动id:{},耗时:{}",user.getId(), activityId,TimeUtils.now()-now);
|
||||
continue;
|
||||
}
|
||||
EveryDayDiscountBuyCheckAndUpdate(user, activityId, entry.getValue().getId(), update);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 天天0.1折购买校验并消耗
|
||||
*/
|
||||
public void EveryDayDiscountBuyCheckAndUpdate(User user, int activityId, int missionId, int update) throws ErrorTableException {
|
||||
long now = TimeUtils.now();
|
||||
SEveryDayGift dayGift = SEveryDayGift.map.get(missionId);
|
||||
|
||||
ActivityMission mission = user.getActivityManager().getActivityMissionMap().get(activityId);
|
||||
ActivityProgressInfo progressInfo = mission.getActivityMissionMap().get(missionId);
|
||||
if (progressInfo == null){
|
||||
LOGGER.error("天天0.1折扣活动,查验购买次数退出,没有商品信息,uid:{},活动id:{},商品id:{},耗时:{}",user.getId(), activityId, missionId, TimeUtils.now()-now);
|
||||
throw new ErrorTableException(183);// 档位不存在
|
||||
}
|
||||
if (progressInfo.getState() != 1){
|
||||
LOGGER.error("天天0.1折扣活动,查验购买次数退出,商品为解锁,uid:{},活动id:{},商品id:{},耗时:{}",user.getId(), activityId, missionId, TimeUtils.now()-now);
|
||||
throw new ErrorTableException(184);// 档位未解锁
|
||||
}
|
||||
if (progressInfo.getProgrss() <= 0){
|
||||
LOGGER.error("天天0.1折扣活动,查验购买次数退出,商品够吗次数不足,uid:{},活动id:{},商品id:{},耗时:{}",user.getId(), activityId, missionId, TimeUtils.now()-now);
|
||||
throw new ErrorTableException(185);// 购买次数不足
|
||||
}
|
||||
// 消耗
|
||||
if (update == 1){
|
||||
LOGGER.error("天天0.1折扣活动,查验购买次数消耗,uid:{},活动id:{},商品id:{}",user.getId(), activityId, missionId);
|
||||
// 消耗默认次数
|
||||
if (progressInfo.getProgrss() == dayGift.getLimit()){
|
||||
int packId = ToolsUtil.getPackId(missionId);
|
||||
ActivityProgressInfo packInfo = mission.getActivityMissionMap().get(packId);
|
||||
if (packInfo != null && packInfo.getProgrss() > 0){
|
||||
packInfo.setProgrss(packInfo.getProgrss() - 1);
|
||||
mission.getActivityMissionMap().put(packId,packInfo);
|
||||
}
|
||||
}
|
||||
// 道具日志记录
|
||||
ItemLogic.getInstance().addItemLog(new ItemLog(user, 1, BIReason.EVERYDAY_DISCOUNT_COST_MISSION_COUNT,dayGift.getItemID(), progressInfo.getProgrss(), progressInfo.getProgrss()-1));
|
||||
progressInfo.setProgrss(progressInfo.getProgrss() - 1);
|
||||
// 更新数据库
|
||||
mission.getActivityMissionMap().put(missionId,progressInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新因为活动等级降低的活动,防止只有升级的时候才会刷新
|
||||
* @param user
|
||||
*/
|
||||
public void refreshLevelActivty(User user){
|
||||
List<SGlobalActivity> sGlobalActivities = SGlobalActivity.sGlobalActivityMapByOpenRules.getOrDefault(2,new ArrayList<>(0));
|
||||
for(SGlobalActivity sGlobalActivity : sGlobalActivities){
|
||||
int[] openRules = sGlobalActivity.getOpenRules();
|
||||
if(openRules == null || openRules.length <=0){
|
||||
continue;
|
||||
}
|
||||
ActivityMission activityMission = user.getActivityManager().getActivityMissionMap().get(sGlobalActivity.getId());
|
||||
if(activityMission!=null && activityMission.getActivityState() == ActivityType.UNOPEN_STATE){
|
||||
if(user.getPlayerInfoManager().getLevel()>=openRules[1]){
|
||||
activityMission.setActivityState(ActivityType.OPEN_STATE);
|
||||
ActivityLogic.getInstance().sendActivityInfo(user,sGlobalActivity.getId());
|
||||
Poster.getPoster().dispatchEvent(new ActivityStateChangeEvent(user.getId(),sGlobalActivity.getId(),ActivityType.OPEN_STATE));
|
||||
if(sGlobalActivity.getType() == ActivityType.GrowthFund){
|
||||
ActivityTypeEnum.getActicityById(sGlobalActivity.getId()).update(user,user.getPlayerInfoManager().getLevel());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,13 @@ package com.ljsd.jieling.logic.activity.event;
|
|||
|
||||
public class OpenServerActivityEvent implements IEvent {
|
||||
private int uid;
|
||||
private int cost;//活动相关计次,没有传0
|
||||
private int rankType;//冲榜的活动类型,新添加的计次活动
|
||||
|
||||
public OpenServerActivityEvent(int uid) {
|
||||
public OpenServerActivityEvent(int uid,int cost,int rankType) {
|
||||
this.uid = uid;
|
||||
this.cost = cost;
|
||||
this.rankType = rankType;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
|
|
@ -14,4 +18,20 @@ public class OpenServerActivityEvent implements IEvent {
|
|||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public void setCost(int cost) {
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
public int getRankType() {
|
||||
return rankType;
|
||||
}
|
||||
|
||||
public void setRankType(int rankType) {
|
||||
this.rankType = rankType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.ljsd.jieling.logic.dao.TeamEnum;
|
|||
import com.ljsd.jieling.logic.dao.TeamPosHeroInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -59,7 +60,7 @@ public class SaveHeroForceEventHandler implements IEventHandler {
|
|||
CrossServiceLogic.getInstance().saveBasicPlayerToRedis(user);
|
||||
}
|
||||
// 开服冲榜
|
||||
Poster.getPoster().dispatchEvent(new OpenServerActivityEvent(uid));
|
||||
Poster.getPoster().dispatchEvent(new OpenServerActivityEvent(uid,0, RankEnum.HERO_STAR_RANK.getType()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public enum RankEnum {
|
|||
EXPERT_RANK(21,RedisKey.EXPERT_RANK,GoldRank::new,false),// 达人排行榜 param1:活动进度 param2:无 param3:无
|
||||
FORCE_CURR_RANK(22,RedisKey.FORCE_CURR_RANK,ForceCurrRank::new,false),//新战力排行榜 param1:人物战力 param2:无 param3:无
|
||||
@Deprecated
|
||||
ARENA_RANK(23,RedisKey.ARENA_RANK,ArenaRank::new,false),// 竞技场排行榜 param1:竞技场积分 param2:无 param3:无
|
||||
// ARENA_RANK(23,RedisKey.ARENA_RANK,ArenaRank::new,false),// 竞技场排行榜 param1:竞技场积分 param2:无 param3:无
|
||||
SITUATION_RANK(24,RedisKey.SITUATION_RANK,SituationRank::new,false),//param1:通关次数 param2:无 param3:无
|
||||
GUILD_CHALLENGE_RANK(26,RedisKey.GUILD_CHALLENGE_RANK,GuildChallengeRank::new,false),//param1:伤害 param2:无 param3:无
|
||||
GUILD_SHEJI_SCORE_RANK(27,RedisKey.GUILD_SHEJI_SCORE_RANK,GuildSheJiScoreRank::new,false),//param1:公会社稷贡献 param2:无 param3:无
|
||||
|
|
@ -40,6 +40,14 @@ public enum RankEnum {
|
|||
EQUIP_SCORE_RANK(102, RedisKey.EQUIP_SCORE_RANK,MainLevelRank::new,false),//装备排行榜
|
||||
SOUL_SEAL_RANK(103, RedisKey.SOUL_SEAL_RANK,MainLevelRank::new,false),//魂印排行榜
|
||||
NEW_ARENA_RANK(105, RedisKey.NEW_ARENA_RANK, NewArenaRank::new, true),//新竞技场排行榜
|
||||
MONEY_RANK(201,RedisKey.MONEY_RANK,MainLevelRank::new,false),//现金点券消耗排行榜
|
||||
HERO_RANK(202,RedisKey.HERO_RANK,MainLevelRank::new,false),//英雄召唤排行榜
|
||||
FABAO_RANK(203,RedisKey.FABAO_RANK,MainLevelRank::new,false),//法宝召唤排行榜
|
||||
XUNXIAN_RANK(204,RedisKey.XUNXIAN_RANK,MainLevelRank::new,false),//现寻仙招募排行榜
|
||||
CROSS_MONEY_RANK(205,RedisKey.CROSS_MONEY_RANK,MainLevelRank::new,true),//跨服现金点券消耗排行榜
|
||||
CROSS_HERO_RANK(206,RedisKey.CROSS_HERO_RANK,MainLevelRank::new,true),//跨服英雄召唤排行榜
|
||||
CROSS_FABAO_RANK(207,RedisKey.CROSS_FABAO_RANK,MainLevelRank::new,true),//跨服法宝召唤排行榜
|
||||
CROSS_XUNXIAN_RANK(208,RedisKey.CROSS_XUNXIAN_RANK,MainLevelRank::new,true),//跨寻仙招募排行榜
|
||||
|
||||
//***************************************** 以下开服冲榜活动保留数据排行榜 *****************************************//
|
||||
BACK_HERO_STAR_RANK(100101,"BACK_HERO_STAR_RANK",MainLevelRank::new,false),//英雄星级排行榜
|
||||
|
|
@ -49,6 +57,14 @@ public enum RankEnum {
|
|||
BACK_SOUL_SEAL_RANK(100103, "BACK_SOUL_SEAL_RANK",MainLevelRank::new,false),//魂印排行榜
|
||||
BACK_MONSTER_ATTACK_RANK(1004,"BACK_MONSTER_ATTACK_RANK",MonsterAttackRank::new,false),//心魔排行榜
|
||||
BACK_SHAN_HE_SHE_JI_STAR_RANK(10030,"BACK_SHAN_HE_SHE_JI_STAR_RANK",ShanHeSheJiTuStarRank::new,false),//山河社稷星星排行榜
|
||||
BACK_MONEY_RANK(100201,RedisKey.BACK_MONEY_RANK,MainLevelRank::new,false),//备份现金点券消耗排行榜
|
||||
BACK_HERO_RANK(100202,RedisKey.BACK_HERO_RANK,MainLevelRank::new,false),//备份英雄召唤排行榜
|
||||
BACK_FABAO_RANK(100203,RedisKey.BACK_FABAO_RANK,MainLevelRank::new,false),//备份法宝召唤排行榜
|
||||
BACK_XUNXIAN_RANK(100204,RedisKey.BACK_XUNXIAN_RANK,MainLevelRank::new,false),//备份寻仙招募排行榜
|
||||
CROSS_BACK_MONEY_RANK(100205,RedisKey.CROSS_BACK_MONEY_RANK,MainLevelRank::new,true),//跨服备份现金点券消耗排行榜
|
||||
CROSS_BACK_HERO_RANK(100206,RedisKey.CROSS_BACK_HERO_RANK,MainLevelRank::new,true),//跨服备份英雄召唤排行榜
|
||||
CROSS_BACK_FABAO_RANK(100207,RedisKey.CROSS_BACK_FABAO_RANK,MainLevelRank::new,true),//跨服备份法宝召唤排行榜
|
||||
CROSS_BACK_XUNXIAN_RANK(100208,RedisKey.CROSS_BACK_XUNXIAN_RANK,MainLevelRank::new,true),//跨服备份寻仙招募排行榜
|
||||
|
||||
//***************************************** 以下为跨服排行榜 *****************************************//
|
||||
GUILD_RED_PACKAGE_RANK(13,RedisKey.GUILD_RED_PACKAGE_RANK,GuildRedPackageRank::new,true),//param1:红包总价格 param2:无 param3:无
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
package config;
|
||||
|
||||
import manager.STableManager;
|
||||
import manager.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="EveryDayGift")
|
||||
public class SEveryDayGift implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int globalActivity;
|
||||
|
||||
private int rechargeID;
|
||||
|
||||
private int[][] condition;
|
||||
|
||||
private int probability;
|
||||
|
||||
private int limit;
|
||||
|
||||
private int maxLimit;
|
||||
|
||||
private int itemID;
|
||||
|
||||
public static Map<Integer, SEveryDayGift> map = new HashMap<>();
|
||||
|
||||
public static Map<Integer, Map<Integer, SEveryDayGift>> activitymap = new HashMap<>();
|
||||
|
||||
public static Map<Integer, Map<Integer, SEveryDayGift>> activitygiftmap = new HashMap<>();
|
||||
|
||||
public static Map<Integer, Map<Integer, SEveryDayGift>> giftactivitymap = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
map = STableManager.getConfig(SEveryDayGift.class);
|
||||
for (SEveryDayGift value : map.values()) {
|
||||
activitymap.putIfAbsent(value.getGlobalActivity(), new HashMap<>());
|
||||
activitymap.get(value.getGlobalActivity()).put(value.getId(), value);
|
||||
|
||||
activitygiftmap.putIfAbsent(value.getGlobalActivity(), new HashMap<>());
|
||||
activitygiftmap.get(value.getGlobalActivity()).put(value.getRechargeID(), value);
|
||||
|
||||
giftactivitymap.putIfAbsent(value.getRechargeID(), new HashMap<>());
|
||||
giftactivitymap.get(value.getRechargeID()).put(value.getGlobalActivity(), value);
|
||||
}
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getGlobalActivity() {
|
||||
return globalActivity;
|
||||
}
|
||||
|
||||
public int getRechargeID() {
|
||||
return rechargeID;
|
||||
}
|
||||
|
||||
public int[][] getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public int getProbability() {
|
||||
return probability;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public int getMaxLimit() {
|
||||
return maxLimit;
|
||||
}
|
||||
|
||||
public int getItemID() {
|
||||
return itemID;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -24,10 +24,13 @@ public class SPackPushConfig implements BaseConfig {
|
|||
public static Map<Integer,SPackPushConfig> configMap;
|
||||
public static Map<Integer,Map<Integer,List<SPackPushConfig>>> conditionMap;
|
||||
|
||||
public static Map<Integer,Integer> costItemIdMap;
|
||||
|
||||
public void init() throws Exception {
|
||||
Map<Integer, SPackPushConfig> config = STableManager.getConfig(SPackPushConfig.class);
|
||||
Map<Integer,SPackPushConfig> tempConfigMap = new HashMap<>();
|
||||
Map<Integer,Map<Integer,List<SPackPushConfig>>> tempConditionMap = new HashMap<>();
|
||||
Map<Integer,Integer> tempCostItemIdMap = new HashMap<>();
|
||||
for(SPackPushConfig newConfig : config.values()){
|
||||
tempConfigMap.put(newConfig.getId(),newConfig);
|
||||
int[] conditionId = newConfig.getConditionId();
|
||||
|
|
@ -40,6 +43,7 @@ public class SPackPushConfig implements BaseConfig {
|
|||
tempConditionMap.get(conditionId[0]).put(conditionId[1],list);
|
||||
}
|
||||
}else{
|
||||
tempCostItemIdMap.put(conditionId[0],conditionId[1]);
|
||||
Map<Integer,List<SPackPushConfig>> map = new HashMap<>();
|
||||
List<SPackPushConfig> list = new ArrayList<>();
|
||||
list.add(newConfig);
|
||||
|
|
@ -50,6 +54,7 @@ public class SPackPushConfig implements BaseConfig {
|
|||
if(configMap == null){
|
||||
configMap = tempConfigMap;
|
||||
conditionMap = tempConditionMap;
|
||||
costItemIdMap = tempCostItemIdMap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -114,4 +119,16 @@ public class SPackPushConfig implements BaseConfig {
|
|||
public int getPrivateCD() {
|
||||
return privateCD;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取特定抽取条件需要检测的道具id
|
||||
* @param conditionType
|
||||
* @return
|
||||
*/
|
||||
public static int getPushCostItemId(int conditionType){
|
||||
if(costItemIdMap.containsKey(conditionType)){
|
||||
return costItemIdMap.get(conditionType);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package config;
|
||||
|
||||
import manager.STableManager;
|
||||
import manager.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="TrumpLottery")
|
||||
public class STrumpLottery implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int[] drop;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endtime;
|
||||
|
||||
public static Map<Integer, STrumpLottery> map = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
map = STableManager.getConfig(STrumpLottery.class);
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int[] getDrop() {
|
||||
return drop;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public String getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue