Beispiel #1
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 烈焰登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                           //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                       //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                               //获取时间戳
            Sign   = DESEncrypt.Md5("id=" + gu.UserName + "&now=" + tstamp + "." + gc.LoginTicket, 32); //获取验证码
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?id=" + gu.UserName + "&time=" + tstamp + "&isAdult=1&is_client=" + IsPC + "&sign=" + Sign;

            return(LoginUrl);
        }
Beispiel #2
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 斗破乾坤登录接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登录地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                              //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                          //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                  //获取时间戳
            Sign   = DESEncrypt.Md5("account=" + gu.UserName + "&agent=" + gc.AgentId + "&fcm=1&fcm_time=-1&serverid=" + gs.ServerNo + "&time=" + tstamp + "&way=1&" + gc.LoginTicket, 32);
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?account=" + gu.UserName + "&agent=" + gc.AgentId + "&fcm=1&fcm_time=-1&serverid=" + gs.ServerNo + "&time=" + tstamp + "&way=1&token=" + Sign;

            return(LoginUrl);
        }
Beispiel #3
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 天行剑登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                              //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                          //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                  //获取时间戳
            Sign   = DESEncrypt.Md5(gu.UserName + tstamp + gc.LoginTicket + "1txj" + gs.QuFu, 32);
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?username="******"&time=" + tstamp + "&flag=" + Sign + "&cm=1&site=txj&server_id=" + gs.QuFu;

            return(LoginUrl);
        }
Beispiel #4
0
        /// <summary>
        /// 封天传登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                               //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                           //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                   //获取时间戳
            Sign   = DESEncrypt.Md5("{" + gu.UserName + gc.LoginTicket + tstamp + "}", 32); //获取验证码
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?userName="******"&time=" + tstamp + "&sign=" + Sign + "&source=tt&serverId=" + gs.ServerNo;

            return(LoginUrl);
        }
Beispiel #5
0
        string Sign;                                                        //定义验证参数'

        /// <summary>
        /// 最无极登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否客户端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                           //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                       //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                               //获取时间戳
            Sign   = DESEncrypt.Md5(gu.Id + gu.UserName + gs.QuFu + "1" + tstamp + gc.LoginTicket, 32); //获取验证码
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?user_id=" + gu.Id + "&user_name=" + gu.UserName + "&time=" + tstamp + "&is_adult=1&sign=" + Sign + "&server_id=" + gs.QuFu;

            return(LoginUrl);
        }
Beispiel #6
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 神将三国登录接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <returns>返回登录地址</returns>
        public string Login(int UserId, int ServerId, int IsPc)
        {
            gu     = gus.GetGameUser(UserId);                                         //获取要登录用户
            gs     = gss.GetGameServer(ServerId);                                     //获取要登录的服务器
            tstamp = Utils.GetTimeSpan();                                             //获取时间戳
            Sign   = DESEncrypt.Md5(gu.UserName + tstamp + gc.LoginTicket + "1", 32); //获取验证参数
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?username="******"&time=" + tstamp + "&cm=1" + "&flag=" + Sign;

            return(LoginUrl);
        }
Beispiel #7
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 可乐三国登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                                                                                                                                                         //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                                                                                                                                                     //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                                                                                                                                                             //获取时间戳
            Sign   = DESEncrypt.Md5("cardId=1&cardName=1&cm=1&name=myname&platId=" + gc.AgentId + "&platUid=" + gu.UserName + "&sid=" + gs.ServerNo + "&srcId=" + gc.AgentId + "&tm=" + tstamp + "&" + gc.LoginTicket, 32);           //获取验证参数
            string LoginUrl = "http://" + gc.LoginCom + "?cardId=1&cardName=1&cm=1&name=myname&platId=" + gc.AgentId + "&platUid=" + gu.UserName + "&sid=" + gs.ServerNo + "&srcId=" + gc.AgentId + "&tm=" + tstamp + "&sig=" + Sign; //生成登录地址

            return(LoginUrl);
        }
Beispiel #8
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 怒斩登录接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <returns>返回登录地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                              //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                          //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                  //获取时间戳
            string sign     = DESEncrypt.Md5(gu.Id + gu.UserName + tstamp + "1" + gc.LoginTicket, 32);
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "login.php?u=" + UserId + "&n=" + gu.UserName + "&t=" + tstamp + "&cm=1&p=" + sign + "&type=ie&s=" + gs.ServerNo;

            return(LoginUrl);
        }
Beispiel #9
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 太古遮天登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否客户端</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                                //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                            //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                                    //获取时间戳
            Sign   = DESEncrypt.Md5(gc.LoginTicket + gu.UserName + tstamp + gc.AgentId + gs.QuFu + "1", 32); //获取验证码
            string LoginUrl = "http://" + gc.LoginCom + "/api/v1/mc/start.php?accountName=" + gu.UserName + "&stamp=" + tstamp + "&agentName=" + gc.AgentId + "&serverID=" + gs.QuFu + "&fcm=1&flag=" + Sign;

            return(LoginUrl);
        }
Beispiel #10
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 街机三国登录接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                              //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                          //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                  //获取时间戳
            Sign   = DESEncrypt.Md5(gu.Id + gc.AgentId + tstamp + gs.ServerNo + gc.LoginTicket, 32);
            string LoginUrl = "http://" + gc.LoginCom + "?user="******"&time=" + tstamp + "&server_id=" + gs.ServerNo + "&platform=" + gc.AgentId + "&sign=" + Sign + "&non_kid=1&source=&regdate=&backurl=";

            return(LoginUrl);
        }
Beispiel #11
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 热血海贼王登录接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                                               //获取要登录用户
            gs     = gss.GetGameServer(ServerId);                                                                           //获取要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                                                   //获取时间戳
            Sign   = DESEncrypt.Md5("qid=" + gu.Id + "&time=" + tstamp + "&server_id=" + gs.ServerNo + gc.LoginTicket, 32); //获取验证参数
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?qid=" + gu.Id + "&time=" + tstamp + "&server_id=" + gs.ServerNo + "&sign=" + Sign + "&isAdult=1";

            return(LoginUrl);
        }
Beispiel #12
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 楚汉传奇登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPc)
        {
            gu     = gus.GetGameUser(UserId);                                                                                                                                                                  //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                                                                                                                              //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                                                                                                                                      //获取时间戳
            Sign   = DESEncrypt.Md5("from=" + gc.AgentId + "game=chuhan" + "server=" + gs.ServerNo + "user_id=" + gu.UserName + "fatigue=2" + "t=" + tstamp + "login_secret_signature=" + gc.LoginTicket, 32); //获取验证码
            string LoginUrl = "http://" + gc.LoginCom + "?from=" + gc.AgentId + "&game=chuhan&server=" + gs.ServerNo + "&user_id=" + gu.UserName + "&fatigue=2&t=" + tstamp + "&signature=" + Sign;

            return(LoginUrl);
        }
Beispiel #13
0
        string Sign;                                                        //定义验证参数


        /// <summary>
        /// 大清英雄传登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否客户端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                                                                                                                             //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                                                                                                                         //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();
            Sign   = DESEncrypt.Md5(gu.UserName + gc.AgentId + "1" + gs.ServerNo + "1" + tstamp + gc.LoginTicket, 32);                                                                                    //获取验证参数
            string LoginUrl = "http://" + gc.LoginCom + "?sid=" + gc.AgentId + "&gid=" + "GameId" + "&servid=" + gs.ServerNo + "&username="******"&isAdult=1&time=" + tstamp + "&MD5=" + Sign; //生成登录地址

            return(LoginUrl);
        }
Beispiel #14
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 绝代双骄登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                              //获取要登录用户
            gs     = gss.GetGameServer(ServerId);                          //获取要登录的服务器
            tstamp = DateTime.Now.ToString("yyyyMMddHHmmss");              //获取时间戳
            Sign   = DESEncrypt.Md5("uid=" + gu.Id + "&uname=" + gu.UserName + "&lgtime=" + tstamp + "&uip=" + BBRequest.GetIP().Replace(".", "_") + "&type=" + gc.AgentId + "&sid=" + gs.ServerNo + "&key=" + gc.LoginTicket, 32);
            string LoginUrl = "http://" + gc.LoginCom + "?uid=" + gu.Id + "&uname=" + gu.UserName + "&lgtime=" + tstamp + "&uip=" + BBRequest.GetIP().Replace(".", "_") + "&type=" + gc.AgentId + "&sid=" + gs.ServerNo + "&sign=" + Sign;

            return(LoginUrl);
        }
Beispiel #15
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 仙侠傲世登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否客户端</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                             //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                         //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                                 //获取时间戳
            Sign   = DESEncrypt.Md5(gu.UserName + tstamp + "0" + DESEncrypt.Md5(gc.LoginTicket, 32), 32); //获取验证码
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "/api/login.php?account=" + gu.UserName + "&time=" + tstamp + "&flag=" + Sign + "&fcm=0&server_id=" + gs.ServerNo;

            return(LoginUrl);
        }
Beispiel #16
0
        /// <summary>
        /// 一剑轩辕登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                                                                                             //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                                                                                         //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();
            Sign   = DESEncrypt.Md5(gu.UserName + "|" + tstamp + "|" + gs.QuFu + "|" + gc.LoginTicket, 32);                                                               //获取验证参数
            string LoginUrl = "http://" + gs.ServerNo + "." + gc.LoginCom + "?accname=" + gu.UserName + "&ts=" + tstamp + "&serverid=" + gs.QuFu + "&fcm=0&sign=" + Sign; //生成登录地址

            return(LoginUrl);
        }
Beispiel #17
0
        string Auth;                                                        //定义验证码

        /// <summary>
        /// 天界登录接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <returns>返回登录地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                              //获取要登录用户
            gs     = gss.GetGameServer(ServerId);                          //获取要登录的服务器
            tstamp = Utils.GetTimeSpan();                                  //获取时间戳
            Base64Protector bp = new Base64Protector();

            Auth = bp.Base64Code(string.Format("sid={0}&uid={1}&time={2}&indulge={3}", gs.ServerNo, gu.UserName, tstamp, "n"));
            Sign = DESEncrypt.Md5(Auth + gc.LoginTicket, 32);       //获取验证参数
            string LoginUrl = "http://" + gc.LoginCom + "?auth=" + Auth + "&sign=" + Sign;

            return(LoginUrl);
        }
Beispiel #18
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 猎魔登陆接口
        /// </summary>
        /// <param name="Id">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPc">是否PC端登陆</param>
        /// <returns></returns>
        public string Login(int Id, int ServerId, int IsPc)
        {
            gu     = gus.GetGameUser(Id);                                                                                           //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                                                   //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                                                           //获取时间戳
            Sign   = DESEncrypt.Md5(gc.AgentId + "|" + gu.Id + "|1233|" + gs.ServerNo + "|" + tstamp + "|1|" + gc.LoginTicket, 32); //获取验证码
            string LoginDelURL = "http://" + gc.LoginCom + "?site=" + gc.AgentId + "&uid=" + gu.Id + "&game=1233&num=" + gs.ServerNo + "&fcm=1&time=" + tstamp + "&sign=" + Sign;
            string LoginResult = Utils.GetWebPageContent(LoginDelURL);

            string[] R        = LoginResult.Replace("[", "").Replace("]", "").Split(',');
            string   LoginUrl = R[1].Replace("\"", "").Replace("\\", "");;

            return(LoginUrl);
        }
Beispiel #19
0
        string Auth;                                                        //定义验证码

        /// <summary>
        /// 大将军登录接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登录地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                                                //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                                            //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                                                    //获取时间戳
            string url = string.Format("op_id={0}&sid={1}&game_id={2}&account={3}&adult_flag={4}&game_time={5}&ip={6}&ad_info={7}&time={8}",
                                       gc.AgentId, gs.ServerNo, 7, gu.UserName, 1, 13359459, BBRequest.GetIP(), "", tstamp); //获取验证字符串
            Base64Protector bp = new Base64Protector();

            Auth = bp.Base64Code(url);                                                       //获取验证码
            Sign = DESEncrypt.Md5(Auth + gc.LoginTicket, 32);                                //获取验证参数
            string LoginUrl = "http://" + gc.LoginCom + "?auth=" + Auth + "&verify=" + Sign; //生成登录地址

            return(LoginUrl);
        }
Beispiel #20
0
        /// <summary>
        /// 生成一个订单
        /// </summary>
        /// <param name="OrderCode">订单标识码</param>
        /// <param name="GameId">游戏Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="Type">订单类型</param>
        /// <param name="PayTypeId">支付类型</param>
        /// <param name="UserName">充值用户</param>
        /// <param name="Money">充值金额(RMB/元)</param>
        /// <param name="AdminUserName">操作员</param>
        /// <returns></returns>
        public Orders GetOrder(string OrderCode, string GameId, int ServerId, int Type, int PayTypeId, string UserName, float Money, string AdminUserName)
        {
            Thread.Sleep(8);
            Orders o = new Orders();

            if (CheckOrder(GameId, ServerId, Type, PayTypeId, UserName, Money, AdminUserName))
            {
                GameServerServers gss = new GameServerServers();
                GamesServers      gs  = new GamesServers();
                o.Type      = Type;
                o.PayTypeId = PayTypeId;
                o.State     = 0;
                o.UserName  = UserName;
                o.PayTime   = DateTime.Now;
                o.Ip        = BBRequest.GetIP();
                if (!string.IsNullOrEmpty(AdminUserName))
                {
                    o.AdminUserName = AdminUserName;
                }
                else
                {
                    o.AdminUserName = "******";
                }
                if (PayTypeId == 7)
                {
                    o.PMoney = o.PayMoney = Money / 10;
                }
                else
                {
                    o.PMoney = o.PayMoney = Money;
                }
                if (Type == 1)
                {
                    if (GameId.ToString().Length == 1)
                    {
                        GameId = "00" + GameId;
                    }
                    else if (GameId.ToString().Length == 2)
                    {
                        GameId = "0" + GameId;
                    }
                    o.OrderNo    = OrderCode + DateTime.Now.ToString("yyyyMMddHHmmss") + DateTime.Now.Millisecond + GameId + gss.GetGameServer(ServerId).QuFu;
                    o.GameId     = int.Parse(GameId);
                    o.ServerId   = ServerId;
                    o.GameName   = gs.GetGame(o.GameId).Name;
                    o.ServerName = gss.GetGameServer(ServerId).Name;
                }
                else
                {
                    o.OrderNo    = OrderCode + DateTime.Now.ToString("yyyyMMddHHmmss") + DateTime.Now.Millisecond + 0 + 0;
                    o.GameId     = 0;
                    o.ServerId   = 0;
                    o.GameName   = "适用所有游戏";
                    o.ServerName = "适用所有区服";
                }
            }
            return(o);
        }
Beispiel #21
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 江湖问剑登录接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登录</param>
        /// <returns>返回登录接口</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                                                                                                         //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                                                                                                                     //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                                                                                                             //获取时间戳
            Sign   = DESEncrypt.Md5("fcm" + "n" + "gid" + "221" + "pid" + gc.AgentId + "sid" + gs.QuFu + "time" + tstamp + "uid" + gu.UserName + gc.LoginTicket, 32); //获取验证码
            string LoginUrl = "http://" + gc.LoginCom + "?pid=" + gc.AgentId + "&gid=221&sid=" + gs.QuFu + "&uid=" + gu.UserName + "&time=" + tstamp + "&fcm=n&sign= " + Sign;

            if (IsPC == 1)
            {
                LoginUrl += "&client=pc";
            }
            else
            {
                LoginUrl += "&client=web";
            }
            return(LoginUrl);
        }
Beispiel #22
0
        string Auth;                                                        //定义验证码

        /// <summary>
        /// 九龙朝登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                                  //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                              //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                      //获取时间戳
            string url = string.Format("sid={0}&uid={1}&time={2}&indulge={3}",
                                       gs.ServerNo, gu.UserName, tstamp, "n"); //获取验证字符串
            Base64Protector bp = new Base64Protector();

            Auth = bp.Base64Code(url);                                                     //获取验证码
            Sign = DESEncrypt.Md5(Auth + gc.LoginTicket, 32);                              //获取验证参数
            string LoginUrl = "http://" + gc.LoginCom + "?auth=" + Auth + "&sign=" + Sign; //生成登录地址

            if (IsPC == 1)
            {
                LoginUrl += "&play_gamecode&isclient=1";
            }
            return(LoginUrl);
        }
Beispiel #23
0
        string Sign;                                                        //定义验证参数

        /// <summary>
        /// 盗魂传登陆接口
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <param name="ServerId">服务器Id</param>
        /// <param name="IsPC">是否PC端登陆</param>
        /// <returns>返回登陆地址</returns>
        public string Login(int UserId, int ServerId, int IsPC)
        {
            gu     = gus.GetGameUser(UserId);                              //获取当前登录用户
            gs     = gss.GetGameServer(ServerId);                          //获取用户要登录的服务器
            tstamp = Utils.GetTimeSpan();                                  //获取时间戳
            string LoginUrl = "";

            Sign = DESEncrypt.Md5(gc.AgentId + "|" + gu.UserName + "|" + gs.ServerNo + "|" + tstamp + "|" + "2" + "|" + gc.LoginTicket, 32);               //获取验证参数
            if (IsPC == 0)
            {
                string Url = "http://" + gc.LoginCom + "?ptid=" + gc.AgentId + "&account=" + gu.UserName + "&areaid=" + gs.ServerNo + "&tt=" + tstamp + "&fcm=" + 2 + "&sign=" + Sign;       //生成登录地址
                LoginUrl = Url;
            }
            else if (IsPC == 1)
            {
                string Url = "http://" + gc.LoginCom + "?ptid=" + gc.AgentId + "&account=" + gu.UserName + "&areaid=" + gs.ServerNo + "&tt=" + tstamp + "&fcm=" + 2 + "&sign=" + Sign + "&logintype=2";       //生成登录地址
                LoginUrl = Url;
            }
            return(LoginUrl);
        }
Beispiel #24
0
 /// <summary>
 /// 获取服务器信息
 /// </summary>
 /// <param name="ServerId">服务器Id</param>
 /// <returns>返回服务器</returns>
 public GameServer GetGameServer(int ServerId)
 {
     return(gss.GetGameServer(ServerId));
 }