예제 #1
0
 public void OnRefreshDifficultyList(EliteDataInfo dataInfo)
 {
     EliteInstanceDetailUI.m_eliteDataInfo = dataInfo;
     if (dataInfo != null && dataInfo.cfgIDList.get_Count() > 0)
     {
         this.difficultListPool.Clear();
         this.difficultListPool.Create(dataInfo.cfgIDList.get_Count(), delegate(int index)
         {
             if (index < dataInfo.cfgIDList.get_Count() && index < this.difficultListPool.Items.get_Count())
             {
                 EliteDifficultItem component = this.difficultListPool.Items.get_Item(index).GetComponent <EliteDifficultItem>();
                 if (component != null)
                 {
                     component.RefreshUI(dataInfo.cfgIDList.get_Item(index));
                 }
                 this.difficultListPool.Items.get_Item(index).GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickSelectDifficult);
                 if (index == EliteDungeonManager.Instance.GetCanChallegeRankIndex(dataInfo.cfgIDList))
                 {
                     this.OnClickSelectDifficult(this.difficultListPool.Items.get_Item(index).get_gameObject());
                 }
             }
         });
         this.difficultScrRect.set_sizeDelta(new Vector2(this.difficultScrRect.get_sizeDelta().x, (float)(80 * dataInfo.cfgIDList.get_Count())));
     }
 }
예제 #2
0
    public void RefreshUI(EliteDataInfo eliteDataInfo)
    {
        this.dataInfo = eliteDataInfo;
        Icon icon = DataReader <Icon> .Get(this.dataInfo.BossIconID);

        if (icon != null)
        {
            ResourceManager.SetSprite(this.bossIcon, ResourceManager.GetIconSprite(icon.icon));
        }
        base.FindTransform("bossName").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(this.dataInfo.BossID, false));
        int key = this.dataInfo.cfgIDList.get_Item(0);
        JingYingFuBenPeiZhi jingYingFuBenPeiZhi = DataReader <JingYingFuBenPeiZhi> .Get(key);

        if (jingYingFuBenPeiZhi != null)
        {
            this.challengeLv = jingYingFuBenPeiZhi.level;
            ResourceManager.SetSprite(this.stepImg, ResourceManager.GetIconSprite("duanshu_" + jingYingFuBenPeiZhi.step));
        }
        bool active = !eliteDataInfo.isOpen || EntityWorld.Instance.EntSelf.Lv < this.challengeLv;

        this.closeMask.SetActive(active);
        this.closeMask.get_transform().FindChild("NotOpenText1").GetComponent <Text>().set_text(string.Concat(new object[]
        {
            GameDataUtils.GetChineseContent(506011, false),
            GameDataUtils.GetChineseContent(508009, false),
            GameDataUtils.GetChineseContent(510022, false),
            "\nLV:",
            this.challengeLv
        }));
    }
예제 #3
0
    protected void RefreshUI()
    {
        this.canGetPrizeTimesTxt.set_text(string.Format(GameDataUtils.GetChineseContent(505415, false), EliteDungeonManager.Instance.RestGetRewardTimes, EliteDungeonManager.Instance.GetVIPCanGetPrizeTimesMax()));
        this.resetGetPrizeTimesTxt.set_text(EliteDungeonManager.Instance.GetResetGetPrizeTimesStr());
        List <EliteDataInfo> eliteDataList = EliteDungeonManager.Instance.EliteDataList;
        List <EliteDataInfo> currentList   = new List <EliteDataInfo>();

        for (int i = 0; i < eliteDataList.get_Count(); i++)
        {
            EliteDataInfo eliteDataInfo = eliteDataList.get_Item(i);
            if (eliteDataInfo.ArenaID == this.CurrentIndex + 1)
            {
                currentList.Add(eliteDataInfo);
            }
        }
        int count = currentList.get_Count();

        this.eliteDungeonItemRegionListPool.Create(count, delegate(int index)
        {
            if (index < count && index < this.eliteDungeonItemRegionListPool.Items.get_Count())
            {
                EliteDungeonItem component = this.eliteDungeonItemRegionListPool.Items.get_Item(index).GetComponent <EliteDungeonItem>();
                if (component != null)
                {
                    component.RefreshUI(currentList.get_Item(index));
                }
            }
        });
        this.eliteSRC.OnHasBuilt = delegate
        {
            this.eliteSRC.Move2Index(EliteDungeonManager.Instance.GetCanStarFightBossIndex(1), true);
            this.eliteSRC.OnHasBuilt = null;
        };
    }
예제 #4
0
    private void SetEliteDataList()
    {
        List <JingYingFuBenPeiZhi> dataList = DataReader <JingYingFuBenPeiZhi> .DataList;

        if (dataList == null)
        {
            return;
        }
        for (int i = 0; i < dataList.get_Count(); i++)
        {
            JingYingFuBenPeiZhi dataCfg = dataList.get_Item(i);
            if (this.eliteDataList == null)
            {
                this.eliteDataList = new List <EliteDataInfo>();
            }
            int num = this.eliteDataList.FindIndex((EliteDataInfo a) => a.BossID == dataCfg.bossName && a.ArenaID == dataCfg.map);
            if (num < 0)
            {
                EliteDataInfo eliteDataInfo = new EliteDataInfo(dataCfg.bossName);
                eliteDataInfo.cfgIDList.Add(dataCfg.id);
                eliteDataInfo.ArenaID    = dataCfg.map;
                eliteDataInfo.BossIconID = dataCfg.bossPic;
                eliteDataInfo.TaskID     = dataCfg.mission;
                this.eliteDataList.Add(eliteDataInfo);
            }
            else
            {
                int num2 = this.eliteDataList.get_Item(num).cfgIDList.FindIndex((int a) => a == dataCfg.id);
                if (num2 < 0)
                {
                    this.eliteDataList.get_Item(num).cfgIDList.Add(dataCfg.id);
                }
            }
        }
        if (this.eliteCopyInfoList == null)
        {
            return;
        }
        for (int j = 0; j < this.eliteCopyInfoList.get_Count(); j++)
        {
            int copyId = this.eliteCopyInfoList.get_Item(j).copyId;
            JingYingFuBenPeiZhi dataCfg = DataReader <JingYingFuBenPeiZhi> .Get(copyId);

            if (dataCfg != null)
            {
                int num3 = this.eliteDataList.FindIndex((EliteDataInfo a) => a.BossID == dataCfg.bossName && a.ArenaID == dataCfg.map);
                if (num3 >= 0)
                {
                    this.eliteDataList.get_Item(num3).isOpen = true;
                    if (this.eliteDataList.get_Item(num3).eliteCopyInfoDic.ContainsKey(copyId))
                    {
                        this.eliteDataList.get_Item(num3).eliteCopyInfoDic.set_Item(copyId, this.eliteCopyInfoList.get_Item(j));
                    }
                    else
                    {
                        this.eliteDataList.get_Item(num3).eliteCopyInfoDic.Add(copyId, this.eliteCopyInfoList.get_Item(j));
                    }
                }
            }
        }
    }