Exemplo n.º 1
0
    public void RequestOTPAuthKey(eOTPRequestType eReqType)
    {
        WS_OTPAUTH_REQ wS_OTPAUTH_REQ = new WS_OTPAUTH_REQ();

        wS_OTPAUTH_REQ.nOTPRequestType = (byte)eReqType;
        SendPacket.GetInstance().SendObject(16777276, wS_OTPAUTH_REQ);
    }
Exemplo n.º 2
0
 public void SetOTPRequestInfo(eOTPRequestType eReqType)
 {
     if (this.szOTPAuthKey[(int)eReqType].Length <= 0)
     {
         this.RequestOTPAuthKey(eReqType);
     }
     else
     {
         this.ProcessOTPReady(eReqType);
     }
 }
Exemplo n.º 3
0
    private void ProcessOTPReady(eOTPRequestType eReqType)
    {
        if (this.szOTPAuthKey[(int)eReqType].Length > 0)
        {
            switch (eReqType)
            {
            case eOTPRequestType.OTPREQ_USERAUTH:
            {
                bool            flag       = false;
                NrWebViewObject gameObject = NrWebViewObject.GetGameObject();
                if (!gameObject.FirstNoticeOpen || gameObject.MainmenuNoticeOpen)
                {
                    flag = true;
                }
                if (flag)
                {
                    string     strCharName = string.Empty;
                    NrCharBase @char       = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                    if (@char != null)
                    {
                        strCharName = @char.GetCharName();
                    }
                    NrMobileNoticeWeb nrMobileNoticeWeb = new NrMobileNoticeWeb();
                    nrMobileNoticeWeb.OnGameNotice(this.szOTPAuthKey[0], strCharName);
                }
                gameObject.FirstNoticeOpen    = true;
                gameObject.MainmenuNoticeOpen = false;
                break;
            }

            case eOTPRequestType.OTPREQ_CHARPORTRAIT:
            {
                NrCharBase char2 = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                if (char2 != null)
                {
                    NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

                    NkSoldierInfo leaderSoldierInfo = charPersonInfo.GetLeaderSoldierInfo();
                    string        arg = string.Empty;
                    if (charPersonInfo != null && leaderSoldierInfo != null)
                    {
                        arg = this.GetProcessLeaderHero(leaderSoldierInfo.GetCharKind());
                    }
                    string url = string.Format("http://{0}/mobilephoto/user.aspx?otp={1}&type={2}", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[1], arg);
                    Application.OpenURL(url);
                }
                break;
            }

            case eOTPRequestType.OTPREQ_GUILDMARK:
                if (0L < NrTSingleton <NewGuildManager> .Instance.GetGuildID())
                {
                    string url2 = string.Format("http://{0}/mobilephoto/guild.aspx?otp={1}", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[2]);
                    Application.OpenURL(url2);
                }
                break;

            case eOTPRequestType.OTPREQ_EMAIL:
            {
                string            text = string.Format("http://{0}/member/member_confirm1.aspx?OTP={1}", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[3]);
                NrMobileNoticeWeb nrMobileNoticeWeb2 = new NrMobileNoticeWeb();
                nrMobileNoticeWeb2.OpenWebURL(text);
                TsLog.LogOnlyEditor("!!!!!!!!!!!!!!!! OTPREQ_EMAIL :{0}" + text);
                break;
            }

            case eOTPRequestType.OTPREQ_HP_AUTH:
            {
                string url3 = string.Format("http://{0}/mobileAuth/auth.aspx?otp={1}", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[4]);
                Application.OpenURL(url3);
                NrTSingleton <NrMainSystem> .Instance.QuitGame(false);

                break;
            }

            case eOTPRequestType.OTPREQ_GUESTID:
            {
                string url4 = string.Empty;
                if (TsPlatform.IsAndroid)
                {
                    url4 = string.Format("http://{0}/member/AuthPlatformSync_auth.aspx?OTP={1}&platform=android", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[5]);
                }
                else
                {
                    url4 = string.Format("http://{0}/member/AuthPlatformSync_auth.aspx?OTP={1}&platform=ios", NrGlobalReference.strWebPageDomain, this.szOTPAuthKey[5]);
                }
                NrMobileNoticeWeb nrMobileNoticeWeb3 = new NrMobileNoticeWeb();
                nrMobileNoticeWeb3.OpenWebURL(url4);
                break;
            }

            case eOTPRequestType.OTPREQ_HELPQUESTION:
            {
                NrMobileNoticeWeb nrMobileNoticeWeb4 = new NrMobileNoticeWeb();
                nrMobileNoticeWeb4.OnGameQuestion(this.szOTPAuthKey[6], string.Empty);
                break;
            }

            case eOTPRequestType.OTPREQ_UNREGISTER:
            {
                NrMobileNoticeWeb nrMobileNoticeWeb5 = new NrMobileNoticeWeb();
                nrMobileNoticeWeb5.OnGameUnregister(this.szOTPAuthKey[7]);
                break;
            }
            }
            this.szOTPAuthKey[(int)eReqType] = string.Empty;
        }
    }
Exemplo n.º 4
0
 public string GetOTPAuthKey(eOTPRequestType eReqType)
 {
     return(this.szOTPAuthKey[(int)eReqType]);
 }