十绝阵推送提交
parent
142dcb6970
commit
31150361c1
|
@ -318,6 +318,9 @@ public class DeathPathLogic {
|
|||
guildTotalRank.addRank(task.getGuildId(),"",task.getDamage(),1);
|
||||
//操作每个关的个人数据
|
||||
doRankAdd(personRank,guildRank,task);
|
||||
//第一名推送
|
||||
sendChangeIndication(task.getGuildId(),task.getPathId());
|
||||
|
||||
}else{
|
||||
ZSetOperations.TypedTuple<String> next = iterator.next();
|
||||
firstGuildId = Integer.valueOf(next.getValue());
|
||||
|
@ -329,6 +332,8 @@ public class DeathPathLogic {
|
|||
if(currFirstGuildId==firstGuildId){
|
||||
guildTotalRank.addRank(task.getGuildId(),"",task.getDamage());
|
||||
}else{
|
||||
//第一名更改时推送
|
||||
sendChangeIndication(currFirstGuildId,task.getPathId());
|
||||
guildTotalRank.addRank(currFirstGuildId,"",task.getDamage(),1);
|
||||
guildTotalRank.addRank(firstGuildId,"",0,-1);
|
||||
}
|
||||
|
@ -336,6 +341,23 @@ 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();
|
||||
|
||||
GuildLogic.sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.DEATH_PATH_FIRST_CHANGE_INDICATION,indication);
|
||||
});
|
||||
LOGGER.info("信息修改,需要推送");
|
||||
}
|
||||
|
||||
|
||||
//判断改阵排行榜中是否有我打过的信息,没有加个人数
|
||||
private void doRankAdd(AbstractRank personRank,AbstractRank guildRank ,DeathPathTask task){
|
||||
if(personRank.getScoreById(task.getUid(),String.valueOf(task.getPathId()))==-1){
|
||||
|
|
Loading…
Reference in New Issue