Exemplo n.º 1
0
    // Token: 0x060015F6 RID: 5622 RVA: 0x00257510 File Offset: 0x00255710
    public void OnButtonClick(UIButton sender)
    {
        switch (sender.m_BtnID1)
        {
        case 0:
            if (this.door != null)
            {
                this.door.CloseMenu(false);
            }
            break;

        case 1:
            IGGSDKPlugin.OpenFbByUrl(GameConstants.GlobalEditionFUrl);
            break;

        case 2:
            IGGSDKPlugin.VisitForum();
            break;

        case 3:
            IGGSDKPlugin.LoadWebView("https://lm.176.com/agreement.php");
            break;

        case 4:
            if (DataManager.Instance.UserLanguage == GameLanguage.GL_Jpn)
            {
                IGGSDKPlugin.LoadWebView("http://www.igg.com/about/privacy_policy.php?lang=jp");
            }
            else
            {
                IGGSDKPlugin.LoadWebView("http://www.igg.com/about/privacy_policy.php");
            }
            break;

        case 5:
            IGGSDKPlugin.SubmitQuestion();
            break;

        case 6:
            this.btn_Email_Exit.transform.SetParent(this.GUIM.m_SecWindowLayer, false);
            this.btn_Email_Exit.gameObject.SetActive(true);
            break;

        case 7:
            IGGSDKPlugin.Guide(GameConstants.GlobalEditionGuideURL);
            break;

        case 8:
        case 9:
        case 10:
        case 11:
        {
            this.btn_Email_Exit.transform.SetParent(this.GameT, false);
            this.btn_Email_Exit.transform.SetSiblingIndex(3);
            this.btn_Email_Exit.gameObject.SetActive(false);
            CString cstring = StringManager.Instance.StaticString1024();
            cstring.ClearString();
            string  utctime  = GameConstants.GetDateTime(DataManager.Instance.ServerTime).ToString();
            CString cstring2 = StringManager.Instance.StaticString1024();
            cstring2.ClearString();
            cstring2.StringToFormat(DataManager.Instance.mStringTable.GetStringByID(9025u));
            cstring2.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(8468u));
            string gameName = cstring2.ToString();
            cstring.StringToFormat(this.DM.mStringTable.GetStringByID(9025u));
            cstring.AppendFormat(this.DM.mStringTable.GetStringByID((uint)((ushort)(8410 + sender.m_BtnID1 - 8))));
            string gameVersion = string.Format("{0}.{1}.{2}", GameConstants.Version[0], GameConstants.Version[1], GameConstants.Version[2]);
            string iggid       = IGGGameSDK.Instance.m_IGGID;
            string language;
            if (DataManager.Instance.UserLanguage > (GameLanguage)0 && DataManager.Instance.UserLanguage < GameLanguage.GL_MAX)
            {
                language = GameConstants.GameLanguageName[(int)DataManager.Instance.UserLanguage];
            }
            else
            {
                language = GameConstants.GameLanguageName[1];
            }
            string deviceType      = SystemInfo.deviceModel.ToString();
            string operatingSystem = SystemInfo.operatingSystem;
            int    num             = Mathf.Clamp((int)DataManager.Instance.UserLanguage, 1, GameConstants.GlobalEditionGameID.Length - 1);
            IGGSDKPlugin.SendMail(GameConstants.GlobalEditionMailTo[num], cstring.ToString(), utctime, gameName, gameVersion, iggid, language, deviceType, operatingSystem);
            break;
        }

        case 12:
            this.btn_Email_Exit.transform.SetParent(this.GameT, false);
            this.btn_Email_Exit.transform.SetSiblingIndex(3);
            this.btn_Email_Exit.gameObject.SetActive(false);
            break;

        case 13:
            if (DataManager.Instance.UserLanguage == GameLanguage.GL_Eng || DataManager.Instance.UserLanguage == GameLanguage.GL_Idn || DataManager.Instance.UserLanguage == GameLanguage.GL_Tha || DataManager.Instance.UserLanguage == GameLanguage.GL_Vet)
            {
                IGGSDKPlugin.SupportLiveOnLogin_GlobalEdition((byte)DataManager.Instance.UserLanguage);
            }
            break;

        case 14:
            IGGSDKPlugin.OpenFbByUrl("http://lm20160316.pixnet.net/blog");
            break;

        case 15:
            if (DataManager.Instance.UserLanguage == GameLanguage.GL_Cht)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.youtube.com/channel/UC26f7wSibaVbLWT06ApRjqQ");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Eng)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.youtube.com/c/LordsMobile");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Rus)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.youtube.com/channel/UCyI75MkDMPsuBcFJSkaxRXg");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Spa)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.youtube.com/channel/UCmh_PyukAR1mInQonCHd6rQ?view_as=subscriber");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Vet)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.youtube.com/channel/UCV2C44HNEkhTWJR7Ls5zC7w?view_as=subscriber");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Ita)
            {
                IGGSDKPlugin.OpenFbByUrl("http://www.youtube.com/c/LordsMobileItaliano");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Kor)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.youtube.com/channel/UCdarRfwPZOmLUxR66PGGnjA");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Arb)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.youtube.com/channel/UCfmFAotvhwVs-Aqmjcyl37g");
            }
            break;

        case 16:
            IGGSDKPlugin.OpenFbByUrl("https://twitter.com/LordsMobileJP");
            break;

        case 17:
            IGGSDKPlugin.LoadWebView("http://lordsmobile.176.com/agreement.php");
            break;

        case 18:
            IGGSDKPlugin.OpenFbByUrl("https://web.lobi.co/game/wang_guo_ji_yuan_lords_mobile_zh_tw");
            break;

        case 19:
            IGGSDKPlugin.OpenFbByUrl("https://forum.gamer.com.tw/B.php?bsn=30034");
            break;

        case 20:
            if (DataManager.Instance.UserLanguage == GameLanguage.GL_Eng)
            {
                IGGSDKPlugin.OpenFbByUrl("https://twitter.com/LordsMobile");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Rus)
            {
                IGGSDKPlugin.OpenFbByUrl("https://twitter.com/LordsMobileRU");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Ita)
            {
                IGGSDKPlugin.OpenFbByUrl("https://twitter.com/LordsITALIA");
            }
            break;

        case 21:
            if (DataManager.Instance.UserLanguage == GameLanguage.GL_Eng)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.instagram.com/lordsmobile/");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Fre)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.instagram.com/lordsmobilefr/");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Gem)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.instagram.com/lordsmobilede");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Rus)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.instagram.com/lordsmobileru/");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Spa)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.instagram.com/lordsmobile_es/");
            }
            else if (DataManager.Instance.UserLanguage == GameLanguage.GL_Ita)
            {
                IGGSDKPlugin.OpenFbByUrl("https://www.instagram.com/lordsmobileita/");
            }
            break;

        case 22:
            IGGSDKPlugin.OpenFbByUrl("https://lm.176.com");
            break;

        case 23:
            IGGSDKPlugin.OpenFbByUrl("https://www.facebook.com/pg/LordsMobileRU/posts/");
            break;
        }
    }