探索地图
parent
ea545c50ac
commit
0117de31fc
|
@ -356,6 +356,9 @@ public class RedisKey {
|
|||
public static final String CROSS_RANK_UPDATE = "CROSS_RANK_UPDATE";
|
||||
public static final String CROSS_RANK_DELETE = "CROSS_RANK_DELETE";
|
||||
|
||||
//探索地图
|
||||
public static final String EXPLORER_MAP_PLAYER = "EXPLORER_MAP_PLAYER";//探索地图玩家
|
||||
|
||||
//玉虚论道
|
||||
public static final String CROSS_YUXULUNDAO_RANK = "CROSS_YUXULUNDAO_RANK";//排行榜信息 废弃
|
||||
public static final String CROSS_YUXULUNDAO_RANK_PERSON = "CROSS_YUXULUNDAO_RANK_PERSON";//排行榜信息
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package com.ljsd.jieling.handler.explorerMap;
|
||||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
public class ExplorerMapInfoHandler extends BaseHandler<PlayerInfoProto.ExplorerMapInfoRequest> {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.ExplorerMapInfoRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWithProto(ISession session, PlayerInfoProto.ExplorerMapInfoRequest proto) throws Exception{
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.ljsd.jieling.handler.explorerMap;
|
||||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
public class ExplorerMapPlayerHandler extends BaseHandler<PlayerInfoProto.ExplorerMapPlayerInfoRequest> {
|
||||
|
||||
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.ExplorerMapPlayerInfoRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWithProto(ISession session, PlayerInfoProto.ExplorerMapPlayerInfoRequest proto) throws Exception{
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.ljsd.jieling.handler.explorerMap;
|
||||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
public class ExplorerMapRewardHandler extends BaseHandler<PlayerInfoProto.ExplorerMapRewardRequest> {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.ExplorerMapRewardRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWithProto(ISession session, PlayerInfoProto.ExplorerMapRewardRequest proto) throws Exception{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.ljsd.jieling.handler.explorerMap;
|
||||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
||||
public class ExplorerMapSendHandler extends BaseHandler<PlayerInfoProto.ExplorerMapSendRequest> {
|
||||
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.ExplorerMapSendRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processWithProto(ISession session, PlayerInfoProto.ExplorerMapSendRequest proto) throws Exception {
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package com.ljsd.jieling.logic.explorerMap;
|
||||
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
import com.ljsd.jieling.logic.dao.cross.CSPlayer;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import config.SArenaRobotConfig;
|
||||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import rpc.protocols.CommonProto;
|
||||
|
||||
public class ExplorerMapLogic {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ExplorerMapLogic.class);
|
||||
public ExplorerMapLogic(){
|
||||
|
||||
}
|
||||
|
||||
public static ExplorerMapLogic getInstance() {
|
||||
return ExplorerMapLogic.Instance.instance;
|
||||
}
|
||||
public static class Instance {
|
||||
public final static ExplorerMapLogic instance = new ExplorerMapLogic();
|
||||
}
|
||||
|
||||
//战斗 派遣
|
||||
public static void battle(User user, int mapId, int teamId){
|
||||
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
String key2 = RedisKey.getKey(RedisKey.EXPLORER_MAP_PLAYER, String.valueOf(mapId), false);
|
||||
redisUtil.lSet(key2, String.valueOf(user.getId()));
|
||||
}
|
||||
|
||||
//怪物刷新
|
||||
//邮件结算
|
||||
/**
|
||||
* 获取地图玩家信息
|
||||
*/
|
||||
public static CommonProto.ArenaPersonInfo getMapPlayerInfo(int uid) {
|
||||
//其他服务器玩家
|
||||
CSPlayer csPlayer = CrossServiceLogic.getPlayerByRedis(uid);
|
||||
if (csPlayer == null) {
|
||||
return null;
|
||||
}
|
||||
String serverName = CrossServiceLogic.simplifyServerName(csPlayer.getServerId());
|
||||
return CommonProto.ArenaPersonInfo.newBuilder()
|
||||
.setUid(uid)
|
||||
.setLevel(csPlayer.getLevel())
|
||||
.setName(csPlayer.getName())
|
||||
.setServername(serverName)
|
||||
.setTotalForce(csPlayer.getMaxFore()) //.setTotalForce(crossArenaManager.getTotalForce())
|
||||
.setUserTitle(csPlayer.getUserTitle())
|
||||
.setUserMount(csPlayer.getUserMount())
|
||||
.setGender(csPlayer.getSex())
|
||||
.setUserSkin(csPlayer.getSkin())
|
||||
.setPracticeLevel(csPlayer.getPracticeLevel())
|
||||
.setScore(csPlayer.getCrossYuxulundaoNewScore())
|
||||
.setRank(0)
|
||||
.setHead(csPlayer.getHead())
|
||||
.setHeadFrame(csPlayer.getHeadFrame())
|
||||
.build();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue