修复迷雾森林
parent
f834a14c59
commit
659f0f6945
|
@ -102,6 +102,8 @@ public class RedisKey {
|
||||||
|
|
||||||
public static final String CUser_Chat = ":CUser_Chat:";
|
public static final String CUser_Chat = ":CUser_Chat:";
|
||||||
|
|
||||||
|
public static final String USER_LOGIN_URL = "USER_LOGIN_URL:";
|
||||||
|
|
||||||
public static String getKey(String type, String key, boolean withoutServerId) {
|
public static String getKey(String type, String key, boolean withoutServerId) {
|
||||||
if (withoutServerId) {
|
if (withoutServerId) {
|
||||||
return GameApplication.areaId + Delimiter_colon + type + Delimiter_colon + String.valueOf(key);
|
return GameApplication.areaId + Delimiter_colon + type + Delimiter_colon + String.valueOf(key);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.ljsd.jieling.handler;
|
package com.ljsd.jieling.handler;
|
||||||
|
|
||||||
|
import com.ljsd.jieling.db.redis.RedisKey;
|
||||||
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
import com.ljsd.jieling.handler.map.MapLogic;
|
import com.ljsd.jieling.handler.map.MapLogic;
|
||||||
import com.ljsd.jieling.handler.map.MapManager;
|
import com.ljsd.jieling.handler.map.MapManager;
|
||||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||||
|
@ -20,6 +22,7 @@ import com.ljsd.jieling.network.session.ISession;
|
||||||
import com.ljsd.jieling.protocols.CommonProto;
|
import com.ljsd.jieling.protocols.CommonProto;
|
||||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||||
|
import com.ljsd.jieling.thread.task.RPCServerTask;
|
||||||
import com.ljsd.jieling.util.CBean2Proto;
|
import com.ljsd.jieling.util.CBean2Proto;
|
||||||
import com.ljsd.jieling.util.MessageUtil;
|
import com.ljsd.jieling.util.MessageUtil;
|
||||||
import com.ljsd.jieling.util.TimeUtils;
|
import com.ljsd.jieling.util.TimeUtils;
|
||||||
|
@ -97,6 +100,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
try {
|
try {
|
||||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
||||||
ActivityLogic.getInstance().flushForLogin(user);
|
ActivityLogic.getInstance().flushForLogin(user);
|
||||||
|
RedisUtil.getInstence().set(RedisKey.USER_LOGIN_URL + userId, RPCServerTask.userCallBackUrl);
|
||||||
LOGGER.info("back to client!");
|
LOGGER.info("back to client!");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -87,7 +87,7 @@ public enum MissionType {
|
||||||
case 14:
|
case 14:
|
||||||
return LEVEL_STORY_PASS;
|
return LEVEL_STORY_PASS;
|
||||||
case 15:
|
case 15:
|
||||||
return HERO_STORY_PASS;
|
return GENERAL_STORY_PASS;
|
||||||
case 16:
|
case 16:
|
||||||
return HERO_STORY_PASS;
|
return HERO_STORY_PASS;
|
||||||
case 17:
|
case 17:
|
||||||
|
|
|
@ -18,10 +18,13 @@ import java.net.InetSocketAddress;
|
||||||
public class RPCServerTask extends Thread{
|
public class RPCServerTask extends Thread{
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(RPCServerTask.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(RPCServerTask.class);
|
||||||
|
|
||||||
|
public static String userCallBackUrl;
|
||||||
|
|
||||||
private CoreSettings coreSettings;
|
private CoreSettings coreSettings;
|
||||||
|
|
||||||
public RPCServerTask(ConfigurableApplicationContext configurableApplicationContext){
|
public RPCServerTask(ConfigurableApplicationContext configurableApplicationContext){
|
||||||
this.coreSettings = configurableApplicationContext.getBean(CoreSettings.class);
|
this.coreSettings = configurableApplicationContext.getBean(CoreSettings.class);
|
||||||
|
userCallBackUrl = this.coreSettings.getIp() + ":" + this.coreSettings.getPort();
|
||||||
setName("rpc");
|
setName("rpc");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue