跨服十绝阵
parent
df7a84b206
commit
deb937f6cc
|
@ -107,6 +107,8 @@ public class CrossDeathPathLogic {
|
|||
if(!"".equals(before)){
|
||||
redisUtil.incrementZsetScore(totalGuild.getCrossRedisKey(),"",before, -1,false);
|
||||
}
|
||||
// 推送
|
||||
DeathPathLogic.getInstance().sendChangeIndication(guildId,pathId);
|
||||
}
|
||||
AbstractRank totalPerson = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_PERSON_RANK.getType());
|
||||
// 个人单个排行
|
||||
|
|
|
@ -466,7 +466,7 @@ public class DeathPathLogic {
|
|||
//操作每个关的个人数据
|
||||
doRankAdd(personRank,guildRank,task);
|
||||
//第一名推送
|
||||
sendChangeIndication(task.getGuildId(),task.getPathId());
|
||||
getInstance().sendChangeIndication(task.getGuildId(),task.getPathId());
|
||||
|
||||
}else{
|
||||
ZSetOperations.TypedTuple<String> next = iterator.next();
|
||||
|
@ -480,7 +480,7 @@ public class DeathPathLogic {
|
|||
guildTotalRank.addRank(task.getGuildId(),"",task.getDamage());
|
||||
}else{
|
||||
//第一名更改时推送
|
||||
sendChangeIndication(currFirstGuildId,task.getPathId());
|
||||
getInstance().sendChangeIndication(currFirstGuildId,task.getPathId());
|
||||
guildTotalRank.addRank(currFirstGuildId,"",task.getDamage(),1);
|
||||
guildTotalRank.addRank(firstGuildId,"",0,-1);
|
||||
}
|
||||
|
@ -488,27 +488,6 @@ public class DeathPathLogic {
|
|||
}
|
||||
}
|
||||
|
||||
private void sendChangeIndication(int currFirstGuildId,int pathId){
|
||||
AbstractRank guildTotalRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
Set<ZSetOperations.TypedTuple<String>> allGuild = guildTotalRank.getRankByKey("", 0, -1);
|
||||
String name = GuilidManager.guildInfoMap.get(currFirstGuildId).getName();
|
||||
allGuild.forEach(n-> {
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(Integer.parseInt(n.getValue()));
|
||||
|
||||
Family.DeathPathInfo info = Family.DeathPathInfo.newBuilder().setGuildName(name).setGid(currFirstGuildId).setPathId(pathId).build();
|
||||
|
||||
Family.DeathPathFirstChangeIndication indication = Family.DeathPathFirstChangeIndication.newBuilder().setChangeInfo(info).build();
|
||||
|
||||
if(guildInfo!=null){
|
||||
GuildLogic.sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.DEATH_PATH_FIRST_CHANGE_INDICATION,indication);
|
||||
}else{
|
||||
LOGGER.error("Exception公会信息为空,不能发送推送,公会id为{}",n.getValue());
|
||||
}
|
||||
});
|
||||
LOGGER.info("信息修改,需要推送");
|
||||
}
|
||||
|
||||
|
||||
//判断改阵排行榜中是否有我打过的信息,没有加个人数
|
||||
private void doRankAdd(AbstractRank personRank,AbstractRank guildRank ,DeathPathTask task){
|
||||
if(personRank.getScoreById(task.getUid(),String.valueOf(task.getPathId()))==-1){
|
||||
|
@ -520,6 +499,26 @@ public class DeathPathLogic {
|
|||
}
|
||||
}
|
||||
|
||||
public void sendChangeIndication(int currFirstGuildId,int pathId){
|
||||
AbstractRank guildTotalRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
Set<ZSetOperations.TypedTuple<String>> allGuild = guildTotalRank.getRankByKey("", 0, -1);
|
||||
String name = GuilidManager.guildInfoMap.get(currFirstGuildId).getName();
|
||||
allGuild.forEach(n-> {
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(Integer.parseInt(n.getValue()));
|
||||
|
||||
Family.DeathPathInfo info = Family.DeathPathInfo.newBuilder().setGuildName(name).setGid(currFirstGuildId).setPathId(pathId).build();
|
||||
|
||||
Family.DeathPathFirstChangeIndication indication = Family.DeathPathFirstChangeIndication.newBuilder().setChangeInfo(info).build();
|
||||
|
||||
if(guildInfo!=null){
|
||||
GuildLogic.sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.DEATH_PATH_FIRST_CHANGE_INDICATION,indication);
|
||||
}else{
|
||||
LOGGER.error("Exception公会信息为空,不能发送推送,公会id为{}",n.getValue());
|
||||
}
|
||||
});
|
||||
LOGGER.info("信息修改,需要推送");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有翻拍信息
|
||||
* @param session
|
||||
|
|
Loading…
Reference in New Issue