public int EnterKuaFuMap(int roleId, int mapCode, int kuaFuLine, int roleSourceServerId, KuaFuServerLoginData kuaFuServerLoginData) { IYongZheZhanChangService kuaFuService = this.GetKuaFuService(false); if (null != kuaFuService) { try { int kuaFuServerId = kuaFuService.EnterKuaFuMap(this.ClientInfo.ServerId, roleId, mapCode, kuaFuLine); if (kuaFuServerId > 0) { kuaFuServerLoginData.RoleId = roleId; kuaFuServerLoginData.ServerId = roleSourceServerId; kuaFuServerLoginData.GameType = 7; kuaFuServerLoginData.GameId = (long)mapCode; KuaFuServerInfo kuaFuServerInfo; if (KuaFuManager.getInstance().TryGetValue(kuaFuServerId, out kuaFuServerInfo)) { kuaFuServerLoginData.ServerIp = kuaFuServerInfo.Ip; kuaFuServerLoginData.ServerPort = kuaFuServerInfo.Port; return(kuaFuServerId); } } } catch (Exception ex) { this.ResetKuaFuService(); } } return(-11003); }
public int EnterKuaFuMap(int roleId, int mapCode, int kuaFuLine, int roleSourceServerId, KuaFuServerLoginData kuaFuServerLoginData) { int kuaFuServerId; IYongZheZhanChangService kuaFuService = GetKuaFuService(); if (null != kuaFuService) { try { kuaFuServerId = kuaFuService.EnterKuaFuMap(ClientInfo.ServerId, roleId, mapCode, kuaFuLine); if (kuaFuServerId > 0) { kuaFuServerLoginData.RoleId = roleId; kuaFuServerLoginData.ServerId = roleSourceServerId; kuaFuServerLoginData.GameType = (int)GameTypes.KuaFuMap; kuaFuServerLoginData.GameId = mapCode; lock (Mutex) { KuaFuServerInfo kuaFuServerInfo; if (ServerIdServerInfoDict.TryGetValue(kuaFuServerId, out kuaFuServerInfo)) { kuaFuServerLoginData.ServerIp = kuaFuServerInfo.Ip; kuaFuServerLoginData.ServerPort = kuaFuServerInfo.Port; return(kuaFuServerId); } } } } catch (System.Exception ex) { ResetKuaFuService(); } } return(StdErrorCode.Error_Server_Internal_Error); }