跨服十绝阵暂时关闭
parent
931db8e069
commit
1bdb4587d7
|
@ -74,7 +74,15 @@ public class DeathPathLogic {
|
|||
/**
|
||||
* 是否跨服
|
||||
*/
|
||||
private int groupId;
|
||||
private int groupId = -1;
|
||||
|
||||
public int getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(int groupId) {
|
||||
this.groupId = -1;
|
||||
}
|
||||
|
||||
private BlockingQueue<DeathPathTask> tasks = new BlockingUniqueQueue<>();
|
||||
|
||||
|
@ -190,9 +198,9 @@ public class DeathPathLogic {
|
|||
if(dayStats==-1){
|
||||
//领奖阶段
|
||||
currStatus = 2;
|
||||
if(groupId==0 && isOpenCrossDeathPath()){
|
||||
groupId = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
LOGGER.info("========================跨服十绝阵开启:{}",groupId);
|
||||
if(getGroupId()==0 && isOpenCrossDeathPath()){
|
||||
setGroupId(GlobleSystemLogic.getInstence().getCrossGroup());
|
||||
LOGGER.info("========================跨服十绝阵开启:{}",getGroupId());
|
||||
}
|
||||
}else if (dayStats==1){
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
@ -221,8 +229,8 @@ public class DeathPathLogic {
|
|||
case 0:
|
||||
try {
|
||||
deleteDeathPathInfo();
|
||||
groupId = 0;
|
||||
LOGGER.info("========================跨服十绝阵关闭:{}",groupId);
|
||||
setGroupId(0);
|
||||
LOGGER.info("========================跨服十绝阵关闭:{}",getGroupId());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -236,8 +244,8 @@ public class DeathPathLogic {
|
|||
taskExecutor.start();
|
||||
}
|
||||
if(isOpenCrossDeathPath()){
|
||||
groupId = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
LOGGER.info("========================跨服十绝阵开启:{}",groupId);
|
||||
setGroupId(GlobleSystemLogic.getInstence().getCrossGroup());
|
||||
LOGGER.info("========================跨服十绝阵开启:{}",getGroupId());
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
@ -306,7 +314,7 @@ public class DeathPathLogic {
|
|||
String key;
|
||||
// 是否是跨服
|
||||
Set<ZSetOperations.TypedTuple<String>> zSetReverseRangeWithScores;
|
||||
if (groupId > 0) {
|
||||
if (getGroupId() > 0) {
|
||||
key = guildRank.getCrossRedisKey();
|
||||
zSetReverseRangeWithScores = RedisUtil.getInstence().getZsetreverseRangeWithScores(key, String.valueOf(i), 0, 0,false);
|
||||
LOGGER.info("========================获取十绝阵内部信息,跨服:{}",uid);
|
||||
|
@ -365,7 +373,7 @@ public class DeathPathLogic {
|
|||
FightRecordLogic.getInstance().addRecordMap(user,fightData);
|
||||
|
||||
//更新排行榜数据
|
||||
tasks.offer(new DeathPathTask(uid,guildId,damage,pathId,groupId));
|
||||
tasks.offer(new DeathPathTask(uid,guildId,damage,pathId,getGroupId()));
|
||||
//挑战次数记录
|
||||
RedisUtil.getInstence().increment(RedisKey.getKey(RedisKey.DEATH_PATH_CHALLENGE_COUNT,String.valueOf(uid),false));
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(guildId);
|
||||
|
@ -553,14 +561,14 @@ public class DeathPathLogic {
|
|||
//根据排名进行随机奖励
|
||||
int rank;
|
||||
AbstractRank rankEnum = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
if(groupId>0){
|
||||
if(getGroupId()>0){
|
||||
String key = rankEnum.getCrossRedisKey();
|
||||
rank = RedisUtil.getInstence().getZSetreverseRank(key, "", String.valueOf(user.getPlayerInfoManager().getGuildId()),false).intValue();
|
||||
LOGGER.info("==================获取十绝阵奖励,跨服,分组:{},玩家:{}",groupId,uid);
|
||||
LOGGER.info("==================获取十绝阵奖励,跨服,分组:{},玩家:{}",getGroupId(),uid);
|
||||
}else {
|
||||
String key = rankEnum.getRedisKey();
|
||||
rank = RedisUtil.getInstence().getZSetreverseRank(key, "", String.valueOf(user.getPlayerInfoManager().getGuildId()),true).intValue();
|
||||
LOGGER.info("==================获取十绝阵奖励,本地,分组:{},玩家:{}",groupId,uid);
|
||||
LOGGER.info("==================获取十绝阵奖励,本地,分组:{},玩家:{}",getGroupId(),uid);
|
||||
}
|
||||
if(rank==-1||rank==0){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
|
@ -607,10 +615,10 @@ public class DeathPathLogic {
|
|||
String mailContent = SErrorCodeEerverConfig.getI18NMessage("guildwar_reward_txt");
|
||||
// 本服id
|
||||
int serverId = GameApplication.serverId;
|
||||
if(groupId > 0){
|
||||
if(getGroupId() > 0){
|
||||
//是否跨服
|
||||
LOGGER.info("===================跨服十绝阵排行榜结束处理,分组:{},区服:{}",groupId,serverId);
|
||||
Map<Integer, Integer> map = CrossDeathPathLogic.getInstance().crossDeathPathReward(groupId, serverId);
|
||||
LOGGER.info("===================跨服十绝阵排行榜结束处理,分组:{},区服:{}",getGroupId(),serverId);
|
||||
Map<Integer, Integer> map = CrossDeathPathLogic.getInstance().crossDeathPathReward(getGroupId(), serverId);
|
||||
if(map.isEmpty()){
|
||||
LOGGER.error("===================无跨服十绝阵排行信息");
|
||||
return;
|
||||
|
@ -628,7 +636,7 @@ public class DeathPathLogic {
|
|||
}
|
||||
}
|
||||
}else {
|
||||
LOGGER.info("===================本地十绝阵排行榜结束处理,分组:{},区服:{}",groupId,serverId);
|
||||
LOGGER.info("===================本地十绝阵排行榜结束处理,分组:{},区服:{}",getGroupId(),serverId);
|
||||
//本服发奖
|
||||
AbstractRank guildRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
AbstractRank personRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_PERSON_RANK.getType());
|
||||
|
|
Loading…
Reference in New Issue