log输出
parent
233fb6764e
commit
e9cea00128
|
@ -419,17 +419,18 @@ public class AreaManager {
|
|||
if (defaultServerId == GameApplication.serverId){
|
||||
return defaultServerId;
|
||||
}
|
||||
|
||||
Integer serverIdByUid = RedisUtil.getInstence().getObject(RedisKey.CUser_ServerId_Key, Integer.toString(uid), Integer.class, GlobalsDef.REDIS_OVER_TIME_DAY * 10);
|
||||
if (serverIdByUid != null && !CoreLogic.getInstance().isHefu(serverIdByUid)) {
|
||||
LOGGER.info("uid=>{},defaultId =>{},getServerIdByUid1->{}",uid,defaultServerId,serverIdByUid);
|
||||
return serverIdByUid;
|
||||
}
|
||||
|
||||
LOGGER.info("uid=>{},defaultId =>{},getServerIdByUid2",uid,defaultServerId);
|
||||
int serverIdFromMongo = CoreLogic.getInstance().findServerIdFromMongo(uid);
|
||||
if (serverIdFromMongo != 0 && !CoreLogic.getInstance().isHefu(serverIdFromMongo)){
|
||||
LOGGER.info("uid=>{},defaultId =>{},serverIdFromMongo->{}",uid,defaultServerId,serverIdFromMongo);
|
||||
return serverIdFromMongo;
|
||||
}
|
||||
|
||||
LOGGER.info("uid=>{},defaultId =>{},serverIdFromMongo2",uid,defaultServerId);
|
||||
return GameApplication.serverId;
|
||||
}
|
||||
|
||||
|
|
|
@ -1767,6 +1767,7 @@ public class PlayerLogic {
|
|||
public User getUserByRpc(int uid) {
|
||||
int serverId = AreaManager.getInstance().getServerIdByUid(uid, GameApplication.serverId);
|
||||
if (serverId == 0) {
|
||||
LOGGER.info("serverId is Exception serverId={}", serverId);
|
||||
return null;
|
||||
}
|
||||
if (serverId == GameApplication.serverId) {
|
||||
|
@ -1779,9 +1780,10 @@ public class PlayerLogic {
|
|||
}
|
||||
String rpcString = RedisUtil.getInstence().getObject(RedisKey.LOGIC_SERVER_INFO, Integer.toString(serverId), String.class, -1);
|
||||
if (rpcString == null) {
|
||||
LOGGER.info("rpcString Exception serverId1={}", serverId);
|
||||
return null;
|
||||
}
|
||||
|
||||
LOGGER.info("rpcString serverId2={}", serverId);
|
||||
String[] split = rpcString.split(":");
|
||||
if (split.length < 4) {
|
||||
LOGGER.error("获取玩家rpc地址,长度错误,rpc:{},玩家id:{},服务器id:{}", rpcString, uid, serverId);
|
||||
|
|
Loading…
Reference in New Issue