玉虚论道
parent
130e7fd09b
commit
3824976fb6
|
@ -66,7 +66,9 @@ public enum FunctionIdEnum {
|
|||
Pokemon(79,null,MessageTypeProto.MessageType.POKEMON_COMONPENT_LEVELUP_REQUEST_VALUE,MessageTypeProto.MessageType.POKEMON_ADVANCED_REQUEST_VALUE),
|
||||
World_Arena(82,new WorldArenaFunction()),
|
||||
HongMeng(86,null),
|
||||
CrossYuxulundao(87,null),//跨服-玉虚论道
|
||||
WeekGood(9091,null),
|
||||
|
||||
;
|
||||
|
||||
private int functionType;
|
||||
|
|
|
@ -102,6 +102,10 @@ public interface GlobalsDef {
|
|||
int VICE_HARD_STAGE_TEAM =1801;//山河社稷图副关卡
|
||||
int TASUILINGXIAO_CHALLENGE = 1901;//踏碎凌霄挑战记录
|
||||
|
||||
int CROSS_YU_XU_LUN_DAO_ONE =2001;//玉虚论道第一编队
|
||||
int CROSS_YU_XU_LUN_DAO_TWO =2002;//玉虚论道第二编队
|
||||
int CROSS_YU_XU_LUN_DAO_THREE =2003;//玉虚论道第三编队
|
||||
|
||||
//特权解锁类型
|
||||
int LEVEL_UNLOCK_PRIVILEGE = 1;
|
||||
int MAIN_LEVEL_UNLOCK_PRIVILEGE = 2;
|
||||
|
|
|
@ -349,6 +349,10 @@ public class RedisKey {
|
|||
|
||||
public static final String CROSS_RANK_UPDATE_VERSION = "CROSS_RANK_UPDATE_VERSION";
|
||||
|
||||
//玉虚论道
|
||||
public static final String CROSS_YUXULUNDAO_RANK = "CROSS_YUXULUNDAO_RANK";//排行榜信息
|
||||
public static final String CROSS_YUXULUNDAO_ROBOT_INFO = "CROSS_YUXULUNDAO_ROBOT_INFO";//机器人信息
|
||||
|
||||
public static Set<String> familyKey = new HashSet<>();
|
||||
|
||||
public static Set<String> newAreaCacChe = new HashSet<>();//进程排行 合区统一
|
||||
|
|
|
@ -14,6 +14,8 @@ import org.springframework.stereotype.Component;
|
|||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class GetPlayerOneTeamInfo extends BaseHandler<PlayerInfoProto.GetPlayerOneTeamInfoRequest> {
|
||||
@Override
|
||||
|
@ -25,28 +27,40 @@ public class GetPlayerOneTeamInfo extends BaseHandler<PlayerInfoProto.GetPlayerO
|
|||
public void processWithProto(ISession iSession, PlayerInfoProto.GetPlayerOneTeamInfoRequest proto) throws Exception {
|
||||
|
||||
PlayerInfoProto.GetPlayerOneTeamInfoResponse oneTeamInfo = null;
|
||||
int teamId = proto.getTeamId();
|
||||
if(proto.getServerId()==0){
|
||||
//本服其他功能
|
||||
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo( proto.getPlayerId(), proto.getTeamId());
|
||||
if(teamId==0 && proto.getCrossteamIdList()!=null){
|
||||
//跨服玉虚论道
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo( proto.getPlayerId(),null,proto.getCrossteamIdList());
|
||||
}else{
|
||||
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo( proto.getPlayerId(), teamId);
|
||||
}
|
||||
|
||||
}else{
|
||||
//跨服
|
||||
if(proto.getPlayerId()<1000){
|
||||
//机器人
|
||||
|
||||
CrossArenaEnemy info = RedisUtil.getInstence().getMapEntry(RedisKey.CROSS_ARENA_ROBOT_INFO, String.valueOf(GlobleSystemLogic.getInstence().getCrossGroup()), String.valueOf(proto.getPlayerId()), CrossArenaEnemy.class);
|
||||
|
||||
if(info==null){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo(info.getEnemyId(),proto.getTeamId(),info);
|
||||
if(teamId == 0 && proto.getCrossteamIdList() != null){
|
||||
//跨服玉虚论道
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo( proto.getPlayerId(),info,proto.getCrossteamIdList());
|
||||
}else{
|
||||
oneTeamInfo = PlayerLogic.getInstance().getOneTeamInfo(info.getEnemyId(),teamId,info);
|
||||
}
|
||||
}else{
|
||||
//真人
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo(proto.getPlayerId(),proto.getTeamId());
|
||||
|
||||
if(teamId == 0 && proto.getCrossteamIdList() != null){
|
||||
//跨服玉虚论道
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo(proto.getPlayerId(),proto.getCrossteamIdList());
|
||||
}else{
|
||||
oneTeamInfo = PlayerLogic.getInstance().getCrossOneTeamInfo(proto.getPlayerId(),teamId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.GET_PLAYER_ONE_TEAM_INFO_RESPONSE.getNumber(),oneTeamInfo,true);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,154 @@
|
|||
package com.ljsd.jieling.logic.arena;
|
||||
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||
import com.ljsd.jieling.logic.dao.CrossArenaEnemy;
|
||||
import com.ljsd.jieling.logic.dao.TimeControllerOfFunction;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
import com.ljsd.jieling.logic.rank.RankContext;
|
||||
import com.ljsd.jieling.logic.rank.RankEnum;
|
||||
import com.ljsd.jieling.logic.rank.rankImpl.AbstractRank;
|
||||
import config.SArenaRobotConfig;
|
||||
import config.SMServerArenaSetting;
|
||||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import rpc.protocols.CommonProto;
|
||||
import util.TimeUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 玉虚论道
|
||||
*/
|
||||
public class CrossYuxulundaoLogic {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ArenaLogic.class);
|
||||
|
||||
public CrossYuxulundaoLogic() {
|
||||
}
|
||||
private static int state = 0;
|
||||
public final static int NORMAL_STATE = 1;
|
||||
public final static int BATTLE_STATE = 2;
|
||||
public final static int RELAX_STATE = 3;
|
||||
|
||||
public static class Instance {
|
||||
public final static CrossYuxulundaoLogic instance = new CrossYuxulundaoLogic();
|
||||
|
||||
}
|
||||
|
||||
public static CrossYuxulundaoLogic getInstance() {
|
||||
return CrossYuxulundaoLogic.Instance.instance;
|
||||
}
|
||||
|
||||
private int season;//0:挑战阶段 1:结算阶段
|
||||
|
||||
|
||||
//初始化机器人信息
|
||||
private void initRank() {
|
||||
|
||||
int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
|
||||
if (crossGroup == -1) {
|
||||
return;
|
||||
}
|
||||
//分布式锁,保证一个组只有一个服进行初始化
|
||||
boolean lock = RedisUtil.getInstence().lock("CROSS_YUXULUNDAO_INIT_RANK:" + crossGroup, TimeUtils.ONE_MINUTE * 5);
|
||||
if (!lock) {
|
||||
return;
|
||||
}
|
||||
//TODO 删除初始化一些数据
|
||||
|
||||
AbstractRank rank = RankContext.getRankEnum(RankEnum.CROSS_YUXULUNDAO_RANK.getType());
|
||||
int robotIndex = 100;
|
||||
Random random = new Random();
|
||||
Map<String, CrossArenaEnemy> robotInfo = new HashMap<>(100);
|
||||
Map<Integer, Integer> groupValues = RedisUtil.getInstence().getMapValues(RedisKey.SERVER_SPLIT_INFO, "", Integer.class, Integer.class);
|
||||
List<Integer> groupList = groupValues.entrySet().stream().filter(n -> n.getValue() == crossGroup).map(keyVal -> keyVal.getKey()).collect(Collectors.toList());
|
||||
|
||||
SMServerArenaSetting setting = STableManager.getConfig(SMServerArenaSetting.class).get(1);
|
||||
if (setting == null) {
|
||||
return;
|
||||
}
|
||||
List<Integer> robotIds = ArenaLogic.randomCrossRobot(setting.getFightArea()[0], setting.getFightArea()[1], 100);
|
||||
if (robotIds == null || robotIds.size() == 0) {
|
||||
return;
|
||||
}
|
||||
while (--robotIndex >= 0) {
|
||||
int server = random.nextInt(groupList.size());
|
||||
rank.addRank(robotIndex, String.valueOf(crossGroup), 100 - robotIndex);
|
||||
SArenaRobotConfig config = SArenaRobotConfig.getsArenaRobotConfigById(robotIds.get(robotIndex));
|
||||
robotInfo.put(String.valueOf(robotIndex), new CrossArenaEnemy(robotIds.get(robotIndex), robotIndex, groupList.get(server), 0, 0, random.nextBoolean(), PlayerLogic.getInstance().getRandomName2WithOutVerify(), config.getTotalForce(), config.getRoleLv()));
|
||||
|
||||
}
|
||||
LOGGER.info("跨服玉虚论道初始化结束");
|
||||
RedisUtil.getInstence().putMapEntrys(RedisKey.CROSS_YUXULUNDAO_ROBOT_INFO, String.valueOf(crossGroup), robotInfo);
|
||||
|
||||
}
|
||||
private void checkState(){
|
||||
long now = System.currentTimeMillis();
|
||||
TimeControllerOfFunction timeControllerOfFunction = GlobalDataManaager.getInstance().getTimeControllerOfFunctionByFunctinoType(FunctionIdEnum.CrossYuxulundao);
|
||||
if(null ==timeControllerOfFunction){
|
||||
return;
|
||||
}
|
||||
long diff = (System.currentTimeMillis() - timeControllerOfFunction.getStartTime())/1000;
|
||||
SMServerArenaSetting setting = STableManager.getConfig(SMServerArenaSetting.class).get(2);
|
||||
if (diff >= setting.getBattleTime()[0] && diff <= setting.getBattleTime()[1]){
|
||||
|
||||
}else if (diff > setting.getBattleTime()[1] && diff <= setting.getRestTime()[1]){
|
||||
|
||||
}else if (diff > setting.getRestTime()[1]){
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//0-1-2 准备阶段 -活动挑战阶段 - 发奖阶段
|
||||
private void readying() {
|
||||
if(state != BATTLE_STATE){
|
||||
LOGGER.info("玉虚论道:准备阶段,nowstate:{} to BATTLE_STATE",state);
|
||||
initRank();
|
||||
setState(BATTLE_STATE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void chanllege() {
|
||||
|
||||
}
|
||||
|
||||
private void sendReward() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public int getSeason() {
|
||||
return season;
|
||||
}
|
||||
|
||||
public void setSeason(int season) {
|
||||
this.season = season;
|
||||
}
|
||||
|
||||
|
||||
public static int getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public static void setState(int state) {
|
||||
CrossYuxulundaoLogic.state = state;
|
||||
}
|
||||
}
|
|
@ -618,6 +618,8 @@ public class PlayerLogic {
|
|||
teamInfo.addTeam(CommonProto.TeamSimpleInfo.newBuilder().setHeroid(String.valueOf(heroTid)).setHeroTid(heroTid).setLevel(sArenaRobotConfig.getRoleLv()).setStar(heroStar).setPosition(position++).build());
|
||||
}
|
||||
oneInfo.setTeam(teamInfo);
|
||||
//TODO 玉虚论道三队伍
|
||||
|
||||
return oneInfo;
|
||||
|
||||
}
|
||||
|
@ -655,6 +657,87 @@ public class PlayerLogic {
|
|||
|
||||
}
|
||||
|
||||
//跨服三队伍
|
||||
public PlayerInfoProto.GetPlayerOneTeamInfoResponse getCrossOneTeamInfo( int id,CrossArenaEnemy info,List<Integer> crossTeamId) throws Exception {
|
||||
if(id==0){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(id);
|
||||
CommonProto.TeamOneInfo.Builder oneInfo;
|
||||
if(sArenaRobotConfig!=null){
|
||||
oneInfo = getRobotOneInfo(sArenaRobotConfig,info);
|
||||
}else{
|
||||
oneInfo = getUserTeamOneInfo(id, crossTeamId);
|
||||
if(UserManager.getUser(id).getFriendManager().getMyApplyFriends().contains(id)){
|
||||
oneInfo.setIsApplyed(1);
|
||||
}
|
||||
}
|
||||
PlayerInfoProto.GetPlayerOneTeamInfoResponse.Builder playerTeamInfo = PlayerInfoProto.GetPlayerOneTeamInfoResponse.newBuilder().setTeamInfo(oneInfo);
|
||||
return playerTeamInfo.build();
|
||||
|
||||
|
||||
}
|
||||
//跨服三队伍
|
||||
public CommonProto.TeamOneInfo.Builder getUserTeamOneInfo(int uid,List<Integer> crossTeamId) throws Exception {
|
||||
User user = UserManager.getUser(uid);
|
||||
CommonProto.TeamOneInfo.Builder oneInfo = CBean2Proto.getTeamOneInfo(user);
|
||||
TeamPosManager teamPosManager = user.getTeamPosManager();
|
||||
for(int teamId:crossTeamId){
|
||||
CommonProto.TeamOneTeamInfo.Builder teamInfo = CommonProto.TeamOneTeamInfo.newBuilder();
|
||||
// 总战力
|
||||
teamInfo.setTotalForce(HeroLogic.getInstance().calTeamTotalForce(user,teamId,false));
|
||||
|
||||
if(teamId==GlobalsDef.TASUILINGXIAO_CHALLENGE){
|
||||
Map<Integer, TaSuiHero> taSuiHeroMap = user.getHeroManager().getTaSuiHeroMap();
|
||||
for(Map.Entry<Integer,TaSuiHero> entry:taSuiHeroMap.entrySet()){
|
||||
TaSuiHero hero = entry.getValue();
|
||||
CommonProto.TeamSimpleInfo info = CommonProto.TeamSimpleInfo.newBuilder().setHeroTid(hero.getTempId()).setLevel(hero.getLeve()).setStar(hero.getStar()).setPosition(entry.getKey()).build();
|
||||
teamInfo.addTeam(info);
|
||||
}
|
||||
teamInfo.setTotalForce(user.getHeroManager().getTaSuiLingXiaoRankForce());
|
||||
|
||||
}else{
|
||||
if(teamPosManager.getTeamPosForHero().containsKey(teamId)){
|
||||
// 添加队伍信息
|
||||
List<TeamPosHeroInfo> heroInfos = teamPosManager.getTeamPosForHero().get(teamId);
|
||||
for (TeamPosHeroInfo heroInfo:heroInfos) {
|
||||
Hero hero = user.getHeroManager().getHero(heroInfo.getHeroId());
|
||||
teamInfo.addTeam(CBean2Proto.getSimpleTeamInfoByHero(user, hero,heroInfo.getPosition()));
|
||||
}
|
||||
// 紫府神印
|
||||
List<String> collect = heroInfos.stream().map(TeamPosHeroInfo::getHeroId).collect(Collectors.toList());
|
||||
teamInfo.addAllSealShow(CBean2Proto.getPurpleSealShow(user,collect));
|
||||
}
|
||||
|
||||
}
|
||||
//加入灵兽信息
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
if(!pokemonManager.getPokemonTeamMap().isEmpty()){
|
||||
for(Map.Entry<Integer,String> entry:pokemonManager.getPokemonTeamMap().entrySet()){
|
||||
Pokemon pokemon = pokemonManager.getPokemonMap().get(entry.getValue());
|
||||
if(pokemon==null){
|
||||
continue;
|
||||
}
|
||||
teamInfo.addPokemonInfos(CBean2Proto.getSimpleTeamInfoByPokeMon(pokemon,entry.getKey()));
|
||||
}
|
||||
}
|
||||
int guildId = user.getPlayerInfoManager().getGuildId();
|
||||
if(guildId!=0){
|
||||
if(GuilidManager.guildInfoMap.containsKey(guildId)){
|
||||
String name = GuilidManager.guildInfoMap.get(guildId).getName();
|
||||
oneInfo.setGuildName(name);
|
||||
}
|
||||
|
||||
}
|
||||
if(teamId==GlobalsDef.CROSS_YU_XU_LUN_DAO_ONE ||teamId==GlobalsDef.CROSS_YU_XU_LUN_DAO_TWO || teamId==GlobalsDef.CROSS_YU_XU_LUN_DAO_THREE ){
|
||||
oneInfo.addCrossTeam(teamInfo);
|
||||
}else{
|
||||
oneInfo.setTeam(teamInfo);
|
||||
}
|
||||
}
|
||||
return oneInfo;
|
||||
}
|
||||
|
||||
//获取跨服玩家信息
|
||||
public PlayerInfoProto.GetPlayerOneTeamInfoResponse getCrossOneTeamInfo(int id,int teamId) throws Exception {
|
||||
ArenaOfUser query = CrossServiceLogic.getInstance().query(id);
|
||||
|
@ -698,6 +781,52 @@ public class PlayerLogic {
|
|||
return playerTeamInfo.build();
|
||||
}
|
||||
|
||||
public PlayerInfoProto.GetPlayerOneTeamInfoResponse getCrossOneTeamInfo(int id,List<Integer> crossTeamId) throws Exception {
|
||||
ArenaOfUser query = CrossServiceLogic.getInstance().query(id);
|
||||
if(query==null){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
CommonProto.TeamOneInfo.Builder builder = CommonProto.TeamOneInfo.newBuilder()
|
||||
.setHead(query.getPlayerManager().getHead())
|
||||
.setHeadFrame(query.getPlayerManager().getHeadFrame())
|
||||
.setUserTitle(query.getPlayerManager().getUserTitle())
|
||||
.setLevel(query.getPlayerManager().getLevel())
|
||||
.setName(query.getPlayerManager().getName())
|
||||
.setGuildName(query.getPlayerManager().getGuildName())
|
||||
.setPracticeLevel(query.getPlayerManager().getPracticeLevel())
|
||||
.setUid(id);
|
||||
for(int teamId: crossTeamId){
|
||||
CommonProto.TeamOneTeamInfo.Builder teamOneTeamInfo = CommonProto.TeamOneTeamInfo.newBuilder();
|
||||
List<TeamPosHeroInfo> teamPosHeroInfos = query.getHeroManager().getTeams().get(teamId);
|
||||
if(teamPosHeroInfos!=null){
|
||||
for (TeamPosHeroInfo heroInfo:teamPosHeroInfos) {
|
||||
ArenaOfHero hero = query.getHeroManager().getHeros().get(heroInfo.getHeroId());
|
||||
teamOneTeamInfo.addTeam(CBean2Proto.getCrossSimpleHero(hero,heroInfo.getPosition()));
|
||||
}
|
||||
}
|
||||
|
||||
for(Map.Entry<Integer,Pokemon> entry:query.getPokemons().entrySet()){
|
||||
teamOneTeamInfo.addPokemonInfos(CBean2Proto.getSimpleTeamInfoByPokeMon(entry.getValue(), entry.getKey()));
|
||||
}
|
||||
LOGGER.info("=====================跨服获取阵容:{}",teamId);
|
||||
Integer integer = query.getHeroManager().getTotalForceByTeam().getOrDefault(teamId,0);
|
||||
teamOneTeamInfo.setTotalForce(integer);
|
||||
for(Map.Entry<Integer, PurpleMansionSeal> entry:query.getSeals().entrySet()){
|
||||
PurpleMansionSeal value = entry.getValue();
|
||||
ArenaOfHero arenaOfHero = query.getHeroManager().getHeros().get(value.getSubId());
|
||||
if(value.getState()==0){
|
||||
continue;
|
||||
}
|
||||
teamOneTeamInfo.addSealShow(CommonProto.PurpleSealShowInfo.newBuilder().setType(value.getType()).setId(value.getSealId()).setHeroTId(arenaOfHero==null?0:arenaOfHero.getTemplateId()));
|
||||
}
|
||||
//builder.setTeam(teamOneTeamInfo.build());
|
||||
builder.addCrossTeam(teamOneTeamInfo.build());
|
||||
}
|
||||
|
||||
PlayerInfoProto.GetPlayerOneTeamInfoResponse.Builder playerTeamInfo = PlayerInfoProto.GetPlayerOneTeamInfoResponse.newBuilder().setTeamInfo(builder.build());
|
||||
return playerTeamInfo.build();
|
||||
}
|
||||
|
||||
public void viewRobotHeroInfo(ISession session, SArenaRobotConfig sArenaRobotConfig,String robotHeroId) throws Exception {
|
||||
PlayerInfoProto.ViewHeroInfoResponse.Builder builder = PlayerInfoProto.ViewHeroInfoResponse.newBuilder();
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ public enum RankEnum {
|
|||
CROSS_MONSTER_ATTACK_RANK(34,RedisKey.MONSTER_ATTACK_RANK,ForceRank::new,true),//跨服心魔
|
||||
CROSS_SHAN_HE_SHE_JI_STAR_RANK(35,RedisKey.SHAN_HE_SHE_JI_STAR_RANK,ForceRank::new,true),//山河社稷星星排行榜
|
||||
CROSS_GUILD_FORCE_RANK(36,RedisKey.GUILD_FORCE_RANK,CrossGuildForceRank::new,true),//跨服公会总战力排行
|
||||
|
||||
CROSS_YUXULUNDAO_RANK(37,RedisKey.CROSS_YUXULUNDAO_RANK,CrossYuXuLunDaoRank::new,true)//跨服玉虚论道
|
||||
;
|
||||
|
||||
private int type;
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package com.ljsd.jieling.logic.rank.rankImpl;
|
||||
|
||||
import com.ljsd.jieling.logic.arena.ArenaLogic;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
import util.TimeUtils;
|
||||
|
||||
/**
|
||||
* 玉虚论道排行榜
|
||||
*/
|
||||
public class CrossYuXuLunDaoRank extends AbstractRank{
|
||||
|
||||
public CrossYuXuLunDaoRank(int type, String redisKey) {
|
||||
super(type, redisKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayerInfoProto.RankResponse getRank(int uid, String rkey, int page, int rankEndLine) throws Exception {
|
||||
return super.getRank(uid, String.valueOf(ArenaLogic.getInstance().getViewSeason()), page, rankEndLine);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long[] getDataByScore(Double score) {
|
||||
return new long[]{score.intValue()};
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getScore(double... data) {
|
||||
return data[0]+ TimeUtils.getDoubleTime();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue