Esempio n. 1
0
        public void SwitchToSymbolRcmdPanel(CUIFormScript form)
        {
            if (form == null || form.IsClosed())
            {
                return;
            }
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                DebugHelper.Assert(false, "SwitchToSymbolRcmdPanel role is null");
                return;
            }
            this.m_curHeroId       = masterRoleInfo.m_symbolInfo.m_selSymbolRcmdHeroId;
            this.m_symbolRcmdLevel = masterRoleInfo.m_symbolInfo.m_selSymbolRcmdLevel;
            this.m_symbolRcmdLevel = (ushort)Math.Max(1, Math.Min((int)this.m_symbolRcmdLevel, CSymbolInfo.s_maxSymbolLevel));
            CSymbolSystem.RefreshSymbolCntText(true);
            this.RefreshSymbolRcmdPanel();
            string[] titleList = new string[]
            {
                "1",
                "2",
                "3",
                "4",
                "5"
            };
            GameObject listObj = Utility.FindChild(form.gameObject, "SymbolRecommend/Panel_SymbolRecommend/Panel_SymbolLevel/levelList");

            CUICommonSystem.InitMenuPanel(listObj, titleList, (int)(this.m_symbolRcmdLevel - 1), true);
        }
Esempio n. 2
0
        public void Process(bool force = false)
        {
            if (this.m_isShowing)
            {
                return;
            }
            CAchieveInfo2 masterAchieveInfo = CAchieveInfo2.GetMasterAchieveInfo();

            if (masterAchieveInfo.MostLatelyDoneAchievements.get_Count() == 0)
            {
                return;
            }
            if (!Singleton <CLobbySystem> .GetInstance().IsInLobbyForm() || Singleton <CMatchingSystem> .GetInstance().IsInMatching || Singleton <CMatchingSystem> .GetInstance().IsInMatchingTeam || Singleton <CUIManager> .GetInstance().GetForm(CMatchingSystem.PATH_MATCHING_CONFIRMBOX) != null)
            {
                return;
            }
            if (!force)
            {
                string[] array = new string[]
                {
                    Singleton <CMallSystem> .GetInstance().sMallFormPath,
                    "Form_NewHeroOrSkin.prefab"
                };
                for (int i = 0; i < array.Length; i++)
                {
                    CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(array[i]);

                    if (form != null && !form.IsClosed())
                    {
                        return;
                    }
                }
            }
            CUIFormScript form2 = Singleton <CUIManager> .GetInstance().GetForm("Form_NobeLevelUp.prefab");

            if (form2 != null && !form2.IsClosed())
            {
                return;
            }
            uint num = masterAchieveInfo.MostLatelyDoneAchievements.get_Item(0);

            if (!masterAchieveInfo.m_AchiveItemDic.ContainsKey(num))
            {
                return;
            }
            this.OpenShareForm(num);
        }