合服测试2

back_recharge
duhui 2023-05-17 11:08:40 +08:00
parent e105b58919
commit 0e1e5d22c2
1 changed files with 11 additions and 0 deletions

View File

@ -1777,6 +1777,17 @@ public class PlayerLogic {
if (rpcString == null) {
return null;
}
// 合服
String localRpc = RedisUtil.getInstence().getObject(RedisKey.LOGIC_SERVER_INFO, String.valueOf(GameApplication.serverId), String.class, -1);
if (localRpc != null && localRpc.equals(rpcString)) {
try {
return UserManager.getUser(uid, true);
} catch (Exception e) {
LOGGER.info("getUserByRpc Exception uid={} e={}", uid, e);
return null;
}
}
String[] split = rpcString.split(":");
if (split.length < 4) {
LOGGER.error("获取玩家rpc地址长度错误rpc{},玩家id{},服务器id{}", rpcString, uid, serverId);