public void InitList(int TabIndex, CUIListScript list)
        {
            ResMiShuInfo[] resList = this.GetResList(TabIndex);
            list.SetElementAmount(resList.Length);
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            for (int i = 0; i < resList.Length; i++)
            {
                Transform transform  = list.GetElemenet(i).transform;
                Image     component  = transform.Find("imgIcon").GetComponent <Image>();
                Text      component2 = transform.Find("lblTitle").GetComponent <Text>();
                Text      component3 = transform.Find("lblUnLock").GetComponent <Text>();
                Text      component4 = transform.Find("lblDesc").GetComponent <Text>();
                Text      component5 = transform.Find("lblCoinDesc").GetComponent <Text>();
                Button    component6 = transform.Find("btnGoto").GetComponent <Button>();
                component.SetSprite(CUIUtility.s_Sprite_Dynamic_Task_Dir + resList[i].dwIconID, list.m_belongedFormScript, true, false, false, false);
                component2.set_text(resList[i].szName);
                component3.set_text(resList[i].szUnOpenDesc);
                component4.set_text(resList[i].szDesc);
                component5.set_text(string.Empty);
                this.InitSysBtn(component6, (RES_GAME_ENTRANCE_TYPE)resList[i].bGotoID, component3.gameObject, component5.gameObject);
                component5.gameObject.CustomSetActive(false);
            }
        }
Example #2
0
        public void RefreshBuyDianQuanPanel()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_buyDianQuanFormPath);

            if (form != null)
            {
                DatabinTable <ResCouponsBuyInfo, uint> androidDianQuanBuyInfo = null;
                androidDianQuanBuyInfo = GameDataMgr.androidDianQuanBuyInfo;
                int index = 0;
                this.dianQuanBuyInfoList.Clear();
                androidDianQuanBuyInfo.Accept(x => this.dianQuanBuyInfoList.Add(x));
                this.SortDianQuanInfoList();
                CUIListScript component = form.transform.Find("pnlBg/pnlBody/List").GetComponent <CUIListScript>();
                component.SetElementAmount(this.dianQuanBuyInfoList.Count);
                for (index = 0; index < this.dianQuanBuyInfoList.Count; index++)
                {
                    ResCouponsBuyInfo    info     = this.dianQuanBuyInfoList[index];
                    CUIListElementScript elemenet = component.GetElemenet(index);
                    Image  image      = elemenet.transform.Find("imgIcon").GetComponent <Image>();
                    string prefabPath = string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Purchase_Dir, StringHelper.UTF8BytesToString(ref info.szImgPath));
                    image.SetSprite(prefabPath, form, true, false, false);
                    elemenet.transform.Find("diamondCntText").GetComponent <Text>().text = string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_DianQuan_Cnt"), info.dwBuyCount);
                    GameObject gameObject = elemenet.transform.Find("buyPanel/buyBtn").gameObject;
                    gameObject.transform.Find("Text").GetComponent <Text>().text = string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_DianQuan_Price"), info.dwBuyPrice);
                    GameObject obj3 = elemenet.transform.Find("additionPanel").gameObject;
                    obj3.CustomSetActive(false);
                    GameObject obj4 = elemenet.transform.Find("pnlRecommend").gameObject;
                    if ((info.bFirstGift > 0) && !this.IsDianQuanHaveFirstPay(info.dwID))
                    {
                        obj4.CustomSetActive(true);
                        obj4.transform.Find("txtDiscount").GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Pay_First_Pay_Double");
                    }
                    else
                    {
                        if (info.dwExtraGiftCnt > 0)
                        {
                            obj3.CustomSetActive(true);
                            obj3.transform.Find("Text").GetComponent <Text>().text = string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_Gift_Diamond_Cnt"), info.dwExtraGiftCnt);
                        }
                        obj4.CustomSetActive(false);
                    }
                    CUIEventScript  script4     = gameObject.GetComponent <CUIEventScript>();
                    stUIEventParams eventParams = new stUIEventParams();
                    eventParams.dianQuanBuyPar.giftId      = (int)info.dwID;
                    eventParams.dianQuanBuyPar.dianQuanCnt = (int)info.dwBuyCount;
                    script4.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_ClickDianQuanGift, eventParams);
                }
                if (CSysDynamicBlock.bLobbyEntryBlocked)
                {
                    Transform transform  = form.transform.FindChild("Button_OpenNobe");
                    Transform transform2 = form.transform.FindChild("Button_HelpMe");
                    Transform transform3 = form.transform.FindChild("Button_TongCai");
                    if (transform != null)
                    {
                        transform.gameObject.CustomSetActive(false);
                    }
                    if (transform2 != null)
                    {
                        transform2.gameObject.CustomSetActive(false);
                    }
                    if (transform3 != null)
                    {
                        transform3.gameObject.CustomSetActive(false);
                    }
                }
            }
        }
Example #3
0
        public static void OnRankGodDetailTab(int tabIndex, COMDT_RANKING_LIST_ITEM_EXTRA_MASTER_HERO masterHeroInfo, uint heroId)
        {
            CUIFormScript form = Singleton <CUIManager> .instance.GetForm(RankingSystem.s_rankingGodDetailForm);

            if (form != null)
            {
                GameObject widget = form.GetWidget(0);
                if (widget != null)
                {
                    ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(heroId);
                    if (dataByKey != null)
                    {
                        GameObject obj3   = Utility.FindChild(widget, "Panel_EquipInfo");
                        GameObject obj4   = Utility.FindChild(widget, "Panel_SymbolInfo");
                        string     str    = Utility.UTF8Convert(masterHeroInfo.stAcntInfo.szPlayerName);
                        string     szName = dataByKey.szName;
                        obj3.CustomSetActive(false);
                        obj4.CustomSetActive(false);
                        if (tabIndex == 0)
                        {
                            obj3.CustomSetActive(true);
                            CUIListScript componetInChild           = Utility.GetComponetInChild <CUIListScript>(obj3, "List");
                            int           bEquipNum                 = masterHeroInfo.stEquipList.bEquipNum;
                            ushort[]      defaultRecommendEquipInfo = new ushort[6];
                            if (bEquipNum > 0)
                            {
                                for (int j = 0; j < bEquipNum; j++)
                                {
                                    defaultRecommendEquipInfo[j] = (ushort)masterHeroInfo.stEquipList.EquipID[j];
                                }
                            }
                            else
                            {
                                defaultRecommendEquipInfo = Singleton <CEquipSystem> .instance.GetDefaultRecommendEquipInfo(heroId);

                                bEquipNum = defaultRecommendEquipInfo.Length;
                            }
                            componetInChild.SetElementAmount(bEquipNum);
                            for (int i = 0; i < bEquipNum; i++)
                            {
                                GameObject     gameObject = componetInChild.GetElemenet(i).gameObject;
                                CUIEventScript component  = gameObject.GetComponent <CUIEventScript>();
                                ushort         equipID    = defaultRecommendEquipInfo[i];
                                CEquipInfo     equipInfo  = Singleton <CEquipSystem> .instance.GetEquipInfo(equipID);

                                component.m_onClickEventParams.battleEquipPar.equipInfo = Singleton <CEquipSystem> .instance.GetEquipInfo(equipID);

                                component.m_onClickEventParams.tagStr  = str;
                                component.m_onClickEventParams.tagStr1 = szName;
                                CUICommonSystem.SetEquipIcon(equipID, gameObject, form);
                            }
                            if (bEquipNum > 0)
                            {
                                componetInChild.SelectElement(0, true);
                                componetInChild.GetElemenet(0).GetComponent <CUIEventScript>().OnPointerClick(null);
                                CUIEventScript script4 = componetInChild.GetElemenet(0).GetComponent <CUIEventScript>();
                                Singleton <CUIEventManager> .instance.DispatchUIEvent(script4.m_onClickEventID, script4.m_onClickEventParams);
                            }
                            else
                            {
                                componetInChild.SelectElement(-1, true);
                            }
                        }
                        else if (tabIndex == 1)
                        {
                            ListView <CSymbolItem> symbolList = new ListView <CSymbolItem>();
                            for (int k = 0; k < masterHeroInfo.stSymbolPageInfo.bSymbolPosNum; k++)
                            {
                                bool flag = false;
                                for (int n = 0; n < symbolList.Count; n++)
                                {
                                    if (symbolList[n].m_baseID == masterHeroInfo.stSymbolPageInfo.SymbolId[k])
                                    {
                                        CSymbolItem local1 = symbolList[n];
                                        local1.m_stackCount++;
                                        flag = true;
                                        break;
                                    }
                                }
                                if (!flag)
                                {
                                    CSymbolItem item = CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL, masterHeroInfo.stSymbolPageInfo.SymbolId[k], 1) as CSymbolItem;
                                    symbolList.Add(item);
                                }
                            }
                            CSymbolWearController.SortSymbolList(ref symbolList);
                            obj4.CustomSetActive(true);
                            CUIListScript script5 = Utility.GetComponetInChild <CUIListScript>(obj4, "List");
                            script5.SetElementAmount(symbolList.Count);
                            int num7 = 0;
                            for (int m = 0; m < symbolList.Count; m++)
                            {
                                GameObject p = script5.GetElemenet(m).gameObject;
                                Utility.GetComponetInChild <Image>(p, "imgIcon").SetSprite(symbolList[m].GetIconPath(), form, true, false, false);
                                Utility.GetComponetInChild <Text>(p, "SymbolName").text = symbolList[m].m_name;
                                char[] trimChars = new char[] { '\n' };
                                Utility.GetComponetInChild <Text>(p, "SymbolDesc").text   = CSymbolSystem.GetSymbolAttString(symbolList[m], true).TrimEnd(trimChars);
                                Utility.GetComponetInChild <Text>(p, "lblIconCount").text = string.Format("x{0}", symbolList[m].m_stackCount);
                                num7 += symbolList[m].m_SymbolData.wLevel;
                            }
                            Utility.GetComponetInChild <Text>(obj4, "symbolPageLvlText").text = num7.ToString();
                            string[] args = new string[] { str, szName };
                            Utility.GetComponetInChild <Text>(obj4, "heroSymbolText").text = Singleton <CTextManager> .instance.GetText("RankGodHeroSymbolDesc", args);
                        }
                    }
                }
            }
        }
Example #4
0
        public uint SetItemPriceInfo(CMallItemWidget itemWidget, ref stPayInfoSet payInfoSet)
        {
            uint result = 0u;

            if (itemWidget.m_priceContainer == null)
            {
                return(result);
            }
            itemWidget.m_priceContainer.SetActive(true);
            CMallItem.OldPriceType oldPriceType = this.GetOldPriceType();
            CUIListScript          component    = itemWidget.m_priceContainer.GetComponent <CUIListScript>();

            component.SetElementAmount(1);
            itemWidget.m_orTextContainer.CustomSetActive(false);
            CUIListElementScript elemenet = component.GetElemenet(0);

            if (elemenet == null)
            {
                return(result);
            }
            GameObject widget  = elemenet.GetWidget(0);
            GameObject widget2 = elemenet.GetWidget(1);
            GameObject widget3 = elemenet.GetWidget(2);
            GameObject widget4 = elemenet.GetWidget(4);
            GameObject widget5 = elemenet.GetWidget(3);
            GameObject widget6 = elemenet.GetWidget(5);

            if (widget == null || widget2 == null || widget3 == null || widget4 == null || widget5 == null || widget6 == null)
            {
                return(result);
            }
            for (int i = 0; i < payInfoSet.m_payInfoCount; i++)
            {
                if (payInfoSet.m_payInfos[i].m_payType == enPayType.Diamond || payInfoSet.m_payInfos[i].m_payType == enPayType.DiamondAndDianQuan)
                {
                    payInfoSet.m_payInfos[i].m_payType = enPayType.DianQuan;
                }
            }
            for (int j = 0; j < payInfoSet.m_payInfoCount; j++)
            {
                if (payInfoSet.m_payInfos[j].m_payType == enPayType.DianQuan || payInfoSet.m_payInfos[j].m_payType == enPayType.Diamond || payInfoSet.m_payInfos[j].m_payType == enPayType.DiamondAndDianQuan)
                {
                    result = payInfoSet.m_payInfos[j].m_payValue;
                    switch (oldPriceType)
                    {
                    case CMallItem.OldPriceType.None:
                    {
                        itemWidget.m_middleOrText.CustomSetActive(true);
                        itemWidget.m_bottomOrText.CustomSetActive(false);
                        widget.SetActive(false);
                        widget2.SetActive(false);
                        widget3.SetActive(false);
                        widget5.SetActive(true);
                        Text component2 = widget5.GetComponent <Text>();
                        component2.set_text(payInfoSet.m_payInfos[j].m_payValue.ToString());
                        Image component3 = widget6.GetComponent <Image>();
                        component3.SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false, false);
                        break;
                    }

                    case CMallItem.OldPriceType.FirstOne:
                        itemWidget.m_middleOrText.CustomSetActive(false);
                        itemWidget.m_bottomOrText.CustomSetActive(true);
                        if (j == 0)
                        {
                            widget2.SetActive(false);
                            widget5.SetActive(false);
                            widget.SetActive(true);
                            widget3.SetActive(true);
                            Text component4 = widget.GetComponent <Text>();
                            component4.set_text(payInfoSet.m_payInfos[j].m_oriValue.ToString());
                            Text component5 = widget3.GetComponent <Text>();
                            component5.set_text(payInfoSet.m_payInfos[j].m_payValue.ToString());
                            Image component6 = widget4.GetComponent <Image>();
                            component6.SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false, false);
                        }
                        else
                        {
                            widget2.SetActive(false);
                            widget.SetActive(false);
                            widget5.SetActive(false);
                            widget3.SetActive(true);
                            Text component7 = widget3.GetComponent <Text>();
                            component7.set_text(payInfoSet.m_payInfos[j].m_payValue.ToString());
                            Image component8 = widget4.GetComponent <Image>();
                            component8.SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false, false);
                        }
                        break;

                    case CMallItem.OldPriceType.SecondOne:
                        itemWidget.m_middleOrText.CustomSetActive(false);
                        itemWidget.m_bottomOrText.CustomSetActive(true);
                        if (j == 1)
                        {
                            widget2.SetActive(false);
                            widget5.SetActive(false);
                            widget.SetActive(true);
                            widget3.SetActive(true);
                            Text component9 = widget.GetComponent <Text>();
                            component9.set_text(payInfoSet.m_payInfos[j].m_oriValue.ToString());
                            Text component10 = widget3.GetComponent <Text>();
                            component10.set_text(payInfoSet.m_payInfos[j].m_payValue.ToString());
                            Image component11 = widget4.GetComponent <Image>();
                            component11.SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false, false);
                        }
                        else
                        {
                            widget2.SetActive(false);
                            widget.SetActive(false);
                            widget5.SetActive(false);
                            widget3.SetActive(true);
                            Text component12 = widget3.GetComponent <Text>();
                            component12.set_text(payInfoSet.m_payInfos[j].m_payValue.ToString());
                            Image component13 = widget4.GetComponent <Image>();
                            component13.SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false, false);
                        }
                        break;

                    case CMallItem.OldPriceType.Both:
                    {
                        itemWidget.m_middleOrText.CustomSetActive(true);
                        itemWidget.m_bottomOrText.CustomSetActive(false);
                        widget2.SetActive(false);
                        widget5.SetActive(false);
                        widget.SetActive(true);
                        widget3.SetActive(true);
                        Text component14 = widget.GetComponent <Text>();
                        component14.set_text(payInfoSet.m_payInfos[j].m_oriValue.ToString());
                        Text component15 = widget3.GetComponent <Text>();
                        component15.set_text(payInfoSet.m_payInfos[j].m_payValue.ToString());
                        Image component16 = widget4.GetComponent <Image>();
                        component16.SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false, false);
                        break;
                    }
                    }
                    break;
                }
            }
            return(result);
        }
Example #5
0
        private void RefreshOverviewForm(CUIFormScript overviewForm = null)
        {
            if (overviewForm == null)
            {
                overviewForm = Singleton <CUIManager> .GetInstance().GetForm("UGUI/Form/System/Achieve/Form_Trophy_Overview.prefab");
            }
            if (overviewForm == null)
            {
                return;
            }
            CUIListScript component = overviewForm.GetWidget(1).GetComponent <CUIListScript>();

            if (component != null)
            {
                component.SetElementAmount(this.m_CurAchieveSeries.Count);
            }
            GameObject widget  = overviewForm.GetWidget(2);
            GameObject widget2 = overviewForm.GetWidget(3);
            GameObject widget3 = overviewForm.GetWidget(7);
            GameObject widget4 = overviewForm.GetWidget(8);
            GameObject widget5 = overviewForm.GetWidget(9);
            GameObject widget6 = overviewForm.GetWidget(10);
            GameObject widget7 = overviewForm.GetWidget(4);
            GameObject widget8 = overviewForm.GetWidget(5);
            GameObject widget9 = overviewForm.GetWidget(6);

            if (widget == null || widget2 == null || widget3 == null || widget4 == null || widget7 == null || widget8 == null || widget9 == null || widget5 == null || widget6 == null)
            {
                DebugHelper.Assert(false, "Some of Trophy overview form widgets is null");
                return;
            }
            Text          component2        = widget.GetComponent <Text>();
            Text          component3        = widget2.GetComponent <Text>();
            Image         component4        = widget6.GetComponent <Image>();
            Image         component5        = widget3.GetComponent <Image>();
            Text          component6        = widget4.GetComponent <Text>();
            CAchieveInfo2 masterAchieveInfo = CAchieveInfo2.GetMasterAchieveInfo();

            if (masterAchieveInfo.LastDoneTrophyRewardInfo != null)
            {
                component4.SetSprite(masterAchieveInfo.LastDoneTrophyRewardInfo.GetTrophyImagePath(), overviewForm, true, false, false, false);
            }
            component2.set_text((masterAchieveInfo.LastDoneTrophyRewardInfo == null) ? "0" : string.Format("{0}", masterAchieveInfo.LastDoneTrophyRewardInfo.Cfg.dwTrophyLvl));
            if (masterAchieveInfo.GetWorldRank() == 0u)
            {
                widget5.CustomSetActive(true);
                widget2.CustomSetActive(false);
            }
            else
            {
                widget5.CustomSetActive(false);
                widget2.CustomSetActive(true);
                component3.set_text(masterAchieveInfo.GetWorldRank().ToString());
            }
            uint num  = 0u;
            uint num2 = 0u;

            masterAchieveInfo.GetTrophyProgress(ref num, ref num2);
            CTrophyRewardInfo trophyRewardInfoByPoint = masterAchieveInfo.GetTrophyRewardInfoByPoint(num);
            CTrophyRewardInfo trophyRewardInfoByIndex = masterAchieveInfo.GetTrophyRewardInfoByIndex(trophyRewardInfoByPoint.Index + 1);

            component5.set_fillAmount(Utility.Divide(num - trophyRewardInfoByIndex.MinPoint, trophyRewardInfoByIndex.MaxPoint - trophyRewardInfoByIndex.MinPoint));
            component6.set_text(string.Format("{0}/{1}", num - trophyRewardInfoByIndex.MinPoint, trophyRewardInfoByIndex.MaxPoint - trophyRewardInfoByIndex.MinPoint));
            Text              component7 = widget7.GetComponent <Text>();
            CUIListScript     component8 = widget8.GetComponent <CUIListScript>();
            CUIEventScript    component9 = widget9.GetComponent <CUIEventScript>();
            CTrophyRewardInfo firstTrophyRewardInfoAwardNotGot = masterAchieveInfo.GetFirstTrophyRewardInfoAwardNotGot();

            if (firstTrophyRewardInfoAwardNotGot == null)
            {
                widget7.CustomSetActive(false);
                widget9.CustomSetActive(false);
                component8.SetElementAmount(0);
            }
            else
            {
                bool       flag          = false;
                CUseable[] trophyRewards = firstTrophyRewardInfoAwardNotGot.GetTrophyRewards();
                if (!firstTrophyRewardInfoAwardNotGot.HasGotAward() && firstTrophyRewardInfoAwardNotGot.IsFinish())
                {
                    flag = true;
                }
                widget7.CustomSetActive(true);
                component7.set_text(string.Format("{0}级奖励:", firstTrophyRewardInfoAwardNotGot.Cfg.dwTrophyLvl));
                component8.SetElementAmount(trophyRewards.Length);
                for (int i = 0; i < trophyRewards.Length; i++)
                {
                    CUIListElementScript elemenet = component8.GetElemenet(i);
                    CUICommonSystem.SetItemCell(overviewForm, elemenet.GetWidget(0), trophyRewards[i], false, false, false, false);
                }
                widget9.CustomSetActive(true);
                if (flag)
                {
                    CUICommonSystem.SetButtonEnableWithShader(widget9.GetComponent <Button>(), true, true);
                    component9.SetUIEvent(enUIEventType.Click, enUIEventID.Achievement_Get_Trophy_Reward, new stUIEventParams
                    {
                        tag = firstTrophyRewardInfoAwardNotGot.Index
                    });
                }
                else
                {
                    CUICommonSystem.SetButtonEnableWithShader(widget9.GetComponent <Button>(), false, true);
                }
            }
        }
Example #6
0
        private void RefreshRankList()
        {
            if (this._rankingBtn != null)
            {
                CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(this._rankingBtn, "RankingList");
                int           amount          = 0;
                if (this.m_rankingType == RankingSystem.RankingSubView.Friend)
                {
                    this.myRankingNo = Singleton <RankingSystem> .instance.GetMyFriendRankNo();

                    if (this.myRankingNo != -1)
                    {
                        this.rankFriendList = Singleton <CFriendContoller> .instance.model.GetSortedRankingFriendList(COM_APOLLO_TRANK_SCORE_TYPE.COM_APOLLO_TRANK_SCORE_TYPE_LADDER_POINT);

                        if (this.rankFriendList != null)
                        {
                            amount = this.rankFriendList.Count + 1;
                            componetInChild.SetElementAmount(amount);
                            CUIListElementScript elemenet = null;
                            GameObject           go       = null;
                            for (int i = 0; i < amount; i++)
                            {
                                elemenet = componetInChild.GetElemenet(i);
                                if (elemenet != null)
                                {
                                    go = elemenet.gameObject;
                                    if (go != null)
                                    {
                                        this.OnUpdateRankingFriendElement(go, i);
                                    }
                                }
                            }
                        }
                    }
                }
                else if (this.m_rankingType == RankingSystem.RankingSubView.All)
                {
                    CSDT_RANKING_LIST_SUCC rankList = Singleton <RankingSystem> .instance.GetRankList(RankingSystem.RankingType.Ladder);

                    if (rankList != null)
                    {
                        amount = (int)rankList.dwItemNum;
                        componetInChild.SetElementAmount(amount);
                        CUIListElementScript script3    = null;
                        GameObject           gameObject = null;
                        for (int j = 0; j < amount; j++)
                        {
                            script3 = componetInChild.GetElemenet(j);
                            if (script3 != null)
                            {
                                gameObject = script3.gameObject;
                                if (gameObject != null)
                                {
                                    this.OnUpdateRankingAllElement(gameObject, j);
                                }
                            }
                        }
                    }
                }
            }
        }
    public void UpdateMailList(CustomMailType mailtype, ListView <CMail> mailList)
    {
        if (this.m_CUIForm == null || mailList == null)
        {
            return;
        }
        CUIListElementScript cUIListElementScript = null;
        int currentUTCTime = CRoleInfo.GetCurrentUTCTime();
        int num            = -1;

        if (mailtype == CustomMailType.FRIEND)
        {
            CUIListScript component = this.m_CUIForm.transform.FindChild("PanelFriMail/List").GetComponent <CUIListScript>();
            component.SetElementAmount(mailList.Count);
            for (int i = 0; i < mailList.Count; i++)
            {
                cUIListElementScript = component.GetElemenet(i);
                if (cUIListElementScript != null && cUIListElementScript.gameObject)
                {
                    this.UpdateListElenment(cUIListElementScript.gameObject, mailList[i]);
                }
                if (num == -1 && mailList[i].subType == 1)
                {
                    num = i;
                }
            }
            this.m_allReceiveFriButton.CustomSetActive(num >= 0);
        }
        else if (mailtype == CustomMailType.SYSTEM)
        {
            CUIListScript component2 = this.m_CUIForm.transform.FindChild("PanelSysMail/List").GetComponent <CUIListScript>();
            component2.SetElementAmount(mailList.Count);
            for (int j = 0; j < mailList.Count; j++)
            {
                if (cUIListElementScript != null && cUIListElementScript.gameObject)
                {
                    this.UpdateListElenment(cUIListElementScript.gameObject, mailList[j]);
                }
                if (num == -1 && mailList[j].subType == 2)
                {
                    num = j;
                }
            }
            this.m_allReceiveSysButton.CustomSetActive(num >= 0);
            this.m_SysDeleteBtn.CustomSetActive(mailList.Count > 0);
        }
        else if (mailtype == CustomMailType.FRIEND_INVITE)
        {
            CUIListScript component3 = this.m_CUIForm.transform.FindChild("PanelMsgMail/List").GetComponent <CUIListScript>();
            component3.SetElementAmount(mailList.Count);
            for (int k = 0; k < mailList.Count; k++)
            {
                if (cUIListElementScript != null && cUIListElementScript.gameObject)
                {
                    this.UpdateListElenment(cUIListElementScript.gameObject, mailList[k]);
                }
            }
            this.m_allDeleteMsgCenterButton.CustomSetActive(mailList.Count > 0);
        }
        else if (mailtype == CustomMailType.ASK_FOR)
        {
            GameObject gameObject     = Utility.FindChild(this.m_CUIForm.gameObject, "PanelAskForMail/NoAskFor");
            CRoleInfo  masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo != null)
            {
                if (gameObject != null)
                {
                    gameObject.GetComponent <Toggle>().set_isOn(masterRoleInfo.IsNoAskFor);
                }
            }
            else
            {
                DebugHelper.Assert(false, "Master Role Info is null");
                if (gameObject != null)
                {
                    gameObject.GetComponent <Toggle>().set_isOn(false);
                }
            }
            CUIListScript component4 = this.m_CUIForm.transform.FindChild("PanelAskForMail/List").GetComponent <CUIListScript>();
            component4.SetElementAmount(mailList.Count);
            this.m_allDeleteMsgCenterButton.CustomSetActive(false);
            this.m_allReceiveSysButton.CustomSetActive(false);
            this.m_AskForDeleteBtn.CustomSetActive(mailList.Count > 0);
        }
    }
Example #8
0
    public void Draw(CUIFormScript form)
    {
        if (form == null)
        {
            return;
        }
        GameObject widget = form.GetWidget(9);

        if (widget == null)
        {
            return;
        }
        Utility.FindChild(widget, "pnlHonorInfo").CustomSetActive(true);
        GameObject gameObject = Utility.FindChild(widget, "pnlHonorInfo/pnlContainer/HonorList");

        if (gameObject == null)
        {
            return;
        }
        CUIListScript component = gameObject.GetComponent <CUIListScript>();

        if (component == null)
        {
            return;
        }
        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Player_Info_Honor_Item_Enable, new CUIEventManager.OnUIEventHandler(this.OnHonorItemEnable));

        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Player_Info_Honor_Select_Change, new CUIEventManager.OnUIEventHandler(this.OnHonorSelectChange));

        Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Player_Info_Honor_Chosen, new CUIEventManager.OnUIEventHandler(this.OnHonorChosen));

        Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Player_Info_Honor_Item_Enable, new CUIEventManager.OnUIEventHandler(this.OnHonorItemEnable));

        Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Player_Info_Honor_Select_Change, new CUIEventManager.OnUIEventHandler(this.OnHonorSelectChange));

        Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.Player_Info_Honor_Chosen, new CUIEventManager.OnUIEventHandler(this.OnHonorChosen));

        this.m_honorInfoList.Clear();
        CPlayerProfile profile = Singleton <CPlayerInfoSystem> .GetInstance().GetProfile();

        Dictionary <int, COMDT_HONORINFO> honorDic = profile.GetHonorDic();
        int selectedHonorId = profile.GetSelectedHonorId();

        Dictionary <int, COMDT_HONORINFO> .Enumerator enumerator = honorDic.GetEnumerator();
        while (enumerator.MoveNext())
        {
            KeyValuePair <int, COMDT_HONORINFO> current = enumerator.get_Current();
            COMDT_HONORINFO value = current.get_Value();
            if (value != null)
            {
                this.m_honorInfoList.Add(value);
            }
        }
        if (this.m_honorInfoList != null)
        {
            this.m_honorInfoList.Sort(delegate(COMDT_HONORINFO l, COMDT_HONORINFO r)
            {
                if (l == null)
                {
                    return(1);
                }
                if (r == null)
                {
                    return(-1);
                }
                return(l.iHonorID.CompareTo(r.iHonorID));
            });
        }
        component.SetElementAmount(this.m_honorInfoList.get_Count());
        component.SelectElement(-1, false);
        COMDT_HONORINFO honorInfo = null;

        honorDic.TryGetValue(selectedHonorId, ref honorInfo);
        this.UpdateSelectedHonor(form, honorInfo);
    }
Example #9
0
        private void RefreshPrepareGuildPanelMemberList()
        {
            GameObject widget  = this.m_form.GetWidget(12);
            GameObject widget2 = this.m_form.GetWidget(13);
            GameObject widget3 = this.m_form.GetWidget(23);
            GameObject widget4 = this.m_form.GetWidget(25);
            GameObject widget5 = this.m_form.GetWidget(26);
            GameObject widget6 = this.m_form.GetWidget(24);

            widget2.CustomSetActive(true);
            widget3.CustomSetActive(true);
            widget6.CustomSetActive(true);
            widget.CustomSetActive(false);
            widget4.CustomSetActive(false);
            widget5.CustomSetActive(false);
            CUIListScript           component = this.m_form.GetWidget(28).GetComponent <CUIListScript>();
            ListView <GuildMemInfo> memList   = this.m_Model.CurrentPrepareGuildInfo.m_MemList;
            int num = (int)(this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.bMemCnt - 1);

            component.SetElementAmount(num);
            if (num > 0)
            {
                component.SelectElement(0, true);
            }
            int num2 = 0;

            for (int i = 0; i < (int)this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.bMemCnt; i++)
            {
                if (memList.get_Item(i).stBriefInfo.uulUid != this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.uulUid)
                {
                    CUIListElementScript elemenet = component.GetElemenet(num2);
                    if (elemenet != null)
                    {
                        this.SetPrepareGuildMemListItem(elemenet, memList.get_Item(i));
                    }
                    num2++;
                }
            }
            CUIHttpImageScript component2 = this.m_form.GetWidget(35).GetComponent <CUIHttpImageScript>();
            Image component3 = this.m_form.GetWidget(45).GetComponent <Image>();
            Image component4 = this.m_form.GetWidget(44).GetComponent <Image>();
            Text  component5 = this.m_form.GetWidget(14).GetComponent <Text>();
            Text  component6 = this.m_form.GetWidget(15).GetComponent <Text>();
            Text  component7 = this.m_form.GetWidget(16).GetComponent <Text>();

            component2.SetImageUrl(CGuildHelper.GetHeadUrl(this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.szHeadUrl));
            component5.text = this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.sName;
            component6.text = Singleton <CTextManager> .GetInstance().GetText("Common_Level_Format", new string[]
            {
                this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.dwLevel.ToString()
            });

            component7.text = this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.dwAbility.ToString();
            MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component3, CGuildHelper.GetNobeLevel(this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.uulUid, this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.stVip.level), false);

            MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component4, CGuildHelper.GetNobeHeadIconId(this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.uulUid, this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.stCreatePlayer.stVip.headIconId));

            Text  component8  = this.m_form.GetWidget(18).GetComponent <Text>();
            Text  component9  = this.m_form.GetWidget(19).GetComponent <Text>();
            Image component10 = this.m_form.GetWidget(17).GetComponent <Image>();
            uint  num3        = GameDataMgr.guildMiscDatabin.GetDataByKey(1u).dwConfValue;

            num3 = ((num3 >= 0u) ? num3 : 0u);
            CUITimerScript component11 = this.m_form.GetWidget(20).GetComponent <CUITimerScript>();
            uint           num4        = this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.dwRequestTime + GameDataMgr.guildMiscDatabin.GetDataByKey(2u).dwConfValue;
            int            num5        = (int)((ulong)num4 - (ulong)((long)CRoleInfo.GetCurrentUTCTime()));

            if (num5 < 0)
            {
                num5 = 0;
            }
            TimeSpan timeSpan = new TimeSpan(0, 0, 0, num5);

            component11.SetTotalTime((float)timeSpan.get_TotalSeconds());
            component11.StartTimer();
            component8.text = this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.sName;
            string prefabPath = CUIUtility.s_Sprite_Dynamic_GuildHead_Dir + this.m_Model.CurrentPrepareGuildInfo.stBriefInfo.dwHeadId;

            component10.SetSprite(prefabPath, this.m_form, true, false, false, false);
            component9.text = num.ToString() + "/" + num3.ToString();
        }
        public BuyPickDialog(bool isGift, COM_ITEM_TYPE type, uint id, RES_SHOPBUY_COINTYPE coinType, float discount, uint maxCount, BuyPickDialog.OnConfirmBuyDelegate onConfirm, CMallFactoryShopController.ShopProduct callContext, BuyPickDialog.OnConfirmBuyCommonDelegate onConfirmCommon = null, CUIEvent uieventPars = null, bool bfromFactoyShop = false)
        {
            this.m_bShowBigIcon = (callContext != null && callContext.GetSpecialIconPath() != null);
            CUIFormScript cUIFormScript;

            if (this.m_bShowBigIcon)
            {
                cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(BuyPickDialog.s_Gift_Big_Icon_Form_Path, false, true);
            }
            else
            {
                cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(BuyPickDialog.s_Gift_Form_Path, false, true);
            }
            if (null != cUIFormScript)
            {
                this._root                 = cUIFormScript.gameObject;
                this._usb                  = CUseableManager.CreateUseable(type, id, 0);
                this._count                = 1u;
                this._bHeroSkinGift        = false;
                this._bDynamicCorrectPrice = false;
                this._heroSkinGiftCost     = 0u;
                this._maxCount             = maxCount;
                if (this._maxCount == 0u)
                {
                    this._maxCount = 999u;
                }
                this._onConfirm        = onConfirm;
                this._callContext      = callContext;
                this._onConfirmdCommon = onConfirmCommon;
                this._uieventPars      = uieventPars;
                this._coinType         = coinType;
                this._realDiscount     = discount;
                if (this._usb != null)
                {
                    this._countText = Utility.GetComponetInChild <Text>(this._root, "Panel/Count");
                    this._costText  = Utility.GetComponetInChild <Text>(this._root, "Panel/Cost");
                    this._descText  = Utility.GetComponetInChild <Text>(this._root, "Panel/lblDesc");
                    CItem cItem = new CItem(0uL, id, 0, 0);
                    uint  key   = (uint)cItem.m_itemData.EftParam[0];
                    ResRandomRewardStore dataByKey = GameDataMgr.randomRewardDB.GetDataByKey(key);
                    ListView <CUseable>  listView  = new ListView <CUseable>();
                    for (int i = 0; i < dataByKey.astRewardDetail.Length; i++)
                    {
                        if (dataByKey.astRewardDetail[i].bItemType != 0)
                        {
                            CUseable cUseable = CUseableManager.CreateUsableByRandowReward((RES_RANDOM_REWARD_TYPE)dataByKey.astRewardDetail[i].bItemType, (int)dataByKey.astRewardDetail[i].dwLowCnt, dataByKey.astRewardDetail[i].dwItemID);
                            if (cUseable != null)
                            {
                                listView.Add(cUseable);
                            }
                        }
                    }
                    if (this._descText != null)
                    {
                        this._descText.set_text(string.IsNullOrEmpty(cItem.m_mallDescription) ? cItem.m_description : cItem.m_mallDescription);
                    }
                    uint num  = 0u;
                    int  num2 = 0;
                    if (this._usb.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP)
                    {
                        CItem cItem2 = (CItem)this._usb;
                        if (cItem2 != null && cItem2.m_itemData != null && cItem2.m_itemData.bType == 4)
                        {
                            this._bDynamicCorrectPrice = (cItem2.m_itemData.EftParam[3] > 0f);
                        }
                    }
                    CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(cUIFormScript.gameObject, "Panel/itemGroup");
                    componetInChild.SetElementAmount(listView.Count);
                    for (int j = 0; j < listView.Count; j++)
                    {
                        CUIListElementScript elemenet = componetInChild.GetElemenet(j);
                        this.UpdateElement(elemenet, listView[j], this.m_bShowBigIcon);
                        if (listView[j].m_type == COM_ITEM_TYPE.COM_OBJTYPE_HERO)
                        {
                            this._bHeroSkinGift = true;
                            CHeroItem cHeroItem      = listView[j] as CHeroItem;
                            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                            if (masterRoleInfo != null && masterRoleInfo.IsOwnHero(cHeroItem.m_heroData.dwCfgID))
                            {
                                num += CHeroInfo.GetHeroCost(cHeroItem.m_heroData.dwCfgID, coinType);
                                num2++;
                            }
                        }
                        else if (listView[j].m_type == COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN)
                        {
                            this._bHeroSkinGift = true;
                            CHeroSkin cHeroSkin       = listView[j] as CHeroSkin;
                            CRoleInfo masterRoleInfo2 = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                            if (masterRoleInfo2 != null && masterRoleInfo2.IsHaveHeroSkin(cHeroSkin.m_heroId, cHeroSkin.m_skinId, false))
                            {
                                num += CSkinInfo.GetHeroSkinCost(cHeroSkin.m_heroId, cHeroSkin.m_skinId, coinType);
                                num2++;
                            }
                        }
                    }
                    this._coinUsb = CUseableManager.CreateCoinUseable(coinType, 0);
                    if (this._coinUsb != null)
                    {
                        Utility.GetComponetInChild <Image>(this._root, "Panel/Cost/CoinType").SetSprite(CUIUtility.GetSpritePrefeb(this._coinUsb.GetIconPath(), false, false), false);
                    }
                    Text componetInChild2 = Utility.GetComponetInChild <Text>(this._root, "Panel/costDescText");
                    componetInChild2.set_text(string.Empty);
                    if (this._bHeroSkinGift && this._bDynamicCorrectPrice)
                    {
                        uint   buyPrice         = this._usb.GetBuyPrice(coinType);
                        Button componetInChild3 = Utility.GetComponetInChild <Button>(this._root, "Panel/Button_Sale");
                        if (num2 >= listView.Count)
                        {
                            CUICommonSystem.SetButtonEnableWithShader(componetInChild3, false, true);
                            componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Gift_Can_Not_Buy_Tip"));
                            this._heroSkinGiftCost = 0u;
                        }
                        else
                        {
                            CUICommonSystem.SetButtonEnableWithShader(componetInChild3, true, true);
                            componetInChild2.set_text(Singleton <CTextManager> .GetInstance().GetText("Gift_Own_Hero_Skin_Tip"));
                            uint num3 = CMallFactoryShopController.ShopProduct.SConvertWithRealDiscount(buyPrice - num, this._realDiscount);
                            if (buyPrice >= num && num3 >= buyPrice / 10u)
                            {
                                this._heroSkinGiftCost = num3;
                            }
                            else
                            {
                                this._heroSkinGiftCost = buyPrice / 10u;
                            }
                        }
                        if (this._callContext != null)
                        {
                            this._callContext.m_bChangeGiftPrice = true;
                            this._callContext.m_newGiftPrice     = this._heroSkinGiftCost;
                        }
                    }
                }
                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_CloseForm, new CUIEventManager.OnUIEventHandler(this.OnCloseForm));

                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Add, new CUIEventManager.OnUIEventHandler(this.OnClickAdd));

                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Dec, new CUIEventManager.OnUIEventHandler(this.OnClickDec));

                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Max, new CUIEventManager.OnUIEventHandler(this.OnClickMax));

                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Confirm, new CUIEventManager.OnUIEventHandler(this.OnClickConfirm));

                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_Cancel, new CUIEventManager.OnUIEventHandler(this.OnClickCancel));

                Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.BuyPick_ConfirmFactoryShopBuy, new CUIEventManager.OnUIEventHandler(this.OnConfirmFactoryShopBuy));

                this.ValidateDynamic();
            }
        }
Example #11
0
        public static void OnRankGodDetailTab(int tabIndex, COMDT_RANKING_LIST_ITEM_EXTRA_MASTER_HERO masterHeroInfo, uint heroId)
        {
            CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(RankingSystem.s_rankingGodDetailForm);

            if (form == null)
            {
                return;
            }
            GameObject widget = form.GetWidget(0);

            if (widget == null)
            {
                return;
            }
            ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(heroId);

            if (dataByKey == null)
            {
                return;
            }
            GameObject gameObject  = Utility.FindChild(widget, "Panel_EquipInfo");
            GameObject gameObject2 = Utility.FindChild(widget, "Panel_SymbolInfo");
            string     text        = Utility.UTF8Convert(masterHeroInfo.stAcntInfo.szPlayerName);
            string     szName      = dataByKey.szName;

            gameObject.CustomSetActive(false);
            gameObject2.CustomSetActive(false);
            if (tabIndex == 0)
            {
                gameObject.CustomSetActive(true);
                CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(gameObject, "List");
                int           num             = (int)masterHeroInfo.stEquipList.bEquipNum;
                ushort[]      array           = new ushort[6];
                if (num > 0)
                {
                    for (int i = 0; i < num; i++)
                    {
                        array[i] = (ushort)masterHeroInfo.stEquipList.EquipID[i];
                    }
                }
                else
                {
                    ResRecommendEquipInBattle defaultRecommendEquipInfo = Singleton <CEquipSystem> .get_instance().GetDefaultRecommendEquipInfo(heroId, 1u);

                    if (defaultRecommendEquipInfo != null)
                    {
                        array = defaultRecommendEquipInfo.RecommendEquipID;
                    }
                    num = array.Length;
                }
                componetInChild.SetElementAmount(num);
                for (int j = 0; j < num; j++)
                {
                    GameObject     gameObject3 = componetInChild.GetElemenet(j).gameObject;
                    CUIEventScript component   = gameObject3.GetComponent <CUIEventScript>();
                    ushort         num2        = array[j];
                    CEquipInfo     equipInfo   = CEquipSystem.GetEquipInfo(num2);
                    component.m_onClickEventParams.battleEquipPar.equipInfo = CEquipSystem.GetEquipInfo(num2);
                    component.m_onClickEventParams.tagStr  = text;
                    component.m_onClickEventParams.tagStr1 = szName;
                    CUICommonSystem.SetEquipIcon(num2, gameObject3, form);
                }
                if (num > 0)
                {
                    componetInChild.SelectElement(0, true);
                    componetInChild.GetElemenet(0).GetComponent <CUIEventScript>().OnPointerClick(null);
                    CUIEventScript component2 = componetInChild.GetElemenet(0).GetComponent <CUIEventScript>();
                    Singleton <CUIEventManager> .get_instance().DispatchUIEvent(component2.m_onClickEventID, component2.m_onClickEventParams);
                }
                else
                {
                    componetInChild.SelectElement(-1, true);
                }
            }
            else if (tabIndex == 1)
            {
                ListView <CSymbolItem> listView = new ListView <CSymbolItem>();
                for (int k = 0; k < (int)masterHeroInfo.stSymbolPageInfo.bSymbolPosNum; k++)
                {
                    bool flag = false;
                    for (int l = 0; l < listView.get_Count(); l++)
                    {
                        if (listView.get_Item(l).m_baseID == masterHeroInfo.stSymbolPageInfo.SymbolId[k])
                        {
                            listView.get_Item(l).m_stackCount++;
                            flag = true;
                            break;
                        }
                    }
                    if (!flag)
                    {
                        CSymbolItem cSymbolItem = CUseableManager.CreateUseable(5, masterHeroInfo.stSymbolPageInfo.SymbolId[k], 1) as CSymbolItem;
                        listView.Add(cSymbolItem);
                    }
                }
                CSymbolWearController.SortSymbolList(ref listView);
                gameObject2.CustomSetActive(true);
                CUIListScript componetInChild2 = Utility.GetComponetInChild <CUIListScript>(gameObject2, "List");
                componetInChild2.SetElementAmount(listView.get_Count());
                int num3 = 0;
                for (int m = 0; m < listView.get_Count(); m++)
                {
                    GameObject gameObject4      = componetInChild2.GetElemenet(m).gameObject;
                    Image      componetInChild3 = Utility.GetComponetInChild <Image>(gameObject4, "imgIcon");
                    componetInChild3.SetSprite(listView.get_Item(m).GetIconPath(), form, true, false, false, false);
                    Text componetInChild4 = Utility.GetComponetInChild <Text>(gameObject4, "SymbolName");
                    componetInChild4.text = listView.get_Item(m).m_name;
                    Text componetInChild5 = Utility.GetComponetInChild <Text>(gameObject4, "SymbolDesc");
                    componetInChild5.text = CSymbolSystem.GetSymbolAttString(listView.get_Item(m), true).TrimEnd(new char[]
                    {
                        '\n'
                    });
                    Text componetInChild6 = Utility.GetComponetInChild <Text>(gameObject4, "lblIconCount");
                    componetInChild6.text = string.Format("x{0}", listView.get_Item(m).m_stackCount);
                    num3 += (int)listView.get_Item(m).m_SymbolData.wLevel *listView.get_Item(m).m_stackCount;
                }
                Utility.GetComponetInChild <Text>(gameObject2, "symbolPageLvlText").text = num3.ToString();
                Utility.GetComponetInChild <Text>(gameObject2, "heroSymbolText").text    = Singleton <CTextManager> .get_instance().GetText("RankGodHeroSymbolDesc", new string[]
                {
                    text,
                    szName
                });
            }
        }
Example #12
0
        public void Refresh()
        {
            if (Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo() != null)
            {
                HeroTalentViewInfo heroTalentViewInfo = this.GetHeroTalentViewInfo(this.m_heroCaption);
                if (heroTalentViewInfo != null)
                {
                    uint configId = (uint)heroTalentViewInfo.m_hero.handle.TheActorMeta.ConfigId;
                    List <stTalentEventParams> list = new List <stTalentEventParams>();
                    for (int i = heroTalentViewInfo.m_talentLevel - 1; i >= 0; i--)
                    {
                        if (heroTalentViewInfo.m_learnTalentList[i] == 0)
                        {
                            for (int k = 0; k < heroTalentViewInfo.m_heroTalentLevelInfoList[i].m_tarlentLibList.Count; k++)
                            {
                                if (heroTalentViewInfo.m_heroTalentLevelInfoList[i].m_tarlentLibList[k] == null)
                                {
                                    return;
                                }
                                stTalentEventParams item = new stTalentEventParams {
                                    talentLevelIndex = (byte)i,
                                    talentInfo       = heroTalentViewInfo.m_heroTalentLevelInfoList[i].m_tarlentLibList[k],
                                    isCanLearn       = true
                                };
                                if (!IsNeedBuy(i, k) || IsBuyTalent(configId, i))
                                {
                                    item.isHaveTalent = true;
                                    list.Add(item);
                                }
                            }
                            break;
                        }
                    }
                    GameObject   gameObject = this.m_root.transform.Find("List1").gameObject;
                    GameObject[] objArray   = new GameObject[] { gameObject.transform.Find("talentCell1").gameObject, gameObject.transform.Find("talentCell2").gameObject, gameObject.transform.Find("talentCell3").gameObject };
                    for (int j = 0; j < objArray.Length; j++)
                    {
                        GameObject obj3 = objArray[j];
                        if (j < list.Count)
                        {
                            obj3.CustomSetActive(true);
                            stTalentEventParams params2 = list[j];
                            Image component             = obj3.transform.Find("imgIcon").GetComponent <Image>();
                            Text  text = obj3.transform.Find("panelDesc/Text").GetComponent <Text>();
                            component.SetSprite(CUIUtility.s_Sprite_Dynamic_Talent_Dir + params2.talentInfo.dwIcon, Singleton <CBattleSystem> .GetInstance().m_FormScript, true, false, false);
                            text.text = StringHelper.UTF8BytesToString(ref params2.talentInfo.szDesc2);
                            CUIEventScript  script      = obj3.GetComponent <CUIEventScript>();
                            stUIEventParams eventParams = new stUIEventParams {
                                talentParams = params2
                            };
                            script.SetUIEvent(enUIEventType.Click, enUIEventID.Talent_BtnLearnClick, eventParams);
                        }
                        else
                        {
                            obj3.CustomSetActive(false);
                        }
                    }
                    if (list.Count > 0)
                    {
                        gameObject.gameObject.CustomSetActive(true);
                    }
                    else
                    {
                        gameObject.gameObject.CustomSetActive(false);
                    }
                    CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_TalentFormPath);

                    if (form != null)
                    {
                        CUIListScript[] scriptArray = new CUIListScript[] { form.gameObject.transform.Find("Panel/PanelLeft/List1").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List2").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List3").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List4").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List5").GetComponent <CUIListScript>() };
                        for (int m = 0; m < this.m_talentRuleList.Count; m++)
                        {
                            HeroTalentLevelInfo info3 = heroTalentViewInfo.m_heroTalentLevelInfoList[m];
                            uint          num6        = heroTalentViewInfo.m_learnTalentList[m];
                            bool          flag        = heroTalentViewInfo.m_talentLevel > m;
                            CUIListScript script3     = scriptArray[m];
                            script3.SetElementAmount(info3.m_tarlentLibList.Count);
                            GameObject obj4 = script3.gameObject.transform.Find("Current").gameObject;
                            obj4.CustomSetActive(false);
                            for (int n = 0; n < info3.m_tarlentLibList.Count; n++)
                            {
                                GameObject     obj5    = script3.GetElemenet(n).gameObject.transform.Find("talentCell").gameObject;
                                Image          image   = obj5.transform.Find("imgIcon").GetComponent <Image>();
                                Image          image3  = obj5.transform.Find("lock").GetComponent <Image>();
                                Text           text2   = obj5.transform.Find("lblName").GetComponent <Text>();
                                CanvasGroup    group   = obj5.GetComponent <CanvasGroup>();
                                CUIEventScript script4 = obj5.GetComponent <CUIEventScript>();
                                ResTalentLib   lib     = info3.m_tarlentLibList[n];
                                if (lib == null)
                                {
                                    return;
                                }
                                image.SetSprite(CUIUtility.s_Sprite_Dynamic_Talent_Dir + lib.dwIcon, form, true, false, false);
                                image.color = CUIUtility.s_Color_White;
                                text2.text  = StringHelper.UTF8BytesToString(ref lib.szName);
                                stTalentEventParams params4 = new stTalentEventParams {
                                    talentLevelIndex = (byte)m,
                                    talentInfo       = info3.m_tarlentLibList[n],
                                    isCanLearn       = false
                                };
                                if (IsNeedBuy(m, n) && !IsBuyTalent(configId, m))
                                {
                                    params4.isHaveTalent = false;
                                    image3.gameObject.CustomSetActive(true);
                                }
                                else
                                {
                                    params4.isHaveTalent = true;
                                    image3.gameObject.CustomSetActive(false);
                                }
                                if (flag)
                                {
                                    if (num6 == 0)
                                    {
                                        if (params4.isHaveTalent)
                                        {
                                            params4.isCanLearn = true;
                                        }
                                        obj4.CustomSetActive(true);
                                    }
                                    else if (lib.dwID != num6)
                                    {
                                        group.alpha = 0.25f;
                                    }
                                    else
                                    {
                                        group.alpha = 1f;
                                    }
                                    image.color  = CUIUtility.s_Color_White;
                                    image3.color = CUIUtility.s_Color_White;
                                    text2.color  = CUIUtility.s_Color_White;
                                }
                                else
                                {
                                    image.color  = CUIUtility.s_Color_GrayShader;
                                    image3.color = CUIUtility.s_Color_GrayShader;
                                    text2.color  = CUIUtility.s_Color_Grey;
                                }
                                stUIEventParams params5 = new stUIEventParams {
                                    talentParams = params4
                                };
                                script4.SetUIEvent(enUIEventType.Click, enUIEventID.Talent_ItemClick, params5);
                            }
                        }
                    }
                }
            }
        }
Example #13
0
        public static void SetGetInfoToList(CUIFormScript formScript, CUIListScript list, CUseable itemUseable)
        {
            ResDT_ItemSrc_Info[] astSrcInfo = null;
            if (itemUseable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP)
            {
                astSrcInfo = ((CItem)itemUseable).m_itemData.astSrcInfo;
            }
            else if (itemUseable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMEQUIP)
            {
                astSrcInfo = ((CEquip)itemUseable).m_equipData.astSrcInfo;
            }
            else if (itemUseable.m_type == COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL)
            {
                astSrcInfo = ((CSymbolItem)itemUseable).m_SymbolData.astSrcInfo;
            }
            else
            {
                return;
            }
            int amount = 0;

            for (int i = 0; i < astSrcInfo.Length; i++)
            {
                if (astSrcInfo[i].bType == 0)
                {
                    break;
                }
                amount++;
            }
            if (list != null)
            {
                list.SetElementAmount(amount);
                for (int j = 0; j < amount; j++)
                {
                    Transform           transform   = list.GetElemenet(j).transform.Find("sourceCell");
                    Text                component   = transform.Find("lblName").GetComponent <Text>();
                    Text                text2       = transform.Find("lblLevel").GetComponent <Text>();
                    Button              button      = transform.Find("lblOpen").GetComponent <Button>();
                    Text                text3       = transform.Find("lblClose").GetComponent <Text>();
                    Text                text4       = transform.Find("Elite").GetComponent <Text>();
                    byte                bType       = astSrcInfo[j].bType;
                    int                 dwID        = (int)astSrcInfo[j].dwID;
                    bool                bActive     = false;
                    stUIEventParams     eventParams = new stUIEventParams();
                    stItemGetInfoParams params2     = new stItemGetInfoParams();
                    eventParams.itemGetInfoParams         = params2;
                    eventParams.itemGetInfoParams.getType = bType;
                    if (bType == 1)
                    {
                        ResLevelCfgInfo dataByKey = GameDataMgr.levelDatabin.GetDataByKey(dwID);
                        bActive = Singleton <CAdventureSys> .GetInstance().IsLevelOpen(dataByKey.iCfgID);

                        eventParams.itemGetInfoParams.levelInfo = dataByKey;
                        eventParams.itemGetInfoParams.isCanDo   = bActive;
                        if (!bActive)
                        {
                            eventParams.itemGetInfoParams.errorStr = Singleton <CTextManager> .instance.GetText("Hero_Level_Not_Open");
                        }
                        component.text = StringHelper.UTF8BytesToString(ref dataByKey.szName);
                        text2.text     = dataByKey.iChapterId + "-" + dataByKey.bLevelNo;
                        if (text4 != null)
                        {
                            text4.gameObject.CustomSetActive(dataByKey.bLevelDifficulty == 2);
                        }
                    }
                    button.gameObject.CustomSetActive(bActive);
                    text3.gameObject.CustomSetActive(!bActive);
                    CUIEventScript script = button.gameObject.GetComponent <CUIEventScript>();
                    if (script == null)
                    {
                        script = transform.gameObject.AddComponent <CUIEventScript>();
                        script.Initialize(formScript);
                    }
                    script.SetUIEvent(enUIEventType.Click, enUIEventID.Tips_ItemSourceElementClick, eventParams);
                }
                list.gameObject.CustomSetActive(true);
            }
        }
        public static void RefreshInviteGuildMemberList(CUIFormScript form, int allGuildMemberLen)
        {
            CUIListScript component = form.GetWidget(5).GetComponent <CUIListScript>();

            component.SetElementAmount(allGuildMemberLen);
        }
Example #15
0
        public static void InitLevelList(CUIFormScript form, int currentChapter, int levelNo, int difficulty)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            ResChapterInfo dataByKey = GameDataMgr.chapterInfoDatabin.GetDataByKey((long)currentChapter);

            DebugHelper.Assert(dataByKey != null);
            bool flag = Singleton <CFunctionUnlockSys> .get_instance().ChapterIsUnlock(dataByKey.dwChapterId);

            PVE_ADV_COMPLETE_INFO     pVE_ADV_COMPLETE_INFO     = masterRoleInfo.pveLevelDetail[difficulty - 1];
            PVE_CHAPTER_COMPLETE_INFO pVE_CHAPTER_COMPLETE_INFO = pVE_ADV_COMPLETE_INFO.ChapterDetailList[currentChapter - 1];

            PVE_LEVEL_COMPLETE_INFO[] levelDetailList = pVE_CHAPTER_COMPLETE_INFO.LevelDetailList;
            CUIListScript             component       = form.transform.FindChild("LevelList").GetComponent <CUIListScript>();

            component.SetElementAmount(levelDetailList.Length);
            Sprite     sprite       = CUIUtility.GetSpritePrefeb(CAdventureView.GetLevelFramePath(difficulty), false, false).GetComponent <SpriteRenderer>().sprite;
            GameObject spritePrefeb = CUIUtility.GetSpritePrefeb(CAdventureView.GetLevelSelectFramePath(difficulty), false, false);

            for (int i = 0; i < levelDetailList.Length; i++)
            {
                CUIListElementScript elemenet   = component.GetElemenet(i);
                ResLevelCfgInfo      dataByKey2 = GameDataMgr.levelDatabin.GetDataByKey((long)levelDetailList[i].iLevelID);
                DebugHelper.Assert(dataByKey2 != null, "Can't find LevelConfig = {0}", new object[]
                {
                    levelDetailList[i].iLevelID
                });
                bool flag2   = levelDetailList[i].levelStatus == 0 || !flag;
                bool bActive = levelDetailList[i].levelStatus == 1 && flag;
                int  starNum = CAdventureSys.GetStarNum(levelDetailList[i].bStarBits);
                elemenet.transform.FindChild("Unlock/star1").GetComponent <Image>().color   = ((starNum < 1) ? CUIUtility.s_Color_GrayShader : Color.white);
                elemenet.transform.FindChild("Unlock/star2").GetComponent <Image>().color   = ((starNum < 2) ? CUIUtility.s_Color_GrayShader : Color.white);
                elemenet.transform.FindChild("Unlock/star3").GetComponent <Image>().color   = ((starNum < 3) ? CUIUtility.s_Color_GrayShader : Color.white);
                elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().text = Utility.UTF8Convert(dataByKey2.szName);
                if (levelNo == i + 1 && !flag2)
                {
                    elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().color = CAdventureView.s_Adv_Level_Colors[0];
                }
                else if (!flag2)
                {
                    elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().color = CAdventureView.s_Adv_Level_Colors[1];
                }
                else
                {
                    elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().color = CAdventureView.s_Adv_Level_Colors[2];
                }
                elemenet.transform.FindChild("SelectedFrame").GetComponent <Image>().color        = CAdventureView.s_Adv_Difficult_Color[difficulty - 1];
                elemenet.transform.FindChild("SelectedFrame/Image1").GetComponent <Image>().color = CAdventureView.s_Adv_Difficult_Color[CAdventureView.s_Adv_Difficult_Color.Length / 2 + difficulty - 1];
                elemenet.transform.FindChild("SelectedFrame/Image2").GetComponent <Image>().color = CAdventureView.s_Adv_Difficult_Color[CAdventureView.s_Adv_Difficult_Color.Length / 2 + difficulty - 1];
                elemenet.transform.FindChild("SelectedFrame/SelectedFrame").GetComponent <Image>().SetSprite(spritePrefeb, false);
                elemenet.transform.FindChild("New").gameObject.CustomSetActive(bActive);
                elemenet.GetComponent <CUIEventScript>().m_onClickEventID         = enUIEventID.Adv_SelectLevel;
                elemenet.GetComponent <CUIEventScript>().m_onClickEventParams.tag = i + 1;
                elemenet.transform.FindChild("Unlock").gameObject.CustomSetActive(!flag2);
                elemenet.transform.FindChild("Lock").gameObject.CustomSetActive(flag2);
                elemenet.m_selectedSprite = sprite;
                elemenet.GetComponent <Image>().SetSprite((levelNo - 1 != i) ? elemenet.m_defaultSprite : sprite, elemenet.m_selectedLayout);
            }
            component.SelectElement(levelNo - 1, true);
        }
        public static void SetInviteFriendData(CUIFormScript form, COM_INVITE_JOIN_TYPE joinType)
        {
            ListView <COMDT_FRIEND_INFO> allFriendList = Singleton <CInviteSystem> .instance.GetAllFriendList();

            int           count     = allFriendList.Count;
            int           num       = 0;
            CUIListScript component = form.GetWidget(2).GetComponent <CUIListScript>();

            component.SetElementAmount(count);
            form.GetWidget(3).gameObject.CustomSetActive(allFriendList.Count == 0);
            for (int i = 0; i < count; i++)
            {
                if (allFriendList[i].bIsOnline == 1)
                {
                    num++;
                }
            }
            Text component2 = form.GetWidget(4).GetComponent <Text>();

            component2.set_text(Singleton <CTextManager> .GetInstance().GetText("Common_Online_Member", new string[]
            {
                num.ToString(),
                count.ToString()
            }));
            GameObject widget     = form.GetWidget(13);
            Text       component3 = widget.GetComponent <Text>();

            if (component3 != null)
            {
                if (Singleton <CFriendContoller> .instance.model.friendReserve.BServerEnableReverse)
                {
                    component3.set_text(Singleton <CTextManager> .instance.GetText("Reserve_Condition_Tip"));
                }
                else
                {
                    component3.set_text(Singleton <CTextManager> .instance.GetText("Reserve_ServerDisable_Tip"));
                }
            }
            GameObject widget2 = form.GetWidget(9);

            if (CSysDynamicBlock.bLobbyEntryBlocked || ApolloConfig.IsUseCEPackage() >= 1)
            {
                widget2.CustomSetActive(false);
            }
            else
            {
                Text       component4  = Utility.FindChild(widget2, "ShareInviteButton/Text").GetComponent <Text>();
                GameObject gameObject  = widget2.transform.FindChild("ShareInviteButton/IconQQ").gameObject;
                GameObject gameObject2 = widget2.transform.FindChild("ShareInviteButton/IconWeixin").gameObject;
                bool       flag        = Singleton <CRoomSystem> .GetInstance().IsInRoom || Singleton <CMatchingSystem> .GetInstance().IsInMatchingTeam;

                if (flag)
                {
                    widget2.CustomSetActive(true);
                    if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.QQ)
                    {
                        component4.set_text(Singleton <CTextManager> .GetInstance().GetText("Share_Room_Info_QQ"));
                        gameObject.CustomSetActive(true);
                        gameObject2.CustomSetActive(false);
                    }
                    else if (Singleton <ApolloHelper> .GetInstance().CurPlatform == ApolloPlatform.Wechat)
                    {
                        component4.set_text(Singleton <CTextManager> .GetInstance().GetText("Share_Room_Info_WX"));
                        gameObject.CustomSetActive(false);
                        gameObject2.CustomSetActive(true);
                    }
                }
                else
                {
                    widget2.CustomSetActive(false);
                }
            }
        }
    private void UpdateCreditScore(CUIFormScript form)
    {
        if (form == null)
        {
            return;
        }
        GameObject widget = form.GetWidget(9);

        if (widget == null)
        {
            return;
        }
        GameObject gameObject = Utility.FindChild(widget, "pnlCreditScoreInfo");

        if (gameObject == null)
        {
            return;
        }
        gameObject.CustomSetActive(true);
        CPlayerProfile profile = Singleton <CPlayerInfoSystem> .GetInstance().GetProfile();

        uint creditScore = profile.creditScore;

        this.m_CreditLevelInfo = this.GetCreditLevelInfoByScore((int)creditScore);
        if (this.m_CreditLevelInfo == null)
        {
            return;
        }
        Text       componetInChild = Utility.GetComponetInChild <Text>(gameObject, "pnlContainer/pnlCreditScore/CreditValue/ScoreValue");
        GameObject gameObject2     = Utility.FindChild(gameObject, "pnlContainer/pnlCreditScore/CreditValue/CreditLevel/LevelValue");
        GameObject gameObject3     = Utility.FindChild(gameObject, "pnlContainer/pnlCreditAward/SelfAward");
        GameObject gameObject4     = Utility.FindChild(gameObject, "pnlContainer/pnlCreditAward/ComplaintInfo");

        if (componetInChild != null)
        {
            componetInChild.text = creditScore.ToString();
        }
        Image componetInChild2 = Utility.GetComponetInChild <Image>(gameObject, "pnlContainer/pnlCreditScore/IconBg");

        if (componetInChild2 != null)
        {
            componetInChild2.SetSprite(this.GetBgByCreditLevel(this.m_CreditLevelInfo.bCreditLevel), form, true, false, false, false);
        }
        if (gameObject2 != null)
        {
            for (int i = 0; i < 3; i++)
            {
                gameObject2.transform.GetChild(i).gameObject.CustomSetActive((int)this.m_CreditLevelInfo.bCreditLevel > i);
            }
        }
        if (gameObject3 != null)
        {
            GameObject obj         = Utility.FindChild(gameObject3, "Title-Red");
            GameObject gameObject5 = Utility.FindChild(gameObject3, "TitleTxt_Red");
            GameObject obj2        = Utility.FindChild(gameObject3, "Title-Blue");
            GameObject gameObject6 = Utility.FindChild(gameObject3, "TitleTxt_Blue");
            if (this.m_CreditLevelInfo.bCreditLevelResult == 0)
            {
                obj.CustomSetActive(true);
                gameObject5.CustomSetActive(true);
                obj2.CustomSetActive(false);
                gameObject6.CustomSetActive(false);
                if (gameObject5 != null)
                {
                    Text component = gameObject5.GetComponent <Text>();
                    component.text = Singleton <CTextManager> .get_instance().GetText("Credit_Punish_Title");
                }
            }
            else
            {
                obj.CustomSetActive(false);
                gameObject5.CustomSetActive(false);
                obj2.CustomSetActive(true);
                gameObject6.CustomSetActive(true);
                if (gameObject6 != null)
                {
                    Text component2 = gameObject6.GetComponent <Text>();
                    component2.text = Singleton <CTextManager> .get_instance().GetText("Credit_Reward_Title");
                }
            }
            int num = 0;
            for (int j = 0; j < this.m_CreditLevelInfo.astCreditRewardDetail.Length; j++)
            {
                if (!string.IsNullOrEmpty(this.m_CreditLevelInfo.astCreditRewardDetail[j].szCreditRewardItemIcon))
                {
                    num++;
                }
            }
            CUIListScript componetInChild3 = Utility.GetComponetInChild <CUIListScript>(gameObject3, "pnlAward");
            if (componetInChild3 != null)
            {
                componetInChild3.SetElementAmount(num);
            }
            if (num > 0)
            {
                gameObject3.CustomSetActive(true);
            }
            else
            {
                gameObject3.CustomSetActive(false);
            }
        }
        if (gameObject4 != null)
        {
            uint       dwConfValue      = GameDataMgr.globalInfoDatabin.GetDataByKey(302u).dwConfValue;
            Text       componetInChild4 = Utility.GetComponetInChild <Text>(gameObject4, "Progress/progressBg/txtProgress");
            Image      componetInChild5 = Utility.GetComponetInChild <Image>(gameObject4, "Tips/Image");
            Text       componetInChild6 = Utility.GetComponetInChild <Text>(gameObject4, "Tips/Text");
            float      num2             = Utility.Divide((uint)profile.sumDelCreditValue, dwConfValue);
            GameObject gameObject7;
            if (num2 * 100f > 66f)
            {
                gameObject7 = Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Red");
                Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Yellow").CustomSetActive(false);
                Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Green").CustomSetActive(false);
            }
            else if (num2 * 100f > 33f)
            {
                Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Red").CustomSetActive(false);
                gameObject7 = Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Yellow");
                Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Green").CustomSetActive(false);
            }
            else
            {
                Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Red").CustomSetActive(false);
                Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Yellow").CustomSetActive(false);
                gameObject7 = Utility.FindChild(gameObject4, "Progress/progressBg/imgProgress_Green");
            }
            gameObject7.CustomSetActive(true);
            gameObject7.GetComponent <Image>().fillAmount = num2;
            componetInChild4.text = string.Format("{0}/{1}", profile.sumDelCreditValue, dwConfValue);
            componetInChild5.SetSprite(this.GetTipsIconByProportion(num2), form, true, false, false, false);
            componetInChild6.text = this.GetTipsByComplaintTypeAndProportion(profile.mostDelCreditType, num2);
        }
    }
Example #18
0
        public uint SetItemPriceInfo(CMallItemWidget itemWidget, ref stPayInfoSet payInfoSet)
        {
            uint payValue = 0;

            if (itemWidget.m_priceContainer != null)
            {
                itemWidget.m_priceContainer.SetActive(true);
                CMallItem.OldPriceType oldPriceType = this.GetOldPriceType();
                CUIListScript          component    = itemWidget.m_priceContainer.GetComponent <CUIListScript>();
                component.SetElementAmount(1);
                itemWidget.m_orTextContainer.CustomSetActive(false);
                CUIListElementScript elemenet = component.GetElemenet(0);
                if (elemenet == null)
                {
                    return(payValue);
                }
                GameObject widget = elemenet.GetWidget(0);
                GameObject obj3   = elemenet.GetWidget(1);
                GameObject obj4   = elemenet.GetWidget(2);
                GameObject obj5   = elemenet.GetWidget(4);
                GameObject obj6   = elemenet.GetWidget(3);
                GameObject obj7   = elemenet.GetWidget(5);
                if ((((widget == null) || (obj3 == null)) || ((obj4 == null) || (obj5 == null))) || ((obj6 == null) || (obj7 == null)))
                {
                    return(payValue);
                }
                for (int i = 0; i < payInfoSet.m_payInfoCount; i++)
                {
                    if ((payInfoSet.m_payInfos[i].m_payType == enPayType.Diamond) || (payInfoSet.m_payInfos[i].m_payType == enPayType.DiamondAndDianQuan))
                    {
                        payInfoSet.m_payInfos[i].m_payType = enPayType.DianQuan;
                    }
                }
                for (int j = 0; j < payInfoSet.m_payInfoCount; j++)
                {
                    if (((payInfoSet.m_payInfos[j].m_payType != enPayType.DianQuan) && (payInfoSet.m_payInfos[j].m_payType != enPayType.Diamond)) && (payInfoSet.m_payInfos[j].m_payType != enPayType.DiamondAndDianQuan))
                    {
                        continue;
                    }
                    payValue = payInfoSet.m_payInfos[j].m_payValue;
                    switch (oldPriceType)
                    {
                    case CMallItem.OldPriceType.None:
                        itemWidget.m_middleOrText.CustomSetActive(true);
                        itemWidget.m_bottomOrText.CustomSetActive(false);
                        widget.SetActive(false);
                        obj3.SetActive(false);
                        obj4.SetActive(false);
                        obj6.SetActive(true);
                        obj6.GetComponent <Text>().text = payInfoSet.m_payInfos[j].m_payValue.ToString();
                        obj7.GetComponent <Image>().SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false);
                        return(payValue);

                    case CMallItem.OldPriceType.FirstOne:
                        itemWidget.m_middleOrText.CustomSetActive(false);
                        itemWidget.m_bottomOrText.CustomSetActive(true);
                        if (j != 0)
                        {
                            break;
                        }
                        obj3.SetActive(false);
                        obj6.SetActive(false);
                        widget.SetActive(true);
                        obj4.SetActive(true);
                        widget.GetComponent <Text>().text = payInfoSet.m_payInfos[j].m_oriValue.ToString();
                        obj4.GetComponent <Text>().text   = payInfoSet.m_payInfos[j].m_payValue.ToString();
                        obj5.GetComponent <Image>().SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false);
                        return(payValue);

                    case CMallItem.OldPriceType.SecondOne:
                        itemWidget.m_middleOrText.CustomSetActive(false);
                        itemWidget.m_bottomOrText.CustomSetActive(true);
                        if (j != 1)
                        {
                            goto Label_045D;
                        }
                        obj3.SetActive(false);
                        obj6.SetActive(false);
                        widget.SetActive(true);
                        obj4.SetActive(true);
                        widget.GetComponent <Text>().text = payInfoSet.m_payInfos[j].m_oriValue.ToString();
                        obj4.GetComponent <Text>().text   = payInfoSet.m_payInfos[j].m_payValue.ToString();
                        obj5.GetComponent <Image>().SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false);
                        return(payValue);

                    case CMallItem.OldPriceType.Both:
                        itemWidget.m_middleOrText.CustomSetActive(true);
                        itemWidget.m_bottomOrText.CustomSetActive(false);
                        obj3.SetActive(false);
                        obj6.SetActive(false);
                        widget.SetActive(true);
                        obj4.SetActive(true);
                        widget.GetComponent <Text>().text = payInfoSet.m_payInfos[j].m_oriValue.ToString();
                        obj4.GetComponent <Text>().text   = payInfoSet.m_payInfos[j].m_payValue.ToString();
                        obj5.GetComponent <Image>().SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false);
                        return(payValue);

                    default:
                        return(payValue);
                    }
                    obj3.SetActive(false);
                    widget.SetActive(false);
                    obj6.SetActive(false);
                    obj4.SetActive(true);
                    obj4.GetComponent <Text>().text = payInfoSet.m_payInfos[j].m_payValue.ToString();
                    obj5.GetComponent <Image>().SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false);
                    return(payValue);

Label_045D:
                    obj3.SetActive(false);
                    widget.SetActive(false);
                    obj6.SetActive(false);
                    obj4.SetActive(true);
                    obj4.GetComponent <Text>().text = payInfoSet.m_payInfos[j].m_payValue.ToString();
                    obj5.GetComponent <Image>().SetSprite(CMallSystem.GetPayTypeIconPath(payInfoSet.m_payInfos[j].m_payType), this._giftCenterForm, true, false, false);
                    return(payValue);
                }
            }
            return(payValue);
        }
Example #19
0
        private void OnTrophyRewardInfoEnable(CUIEvent uiEvent)
        {
            int srcWidgetIndexInBelongedList = uiEvent.m_srcWidgetIndexInBelongedList;
            int num = (this.m_TrophyRewardInfoWithRewardList == null) ? 0 : this.m_TrophyRewardInfoWithRewardList.Count;

            if (srcWidgetIndexInBelongedList < 0 || srcWidgetIndexInBelongedList >= num)
            {
                return;
            }
            CTrophyRewardInfo    cTrophyRewardInfo    = this.m_TrophyRewardInfoWithRewardList[srcWidgetIndexInBelongedList];
            CUIListElementScript cUIListElementScript = uiEvent.m_srcWidgetScript as CUIListElementScript;

            if (cUIListElementScript == null)
            {
                DebugHelper.Assert(false, "achievement reward enable elementscript is null");
                return;
            }
            GameObject widget   = cUIListElementScript.GetWidget(0);
            GameObject widget2  = cUIListElementScript.GetWidget(1);
            GameObject widget3  = cUIListElementScript.GetWidget(2);
            GameObject widget4  = cUIListElementScript.GetWidget(3);
            GameObject widget5  = cUIListElementScript.GetWidget(4);
            GameObject widget6  = cUIListElementScript.GetWidget(5);
            GameObject widget7  = cUIListElementScript.GetWidget(6);
            GameObject widget8  = cUIListElementScript.GetWidget(7);
            GameObject widget9  = cUIListElementScript.GetWidget(8);
            GameObject widget10 = cUIListElementScript.GetWidget(9);
            GameObject widget11 = cUIListElementScript.GetWidget(10);

            if (cTrophyRewardInfo.HasGotAward())
            {
                widget.CustomSetActive(false);
                widget2.CustomSetActive(true);
                widget5.CustomSetActive(false);
                widget8.CustomSetActive(false);
                widget6.CustomSetActive(true);
                Text component = widget6.GetComponent <Text>();
                component.set_text(Singleton <CTextManager> .GetInstance().GetText("Achievement_Trophy_Reward_Status_Got"));
                widget9.CustomSetActive(false);
            }
            else if (cTrophyRewardInfo.IsFinish())
            {
                uint num2 = 0u;
                for (int i = 0; i < 3; i++)
                {
                    if (cTrophyRewardInfo.Cfg.astReqReward[i].dwRewardNum != 0u)
                    {
                        num2 += 1u;
                    }
                }
                if (num2 == 0u)
                {
                    widget.CustomSetActive(false);
                    widget2.CustomSetActive(true);
                    widget5.CustomSetActive(false);
                    widget8.CustomSetActive(false);
                    widget6.CustomSetActive(true);
                    Text component2 = widget6.GetComponent <Text>();
                    component2.set_text(Singleton <CTextManager> .GetInstance().GetText("Achievement_Trophy_Reward_Status_Done"));
                }
                else
                {
                    widget.CustomSetActive(true);
                    widget2.CustomSetActive(false);
                    widget5.CustomSetActive(false);
                    widget8.CustomSetActive(true);
                    widget6.CustomSetActive(false);
                    CUIEventScript component3 = widget8.GetComponent <CUIEventScript>();
                    if (component3 != null)
                    {
                        component3.SetUIEvent(enUIEventType.Click, enUIEventID.Achievement_Get_Trophy_Reward, new stUIEventParams
                        {
                            tag = cTrophyRewardInfo.Index
                        });
                    }
                }
                widget9.CustomSetActive(false);
            }
            else
            {
                widget.CustomSetActive(true);
                widget2.CustomSetActive(false);
                widget5.CustomSetActive(false);
                widget8.CustomSetActive(false);
                widget6.CustomSetActive(true);
                Text component4 = widget6.GetComponent <Text>();
                if (component4 != null)
                {
                    component4.set_text((cTrophyRewardInfo.State == TrophyState.OnGoing) ? Singleton <CTextManager> .GetInstance().GetText("Achievement_Trophy_Reward_Status_OnGoing") : Singleton <CTextManager> .GetInstance().GetText("Achievement_Trophy_Reward_Status_Not_Done"));
                }
                widget9.CustomSetActive(false);
            }
            Image component5 = widget3.GetComponent <Image>();

            component5.SetSprite(cTrophyRewardInfo.GetTrophyImagePath(), cUIListElementScript.m_belongedFormScript, true, false, false, false);
            Text component6 = widget4.GetComponent <Text>();

            if (component6 != null)
            {
                component6.set_text(cTrophyRewardInfo.Cfg.szTrophyDesc);
            }
            CUIListScript component7 = widget7.GetComponent <CUIListScript>();

            if (component7 != null)
            {
                CUseable[] trophyRewards = cTrophyRewardInfo.GetTrophyRewards();
                component7.SetElementAmount(trophyRewards.Length);
                for (int j = 0; j < trophyRewards.Length; j++)
                {
                    CUIListElementScript elemenet = component7.GetElemenet(j);
                    GameObject           widget12 = elemenet.GetWidget(0);
                    if (widget12 != null)
                    {
                        CUseable cUseable = trophyRewards[j];
                        if (cUseable == null)
                        {
                            component7.SetElementAmount(0);
                            return;
                        }
                        if (trophyRewards.Length >= 5)
                        {
                            CUICommonSystem.SetItemCell(component7.m_belongedFormScript, widget12, cUseable, false, false, false, false);
                        }
                        else
                        {
                            CUICommonSystem.SetItemCell(component7.m_belongedFormScript, widget12, cUseable, true, false, false, false);
                        }
                        if (cUseable.m_stackCount == 1)
                        {
                            Utility.FindChild(widget12, "cntBg").CustomSetActive(false);
                            Utility.FindChild(widget12, "lblIconCount").CustomSetActive(false);
                        }
                        else
                        {
                            Utility.FindChild(widget12, "cntBg").CustomSetActive(true);
                            Utility.FindChild(widget12, "lblIconCount").CustomSetActive(true);
                        }
                    }
                }
            }
        }
        public void RefreshBuyDianQuanPanel()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CPaySystem.s_buyDianQuanFormPath);

            if (form == null)
            {
                return;
            }
            DatabinTable <ResCouponsBuyInfo, uint> androidDianQuanBuyInfo = GameDataMgr.androidDianQuanBuyInfo;

            this.dianQuanBuyInfoList.Clear();
            androidDianQuanBuyInfo.Accept(delegate(ResCouponsBuyInfo x)
            {
                this.dianQuanBuyInfoList.Add(x);
            });
            this.SortDianQuanInfoList();
            CUIListScript component = form.transform.Find("pnlBg/pnlBody/List").GetComponent <CUIListScript>();

            component.SetElementAmount(this.dianQuanBuyInfoList.Count);
            for (int i = 0; i < this.dianQuanBuyInfoList.Count; i++)
            {
                ResCouponsBuyInfo    resCouponsBuyInfo = this.dianQuanBuyInfoList[i];
                CUIListElementScript elemenet          = component.GetElemenet(i);
                Image  component2 = elemenet.transform.Find("imgIcon").GetComponent <Image>();
                string prefabPath = string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Purchase_Dir, StringHelper.UTF8BytesToString(ref resCouponsBuyInfo.szImgPath));
                component2.SetSprite(prefabPath, form, true, false, false, false);
                Text component3 = elemenet.transform.Find("diamondCntText").GetComponent <Text>();
                component3.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_DianQuan_Cnt"), resCouponsBuyInfo.dwBuyCount));
                GameObject gameObject = elemenet.transform.Find("buyPanel/buyBtn").gameObject;
                Text       component4 = gameObject.transform.Find("Text").GetComponent <Text>();
                component4.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_DianQuan_Price"), resCouponsBuyInfo.dwBuyPrice));
                GameObject gameObject2 = elemenet.transform.Find("additionPanel").gameObject;
                gameObject2.CustomSetActive(false);
                GameObject gameObject3 = elemenet.transform.Find("pnlRecommend").gameObject;
                if (resCouponsBuyInfo.bFirstGift > 0 && !this.IsDianQuanHaveFirstPay(resCouponsBuyInfo.dwID))
                {
                    gameObject3.CustomSetActive(true);
                    Text component5 = gameObject3.transform.Find("txtDiscount").GetComponent <Text>();
                    component5.set_text(Singleton <CTextManager> .GetInstance().GetText("Pay_First_Pay_Double"));
                }
                else
                {
                    if (resCouponsBuyInfo.dwExtraGiftCnt > 0u)
                    {
                        gameObject2.CustomSetActive(true);
                        Text component6 = gameObject2.transform.Find("Text").GetComponent <Text>();
                        component6.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("Pay_Gift_Diamond_Cnt"), resCouponsBuyInfo.dwExtraGiftCnt));
                    }
                    gameObject3.CustomSetActive(false);
                }
                CUIEventScript  component7  = gameObject.GetComponent <CUIEventScript>();
                stUIEventParams eventParams = default(stUIEventParams);
                eventParams.dianQuanBuyPar.giftId      = (int)resCouponsBuyInfo.dwID;
                eventParams.dianQuanBuyPar.dianQuanCnt = (int)resCouponsBuyInfo.dwBuyCount;
                component7.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_ClickDianQuanGift, eventParams);
            }
            if (CSysDynamicBlock.bLobbyEntryBlocked)
            {
                Transform transform  = form.transform.FindChild("Button_OpenNobe");
                Transform transform2 = form.transform.FindChild("Button_HelpMe");
                Transform transform3 = form.transform.FindChild("Button_TongCai");
                Transform transform4 = form.transform.FindChild("Button_Partner");
                if (transform)
                {
                    transform.gameObject.CustomSetActive(false);
                }
                if (transform2)
                {
                    transform2.gameObject.CustomSetActive(false);
                }
                if (transform3)
                {
                    transform3.gameObject.CustomSetActive(false);
                }
                if (transform4)
                {
                    transform4.gameObject.CustomSetActive(false);
                }
            }
        }
Example #21
0
        public void RefreshForm(int effectIndex = -1)
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_talentBuyFormPath);

            if (form != null)
            {
                CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                if (masterRoleInfo != null)
                {
                    CHeroInfo          heroInfo           = masterRoleInfo.GetHeroInfo(this.m_heroID, false);
                    HeroTalentViewInfo heroTalentViewInfo = TalentView.GetHeroTalentViewInfo(this.m_heroID);
                    if (heroTalentViewInfo != null)
                    {
                        CUIListScript[] scriptArray = new CUIListScript[] { form.gameObject.transform.Find("Panel/PanelLeft/List1").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List2").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List3").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List4").GetComponent <CUIListScript>(), form.gameObject.transform.Find("Panel/PanelLeft/List5").GetComponent <CUIListScript>() };
                        for (int i = 0; i < 5; i++)
                        {
                            CUIListScript       script2 = scriptArray[i];
                            HeroTalentLevelInfo info4   = heroTalentViewInfo.m_heroTalentLevelInfoList[i];
                            ResTalentLib        lib     = info4.m_tarlentLibList[info4.m_tarlentLibList.Count - 1];
                            Button component            = script2.transform.Find("BtnBuyCoin").GetComponent <Button>();
                            Text   text  = script2.transform.Find("lblTips").GetComponent <Text>();
                            Text   text2 = text.transform.Find("Text").GetComponent <Text>();
                            Image  image = text.transform.Find("Image").GetComponent <Image>();
                            component.gameObject.CustomSetActive(false);
                            text2.gameObject.CustomSetActive(false);
                            image.gameObject.CustomSetActive(false);
                            if (!TalentView.IsHaveTalentBuyFunc(this.m_heroID))
                            {
                                text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_3");
                            }
                            else if ((heroInfo == null) && (i == 0))
                            {
                                text.text = Singleton <CTextManager> .instance.GetText("Skin_NeedToBuyAHero");
                            }
                            else if (TalentView.IsBuyTalent(this.m_heroID, i))
                            {
                                text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_2");
                            }
                            else if ((i > 0) && !TalentView.IsBuyTalent(this.m_heroID, i - 1))
                            {
                                int      num2 = heroTalentViewInfo.m_heroTalentLevelInfoList[i - 1].m_tarlentLibList.Count - 1;
                                string   str  = StringHelper.UTF8BytesToString(ref heroTalentViewInfo.m_heroTalentLevelInfoList[i - 1].m_tarlentLibList[num2].szName);
                                string[] args = new string[] { str };
                                text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_4", args);
                            }
                            else
                            {
                                if (heroInfo == null)
                                {
                                    continue;
                                }
                                string str2 = StringHelper.UTF8BytesToString(ref CHeroInfo.GetHeroProficiency(heroInfo.cfgInfo.bJob, heroInfo.m_ProficiencyLV).szTitle);
                                string str3 = StringHelper.UTF8BytesToString(ref CHeroInfo.GetHeroProficiency(heroInfo.cfgInfo.bJob, info4.m_levelDetail.bLvl3UnlockLvl).szTitle);
                                if (heroInfo.m_ProficiencyLV < info4.m_levelDetail.bLvl3UnlockLvl)
                                {
                                    component.gameObject.CustomSetActive(true);
                                    stUIEventParams eventParams = new stUIEventParams {
                                        tag     = info4.m_levelDetail.bLvl3LockCostType,
                                        tagUInt = info4.m_levelDetail.dwLvl3LockCostPrice,
                                        tag2    = i,
                                        tagStr  = StringHelper.UTF8BytesToString(ref lib.szName)
                                    };
                                    CMallSystem.SetPayButton(form, (RectTransform)component.transform, CMallSystem.ResBuyTypeToPayType(info4.m_levelDetail.bLvl3LockCostType), info4.m_levelDetail.dwLvl3LockCostPrice, enUIEventID.Talent_Buy_BtnSellClick, ref eventParams);
                                    string[] textArray2 = new string[] { str3 };
                                    text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_7", textArray2);

                                    text2.gameObject.CustomSetActive(true);
                                    image.gameObject.CustomSetActive(true);
                                    CMallSystem.SetPayButton(form, (RectTransform)text.transform, CMallSystem.ResBuyTypeToPayType(info4.m_levelDetail.bLvl3UnLockCostType), info4.m_levelDetail.dwLvl3UnLockCostPrice, enUIEventID.None, ref eventParams);
                                }
                                else
                                {
                                    component.gameObject.CustomSetActive(true);
                                    stUIEventParams params2 = new stUIEventParams {
                                        tag     = info4.m_levelDetail.bLvl3UnLockCostType,
                                        tagUInt = info4.m_levelDetail.dwLvl3UnLockCostPrice,
                                        tag2    = i,
                                        tagStr  = StringHelper.UTF8BytesToString(ref lib.szName)
                                    };
                                    CMallSystem.SetPayButton(form, (RectTransform)component.transform, CMallSystem.ResBuyTypeToPayType(info4.m_levelDetail.bLvl3UnLockCostType), info4.m_levelDetail.dwLvl3UnLockCostPrice, enUIEventID.Talent_Buy_BtnSellClick, ref params2);
                                    string[] textArray3 = new string[] { str2 };
                                    text.text = Singleton <CTextManager> .instance.GetText("Talent_Buy_8", textArray3);
                                }
                            }
                            script2.SetElementAmount(info4.m_tarlentLibList.Count);
                            for (int j = 0; j < info4.m_tarlentLibList.Count; j++)
                            {
                                GameObject     gameObject = script2.GetElemenet(j).gameObject.transform.Find("talentCell").gameObject;
                                Image          image2     = gameObject.transform.Find("imgIcon").GetComponent <Image>();
                                Image          image3     = gameObject.transform.Find("lock").GetComponent <Image>();
                                Text           text3      = gameObject.transform.Find("lblName").GetComponent <Text>();
                                CanvasGroup    group      = gameObject.GetComponent <CanvasGroup>();
                                CUIEventScript script3    = gameObject.GetComponent <CUIEventScript>();
                                ResTalentLib   lib2       = info4.m_tarlentLibList[j];
                                if (lib2 == null)
                                {
                                    return;
                                }
                                image2.SetSprite(CUIUtility.s_Sprite_Dynamic_Talent_Dir + lib2.dwIcon, form, true, false, false);
                                image2.color = CUIUtility.s_Color_White;
                                text3.text   = StringHelper.UTF8BytesToString(ref lib2.szName);
                                stTalentEventParams params3 = new stTalentEventParams {
                                    talentLevelIndex = (byte)i,
                                    talentInfo       = info4.m_tarlentLibList[j],
                                    isCanLearn       = false
                                };
                                if (TalentView.IsNeedBuy(i, j) && !TalentView.IsBuyTalent(this.m_heroID, i))
                                {
                                    params3.isHaveTalent = false;
                                    image3.gameObject.CustomSetActive(true);
                                    image2.color = CUIUtility.s_Color_GrayShader;
                                }
                                else
                                {
                                    params3.isHaveTalent = true;
                                    image3.gameObject.CustomSetActive(false);
                                    image2.color = CUIUtility.s_Color_White;
                                    if ((effectIndex == i) && (j == (info4.m_tarlentLibList.Count - 1)))
                                    {
                                        CUICommonSystem.PlayAnimator(gameObject, "UnLock_Anim");
                                    }
                                }
                                string strContent = StringHelper.UTF8BytesToString(ref lib2.szDesc);
                                CUICommonSystem.SetCommonTipsEvent(form, gameObject, strContent, enUseableTipsPos.enTop);
                            }
                        }
                    }
                }
            }
        }