灵脉秘境
parent
02a052d5e1
commit
b791353eb9
|
@ -0,0 +1,49 @@
|
||||||
|
package com.ljsd.fight;
|
||||||
|
|
||||||
|
public class LingMaiSecretArea {
|
||||||
|
private int id;
|
||||||
|
private int uid;
|
||||||
|
private String serverName;
|
||||||
|
private String name;
|
||||||
|
private long getAwardTimeOrOccupyTime;//得到奖励的时间或者占领的灵脉的时间
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(int uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServerName() {
|
||||||
|
return serverName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerName(String serverName) {
|
||||||
|
this.serverName = serverName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getGetAwardTimeOrOccupyTime() {
|
||||||
|
return getAwardTimeOrOccupyTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGetAwardTimeOrOccupyTime(long getAwardTimeOrOccupyTime) {
|
||||||
|
this.getAwardTimeOrOccupyTime = getAwardTimeOrOccupyTime;
|
||||||
|
}
|
||||||
|
}
|
|
@ -363,6 +363,9 @@ public class RedisKey {
|
||||||
public static final String CROSS_YUXULUNDAO_RECORD = "CROSS_YUXULUNDAO_RECORD";//战斗回放
|
public static final String CROSS_YUXULUNDAO_RECORD = "CROSS_YUXULUNDAO_RECORD";//战斗回放
|
||||||
public static final String CROSS_SERVER_USER = "CROSS_SERVER_USER";//redis存储个人基本信息
|
public static final String CROSS_SERVER_USER = "CROSS_SERVER_USER";//redis存储个人基本信息
|
||||||
|
|
||||||
|
//跨服 灵脉秘境
|
||||||
|
public static final String CROSS_LINGMAISECRET_INFO= "CROSS_LINGMAISECRET_INFO";//灵脉所有的占领信息
|
||||||
|
|
||||||
public static Set<String> familyKey = new HashSet<>();
|
public static Set<String> familyKey = new HashSet<>();
|
||||||
/**
|
/**
|
||||||
* 四灵试炼,0:首次通关,1:最低战力
|
* 四灵试炼,0:首次通关,1:最低战力
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ljsd.jieling.handler.crossServer;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.handler.BaseHandler;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import rpc.protocols.ArenaInfoProto;
|
||||||
|
import rpc.protocols.MessageTypeProto;
|
||||||
|
|
||||||
|
public class CrossLingmaiSecretAreaBattleHandler extends BaseHandler<ArenaInfoProto.CrossLingmaiSecretAreaRequest> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageTypeProto.MessageType getMessageCode() {
|
||||||
|
return MessageTypeProto.MessageType.CrossLingmaiSecretAreaRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void processWithProto(ISession session, ArenaInfoProto.CrossLingmaiSecretAreaRequest request) throws Exception{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ljsd.jieling.handler.crossServer;
|
||||||
|
|
||||||
|
import com.ljsd.fight.LingMaiSecretArea;
|
||||||
|
import com.ljsd.jieling.db.redis.RedisKey;
|
||||||
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
|
import com.ljsd.jieling.handler.BaseHandler;
|
||||||
|
import com.ljsd.jieling.logic.arena.CrossYuxulundaoLogic;
|
||||||
|
import com.ljsd.jieling.logic.championship.ChampionshipLogic;
|
||||||
|
import com.ljsd.jieling.logic.dao.UserManager;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.GuildCache;
|
||||||
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import com.ljsd.jieling.util.MessageUtil;
|
||||||
|
import rpc.protocols.ArenaInfoProto;
|
||||||
|
import rpc.protocols.MessageTypeProto;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collector;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class CrossLingmaiSecretAreaInfoHandler extends BaseHandler<ArenaInfoProto.CrossLingmaiSecretAreaInfoRequest> {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageTypeProto.MessageType getMessageCode() {
|
||||||
|
return MessageTypeProto.MessageType.CrossLingmaiSecretAreaInfoRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void processWithProto(ISession session, ArenaInfoProto.CrossLingmaiSecretAreaInfoRequest request) throws Exception{
|
||||||
|
|
||||||
|
//ChampionshipLogic.MemberInfo memberInfo = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_JOIN, "", Integer.toString(uid), ChampionshipLogic.MemberInfo.cl
|
||||||
|
//ChampionshipLogic.MemberInfo memberInfo = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_JOIN, "", Integer.toString(uid), ChampionshipLogic.MemberInfo.class);
|
||||||
|
int uid = session.getUid();
|
||||||
|
User user = UserManager.getUser(uid);
|
||||||
|
if (user == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int myOccupyId = 0;
|
||||||
|
int myOccupyTime = 0;
|
||||||
|
Map<String, LingMaiSecretArea> lingMaiMap = RedisUtil.getInstence().getMapValues(RedisKey.CROSS_LINGMAISECRET_INFO, "", String.class, LingMaiSecretArea.class);
|
||||||
|
|
||||||
|
List<LingMaiSecretArea> matchMyInfoList = lingMaiMap.values().stream().filter(n->n.getUid()==uid).collect(Collectors.toList());
|
||||||
|
if(matchMyInfoList!=null&&matchMyInfoList.size()>0){
|
||||||
|
myOccupyId = matchMyInfoList.get(0).getId();
|
||||||
|
myOccupyTime = (int)matchMyInfoList.get(0).getGetAwardTimeOrOccupyTime();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ArenaInfoProto.CrossLingmaiSecretAreaInfoResponse.Builder res = ArenaInfoProto.CrossLingmaiSecretAreaInfoResponse.newBuilder();
|
||||||
|
//RedisUtil.getInstence().putMapEntry(RedisKey.FAMILY_INFO, "", String.valueOf(guildInfo.getId()), GuildCache.create(guildInfo));
|
||||||
|
|
||||||
|
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.CrossLingmaiSecretAreaInfoResponse.getNumber(), res.build(), true);
|
||||||
|
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ljsd.jieling.handler.crossServer;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.handler.BaseHandler;
|
||||||
|
import com.ljsd.jieling.network.session.ISession;
|
||||||
|
import rpc.protocols.ArenaInfoProto;
|
||||||
|
import rpc.protocols.MessageTypeProto;
|
||||||
|
|
||||||
|
public class CrossLingmaiSecretAreaRecordHandler extends BaseHandler<ArenaInfoProto.CrossLingmaiSecretAreaRecordRequest> {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageTypeProto.MessageType getMessageCode() {
|
||||||
|
return MessageTypeProto.MessageType.CrossLingmaiSecretAreaRecordRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void processWithProto(ISession session, ArenaInfoProto.CrossLingmaiSecretAreaRecordRequest request) throws Exception{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.ljsd.jieling.logic.arena;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跨服 灵脉秘境
|
||||||
|
*/
|
||||||
|
public class CrossLingmaiLogic {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(CrossLingmaiLogic.class);
|
||||||
|
|
||||||
|
|
||||||
|
public CrossLingmaiLogic() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Instance {
|
||||||
|
public final static CrossLingmaiLogic instance = new CrossLingmaiLogic();
|
||||||
|
|
||||||
|
}
|
||||||
|
public static CrossLingmaiLogic getInstance() {
|
||||||
|
return CrossLingmaiLogic.Instance.instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package config;
|
||||||
|
|
||||||
|
import manager.STableManager;
|
||||||
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Table(name ="LodeConfig")
|
||||||
|
public class SLodeConfig implements BaseConfig {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int no;
|
||||||
|
|
||||||
|
private int pageNo;
|
||||||
|
|
||||||
|
private int group;
|
||||||
|
|
||||||
|
private int quality;
|
||||||
|
|
||||||
|
private int[][] rewardList;
|
||||||
|
|
||||||
|
private int guard;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNo() {
|
||||||
|
return no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPageNo() {
|
||||||
|
return pageNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGroup() {
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getQuality() {
|
||||||
|
return quality;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getRewardList() {
|
||||||
|
return rewardList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGuard() {
|
||||||
|
return guard;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
package config;
|
||||||
|
|
||||||
|
import manager.STableManager;
|
||||||
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Table(name ="LodeRankReward")
|
||||||
|
public class SLodeRankReward implements BaseConfig {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int minRank;
|
||||||
|
|
||||||
|
private int maxRank;
|
||||||
|
|
||||||
|
private int[][] seasonReward;
|
||||||
|
|
||||||
|
private int[][] titleReward;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMinRank() {
|
||||||
|
return minRank;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxRank() {
|
||||||
|
return maxRank;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getSeasonReward() {
|
||||||
|
return seasonReward;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getTitleReward() {
|
||||||
|
return titleReward;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,97 @@
|
||||||
|
package config;
|
||||||
|
|
||||||
|
import manager.STableManager;
|
||||||
|
import manager.Table;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Table(name ="MServerLodeSetting")
|
||||||
|
public class SMServerLodeSetting implements BaseConfig {
|
||||||
|
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int serverNum;
|
||||||
|
|
||||||
|
private int worldLevel;
|
||||||
|
|
||||||
|
private int openWeek;
|
||||||
|
|
||||||
|
private int[][] restTime;
|
||||||
|
|
||||||
|
private int[][] battleTime;
|
||||||
|
|
||||||
|
private int[] cost;
|
||||||
|
|
||||||
|
private int mostTime;
|
||||||
|
|
||||||
|
private int[] privId;
|
||||||
|
|
||||||
|
private int pageLodeNum;
|
||||||
|
|
||||||
|
private int[][] pageNum;
|
||||||
|
|
||||||
|
private int[][] qualityList;
|
||||||
|
|
||||||
|
private int[][] group;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getServerNum() {
|
||||||
|
return serverNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWorldLevel() {
|
||||||
|
return worldLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOpenWeek() {
|
||||||
|
return openWeek;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getRestTime() {
|
||||||
|
return restTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getBattleTime() {
|
||||||
|
return battleTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMostTime() {
|
||||||
|
return mostTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getPrivId() {
|
||||||
|
return privId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPageLodeNum() {
|
||||||
|
return pageLodeNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getPageNum() {
|
||||||
|
return pageNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getQualityList() {
|
||||||
|
return qualityList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[][] getGroup() {
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue