跨服十绝阵
parent
e62e7a4ed9
commit
081a3bc8f0
|
@ -171,7 +171,11 @@ public class RedisUtil {
|
|||
}
|
||||
|
||||
public <T> T get(String type,String key,Class<T> tClass) {
|
||||
String rkey = getKey(type, key);
|
||||
return get(type,key,tClass,true);
|
||||
}
|
||||
|
||||
public <T> T get(String type,String key,Class<T> tClass,boolean judge) {
|
||||
String rkey = getKey(type, key, judge);
|
||||
String s = redisTemplate.opsForValue().get(rkey);
|
||||
if(StringUtil.isEmpty(s)){
|
||||
return null;
|
||||
|
@ -269,11 +273,13 @@ public class RedisUtil {
|
|||
}
|
||||
|
||||
public <T> void set(String type, String rkey, T t) {
|
||||
String key = getKey(type, rkey);
|
||||
redisTemplate.opsForValue().set(key, gson.toJson(t));
|
||||
set(type,rkey,t,true);
|
||||
}
|
||||
|
||||
|
||||
public <T> void set(String type, String rkey, T t, boolean judge) {
|
||||
String key = getKey(type, rkey,judge);
|
||||
redisTemplate.opsForValue().set(key, gson.toJson(t));
|
||||
}
|
||||
|
||||
public boolean lock(String lockKey, long lockExpireMils) {
|
||||
return (Boolean) redisTemplate.execute((RedisCallback) connection -> {
|
||||
|
|
|
@ -81,7 +81,7 @@ public class DeathPathLogic {
|
|||
}
|
||||
|
||||
public void setGroupId(int groupId) {
|
||||
this.groupId = -1;
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
private BlockingQueue<DeathPathTask> tasks = new BlockingUniqueQueue<>();
|
||||
|
@ -417,19 +417,22 @@ public class DeathPathLogic {
|
|||
}
|
||||
}
|
||||
}
|
||||
private void taskDoExecute(DeathPathTask task){
|
||||
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().get(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, String.valueOf(task.getGuildId()), DeathChallengeCount.class);
|
||||
private void addChallengeCount(DeathPathTask task){
|
||||
DeathChallengeCount countInfo = getInstance().getDeathChallengeCount(task.getGuildId());
|
||||
if (countInfo==null){
|
||||
countInfo = new DeathChallengeCount();
|
||||
countInfo.putUserReward(task.getUid(),new DeathReward());
|
||||
RedisUtil.getInstence().set(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, String.valueOf(task.getGuildId()),countInfo);
|
||||
}else if(!countInfo.getUserReward().containsKey(task.getUid())) {
|
||||
countInfo.putUserReward(task.getUid(),new DeathReward());
|
||||
RedisUtil.getInstence().set(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, String.valueOf(task.getGuildId()), countInfo);
|
||||
}
|
||||
|
||||
getInstance().setDeathChallengeCount(task.getGuildId(),countInfo);
|
||||
}
|
||||
|
||||
private void taskDoExecute(DeathPathTask task){
|
||||
addChallengeCount(task);
|
||||
//跨服
|
||||
if(task.getGroupId()>0){
|
||||
if(getInstance().getGroupId()>0){
|
||||
try {
|
||||
CrossDeathPathLogic.getInstance().addCrossDeathPathRank(task.getUid(),task.getDamage(),task.getGuildId(),task.getPathId());
|
||||
LOGGER.info("==================跨服十绝阵上榜处理:{}",task.toString());
|
||||
|
@ -520,7 +523,7 @@ public class DeathPathLogic {
|
|||
*/
|
||||
public void getAllRewardInfo(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(session.getUid());
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().get(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, String.valueOf(user.getPlayerInfoManager().getGuildId()), DeathChallengeCount.class);
|
||||
DeathChallengeCount countInfo = getDeathChallengeCount(user.getPlayerInfoManager().getGuildId());
|
||||
Family.GetAllDeathPathRewardInfoResponse.Builder response = Family.GetAllDeathPathRewardInfoResponse.newBuilder();
|
||||
if(countInfo==null){
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response.build(),true);
|
||||
|
@ -550,7 +553,7 @@ public class DeathPathLogic {
|
|||
User user = UserManager.getUser(uid);
|
||||
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().get(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, String.valueOf(guildId), DeathChallengeCount.class);
|
||||
DeathChallengeCount countInfo = getDeathChallengeCount(guildId);
|
||||
if (countInfo==null||!countInfo.getUserReward().containsKey(uid)){
|
||||
//您所在的公会或您没有达到领奖条件
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
|
@ -576,7 +579,7 @@ public class DeathPathLogic {
|
|||
}
|
||||
int[] reward = getRewardByRank(rank);
|
||||
countInfo.putUserReward(uid,new DeathReward(reward[0],reward[1],position,user.getPlayerInfoManager().getNickName()));
|
||||
RedisUtil.getInstence().set(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, String.valueOf(guildId),countInfo);
|
||||
setDeathChallengeCount(guildId,countInfo);
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, new int[][]{reward}, BIReason.DEATH_PAHT_RANDOM_REWARD);
|
||||
Family.DoRewardDeathPathResponse response =Family.DoRewardDeathPathResponse.newBuilder().setDrop(drop).build();
|
||||
Family.RewardInfo info = Family.RewardInfo.newBuilder().setUid(uid).setItemCount(reward[1]).setItemId(reward[0]).setPosition(position).setUsername(user.getPlayerInfoManager().getNickName()).build();
|
||||
|
@ -609,39 +612,28 @@ public class DeathPathLogic {
|
|||
* @throws Exception
|
||||
*/
|
||||
public void deleteDeathPathInfo() throws Exception {
|
||||
// redis工具
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
// 本服id
|
||||
int serverId = GameApplication.serverId;
|
||||
Map<Integer, Integer> map;
|
||||
if(getGroupId() > 0){
|
||||
//是否跨服
|
||||
LOGGER.info("===================跨服十绝阵排行榜结束处理,分组:{},区服:{}",getGroupId(),serverId);
|
||||
Map<Integer, Integer> map = CrossDeathPathLogic.getInstance().crossDeathPathReward(getGroupId(), serverId);
|
||||
if(map.isEmpty()){
|
||||
LOGGER.error("===================无跨服十绝阵排行信息");
|
||||
return;
|
||||
}
|
||||
for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
|
||||
DeathChallengeCount reward = redisUtil.getObject(serverId+":"+RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT+":"+entry.getValue(), DeathChallengeCount.class);
|
||||
int[] rewardByRank = getRewardByRank(entry.getKey());
|
||||
deathPathSendMail(reward,rewardByRank);
|
||||
}
|
||||
map = CrossDeathPathLogic.getInstance().crossDeathPathReward(getGroupId(), serverId);
|
||||
}else {
|
||||
LOGGER.info("===================本地十绝阵排行榜结束处理,分组:{},区服:{}",getGroupId(),serverId);
|
||||
//本服发奖
|
||||
AbstractRank guildRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
Set<ZSetOperations.TypedTuple<String>> guildRankSet = guildRank.getRankByKey("", 0, -1);
|
||||
if(guildRankSet.isEmpty()){
|
||||
return;
|
||||
}
|
||||
int index = 1;
|
||||
for(ZSetOperations.TypedTuple<String> item:guildRankSet){
|
||||
String key = RedisKey.getKey(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, item.getValue(),false);
|
||||
DeathChallengeCount reward = redisUtil.getObject(key, DeathChallengeCount.class);
|
||||
int[] rewardByRank = getRewardByRank(index);
|
||||
deathPathSendMail(reward,rewardByRank);
|
||||
index++;
|
||||
}
|
||||
LOGGER.info("===================本地十绝阵排行榜结束处理,分组:{},区服:{}",getGroupId(),serverId);
|
||||
map = deathPathReward();
|
||||
}
|
||||
|
||||
if(map.isEmpty()){
|
||||
LOGGER.error("===================无跨服十绝阵排行信息");
|
||||
return;
|
||||
}
|
||||
// 循环发奖
|
||||
for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
|
||||
DeathChallengeCount reward = getDeathChallengeCount(entry.getValue());
|
||||
int[] rewardByRank = getRewardByRank(entry.getKey());
|
||||
deathPathSendMail(reward,rewardByRank);
|
||||
}
|
||||
|
||||
Cursor<String> cursor = RedisUtil.getInstence().scan(serverId +":DEATH_PATH*", -1);
|
||||
|
@ -654,6 +646,26 @@ public class DeathPathLogic {
|
|||
cursor.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地奖励排行
|
||||
* @return
|
||||
*/
|
||||
private Map<Integer, Integer> deathPathReward(){
|
||||
HashMap<Integer, Integer> hashMap = new HashMap<>();
|
||||
//本服发奖
|
||||
AbstractRank guildRank = RankContext.getRankEnum(RankEnum.DEATH_PATH_TOTAL_GUILD_RANK.getType());
|
||||
Set<ZSetOperations.TypedTuple<String>> guildRankSet = guildRank.getRankByKey("", 0, -1);
|
||||
if(guildRankSet.isEmpty()){
|
||||
return hashMap;
|
||||
}
|
||||
int index = 1;
|
||||
for(ZSetOperations.TypedTuple<String> item:guildRankSet){
|
||||
index++;
|
||||
hashMap.put(index,Integer.parseInt(item.getValue()));
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
|
||||
private void deathPathSendMail(DeathChallengeCount reward,int[] rewardByRank) throws Exception {
|
||||
// 邮件标题和内容
|
||||
String mailTitle = SErrorCodeEerverConfig.getI18NMessage("guildwar_reward_title");
|
||||
|
@ -698,4 +710,34 @@ public class DeathPathLogic {
|
|||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
return byWeek && crossGroup != -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取挑战人数
|
||||
* @return
|
||||
*/
|
||||
public DeathChallengeCount getDeathChallengeCount(int guildId){
|
||||
DeathChallengeCount challengeCount;
|
||||
String key = RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT;
|
||||
if (getGroupId() > 0){
|
||||
key = RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT + ":" + GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
challengeCount = RedisUtil.getInstence().get(key, String.valueOf(guildId), DeathChallengeCount.class, false);
|
||||
}else {
|
||||
challengeCount = RedisUtil.getInstence().get(key, String.valueOf(guildId), DeathChallengeCount.class,true);
|
||||
}
|
||||
return challengeCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取挑战人数
|
||||
* @return
|
||||
*/
|
||||
public void setDeathChallengeCount(int guildId, DeathChallengeCount countInfo){
|
||||
String key = RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT;
|
||||
if (getGroupId() > 0){
|
||||
key = RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT + ":" + GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
RedisUtil.getInstence().set(key, String.valueOf(guildId),countInfo,false);
|
||||
}else {
|
||||
RedisUtil.getInstence().set(key, String.valueOf(guildId),countInfo,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class CrossGuildForceRank extends GuildForceRank {
|
|||
if (query == null){
|
||||
return;
|
||||
}
|
||||
String name = Optional.ofNullable(mapEntry).map(GuildCache::getName).orElse("");
|
||||
String name = Optional.of(mapEntry).map(GuildCache::getName).orElse("");
|
||||
CommonProto.UserRank.Builder oneUserRank = getCrossOneUserRank(query,name,everyRankInfo);
|
||||
builder.addRanks(oneUserRank);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import rpc.protocols.PlayerInfoProto;
|
|||
* @date 2020/5/7
|
||||
* @discribe
|
||||
*/
|
||||
public class DeathPathEveryGuildRank extends AbstractRank {
|
||||
public class DeathPathEveryGuildRank extends CrossGuildForceRank {
|
||||
public DeathPathEveryGuildRank(int type, String redisKey) {
|
||||
super(type, redisKey);
|
||||
}
|
||||
|
|
|
@ -3,23 +3,28 @@ package com.ljsd.jieling.logic.rank.rankImpl;
|
|||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.gm.ArenaOfUser;
|
||||
import com.ljsd.jieling.logic.dao.root.GuildCache;
|
||||
import com.ljsd.jieling.logic.dao.root.GuildInfo;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.family.DeathChallengeCount;
|
||||
import com.ljsd.jieling.logic.family.DeathPathLogic;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/5/8
|
||||
* @discribe
|
||||
*/
|
||||
public class DeathPathTotalGuildRank extends AbstractRank{
|
||||
public class DeathPathTotalGuildRank extends CrossGuildForceRank{
|
||||
public DeathPathTotalGuildRank(int type, String redisKey) {
|
||||
super(type, redisKey);
|
||||
}
|
||||
|
@ -42,12 +47,12 @@ public class DeathPathTotalGuildRank extends AbstractRank{
|
|||
@Override
|
||||
protected void getOptional(int index, ZSetOperations.TypedTuple<String> data, PlayerInfoProto.RankResponse.Builder builder) throws Exception {
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(Integer.parseInt(data.getValue()));
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().get(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, String.valueOf(guildInfo.getId()), DeathChallengeCount.class);
|
||||
CommonProto.RankInfo.Builder everyRankInfo = CommonProto.RankInfo.newBuilder()
|
||||
DeathChallengeCount countInfo = DeathPathLogic.getInstance().getDeathChallengeCount(guildInfo.getId());
|
||||
CommonProto.RankInfo.Builder everyRankInfo = CommonProto.RankInfo.newBuilder()
|
||||
.setRank(index)
|
||||
.setParam1(getParam1(data.getScore()))
|
||||
.setParam2(getParam2(data.getScore()))
|
||||
.setParam3(countInfo==null?0:countInfo.getUserReward().size());
|
||||
.setParam3(countInfo==null?0:countInfo.getUserReward().size());
|
||||
CommonProto.UserRank.Builder everyRank = CommonProto.UserRank.newBuilder()
|
||||
.setUid(guildInfo.getId())
|
||||
.setGuildName(guildInfo.getName())
|
||||
|
@ -55,17 +60,53 @@ public class DeathPathTotalGuildRank extends AbstractRank{
|
|||
builder.addRanks(everyRank);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void getCrossOptional(int index, ZSetOperations.TypedTuple<String> data, PlayerInfoProto.RankResponse.Builder builder) throws Exception {
|
||||
GuildCache mapEntry = RedisUtil.getInstence().getMapEntry(RedisKey.FAMILY_INFO, "", data.getValue(), GuildCache.class);
|
||||
DeathChallengeCount countInfo = DeathPathLogic.getInstance().getDeathChallengeCount(Integer.valueOf(data.getValue()));
|
||||
CommonProto.RankInfo.Builder everyRankInfo = CommonProto.RankInfo.newBuilder()
|
||||
.setRank(index)
|
||||
.setParam1(getParam1(data.getScore()))
|
||||
.setParam2(getParam2(data.getScore()))
|
||||
.setParam3(countInfo==null?0:countInfo.getUserReward().size());
|
||||
ArenaOfUser query = CrossServiceLogic.getInstance().query(mapEntry.getLeaderUId());
|
||||
if (query == null){
|
||||
return;
|
||||
}
|
||||
String name = Optional.of(mapEntry).map(GuildCache::getName).orElse("");
|
||||
CommonProto.UserRank.Builder oneUserRank = getCrossOneUserRank(query,name,everyRankInfo);
|
||||
builder.addRanks(oneUserRank);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCrossMyInfo(User user,String rkey,PlayerInfoProto.RankResponse.Builder allUserResponse){
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
if (guildId == 0){
|
||||
return;
|
||||
}
|
||||
DeathChallengeCount countInfo = DeathPathLogic.getInstance().getDeathChallengeCount(guildId);
|
||||
int myRank= RedisUtil.getInstence().getZSetreverseRank(getCrossRedisKey(),rkey,Integer.toString(guildId),false).intValue();
|
||||
Double zSetScore = RedisUtil.getInstence().getZSetScore(getCrossRedisKey(), rkey, Integer.toString(guildId),false);
|
||||
CommonProto.RankInfo towerRankInfo = CommonProto.RankInfo.newBuilder()
|
||||
.setRank(myRank)
|
||||
.setParam1(getParam1(zSetScore))
|
||||
.setParam2(countInfo==null?0:countInfo.getUserReward().size())
|
||||
.build();
|
||||
allUserResponse.setMyRankInfo(towerRankInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void getMyInfo(User user, String rkey, PlayerInfoProto.RankResponse.Builder allUserResponse) {
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().get(RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT, String.valueOf(guildId), DeathChallengeCount.class);
|
||||
DeathChallengeCount countInfo = DeathPathLogic.getInstance().getDeathChallengeCount(guildId);
|
||||
int myRank= RedisUtil.getInstence().getZSetreverseRank(redisKey,rkey,Integer.toString(guildId)).intValue();
|
||||
Double zSetScore = RedisUtil.getInstence().getZSetScore(redisKey, rkey, Integer.toString(guildId));
|
||||
CommonProto.RankInfo towerRankInfo = CommonProto.RankInfo.newBuilder()
|
||||
.setRank(myRank)
|
||||
.setParam1(getParam1(zSetScore))
|
||||
.setParam2(getParam2(zSetScore))
|
||||
.setParam3(countInfo==null?0:countInfo.getUserReward().size()).build();
|
||||
.setParam3(countInfo==null?0:countInfo.getUserReward().size())
|
||||
.build();
|
||||
allUserResponse.setMyRankInfo(towerRankInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.world.logic.rank;
|
|||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.logic.dao.GuildInfoCache;
|
||||
import com.ljsd.jieling.logic.family.DeathChallengeCount;
|
||||
import com.ljsd.jieling.logic.family.DeathPathLogic;
|
||||
import com.world.db.mongo.MongoUtil;
|
||||
import com.world.redis.RedisUtil;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
|
@ -36,10 +37,11 @@ public class DeathPathCrossTotalGuildRank extends AbstractCrossRank {
|
|||
}
|
||||
return decimal.doubleValue();
|
||||
}
|
||||
protected void getOptional(int index, ZSetOperations.TypedTuple<String> data, PlayerInfoProto.RankResponse.Builder builder) throws Exception {
|
||||
|
||||
@Override
|
||||
protected void getOptional(int index, ZSetOperations.TypedTuple<String> data, PlayerInfoProto.RankResponse.Builder builder) throws Exception {
|
||||
GuildInfoCache crossGuild = getCrossGuild(Integer.parseInt(data.getValue()));
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().getObject(crossGuild.getServerId()+":"+RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT+":"+String.valueOf(data.getValue()), DeathChallengeCount.class);
|
||||
DeathChallengeCount countInfo = DeathPathLogic.getInstance().getDeathChallengeCount(crossGuild.getGuildId());
|
||||
GuildInfoCache everyGuild =getCrossGuild(Integer.parseInt(data.getValue()));
|
||||
CommonProto.RankInfo.Builder everyRankInfo = CommonProto.RankInfo.newBuilder()
|
||||
.setRank(index)
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package com.world.logic.rank;
|
||||
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.logic.dao.GuildInfoCache;
|
||||
import com.ljsd.jieling.logic.family.DeathChallengeCount;
|
||||
import com.world.db.mongo.MongoUtil;
|
||||
import com.world.redis.RedisUtil;
|
||||
import org.springframework.data.redis.core.ZSetOperations;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
@ -36,19 +31,6 @@ public class WorldArenaRank extends AbstractCrossRank {
|
|||
}
|
||||
return decimal.doubleValue();
|
||||
}
|
||||
protected void getOptional(int index, ZSetOperations.TypedTuple<String> data, PlayerInfoProto.RankResponse.Builder builder) throws Exception {
|
||||
|
||||
GuildInfoCache crossGuild = getCrossGuild(Integer.parseInt(data.getValue()));
|
||||
DeathChallengeCount countInfo = RedisUtil.getInstence().getObject(crossGuild.getServerId()+":"+RedisKey.DEATH_PATH_TOTAL_CHALLENGE_COUNT+":"+String.valueOf(data.getValue()), DeathChallengeCount.class);
|
||||
GuildInfoCache everyGuild =getCrossGuild(Integer.parseInt(data.getValue()));
|
||||
CommonProto.RankInfo.Builder everyRankInfo = CommonProto.RankInfo.newBuilder()
|
||||
.setRank(index)
|
||||
.setParam1(getParam1(data.getScore()))
|
||||
.setParam2(getParam2(data.getScore()))
|
||||
.setParam3(countInfo==null?0:countInfo.getUserReward().size());
|
||||
CommonProto.UserRank.Builder oneUserRank = getOneUserRank(everyGuild, everyRankInfo);
|
||||
builder.addRanks(oneUserRank);
|
||||
}
|
||||
|
||||
public CommonProto.UserRank.Builder getOneUserRank(GuildInfoCache everyGuild,CommonProto.RankInfo.Builder everyRankInfo) throws Exception {
|
||||
CommonProto.UserRank.Builder everyRank = CommonProto.UserRank.newBuilder()
|
||||
|
|
Loading…
Reference in New Issue