コード例 #1
0
    private void RefreshUIByCfg()
    {
        this.UpdateRewardItems();
        JunTuanZhanJiangLi junTuanZhanJiangLi = DataReader <JunTuanZhanJiangLi> .Get(1);

        if (junTuanZhanJiangLi != null)
        {
            int      title    = junTuanZhanJiangLi.Title;
            ChengHao chengHao = DataReader <ChengHao> .Get(title);

            if (chengHao != null && chengHao.displayWay == 2)
            {
                ResourceManager.SetSprite(this.titleImg, GameDataUtils.GetIcon(chengHao.icon));
                List <int> attrs = DataReader <Attrs> .Get(chengHao.gainProperty).attrs;

                List <int> values = DataReader <Attrs> .Get(chengHao.gainProperty).values;

                string text = string.Empty;
                int    num  = (attrs.get_Count() <= 2) ? attrs.get_Count() : 2;
                for (int i = 0; i < num; i++)
                {
                    if (i >= values.get_Count())
                    {
                        break;
                    }
                    string text2 = text;
                    text = string.Concat(new string[]
                    {
                        text2,
                        AttrUtility.GetAttrName((GameData.AttrType)attrs.get_Item(i)),
                        ": <color=#47eb1b>+",
                        AttrUtility.GetAttrValueDisplay(attrs.get_Item(i), values.get_Item(i)),
                        "</color>"
                    });
                    if (i < num - 1)
                    {
                        text += "\n";
                    }
                }
                this.titleAttrName.set_text(text);
            }
        }
    }
コード例 #2
0
    private void UpdateRewardItems()
    {
        List <int>         list  = new List <int>();
        List <int>         list2 = new List <int>();
        JunTuanZhanJiangLi junTuanZhanJiangLi = DataReader <JunTuanZhanJiangLi> .Get(1);

        if (junTuanZhanJiangLi != null)
        {
            for (int i = 0; i < junTuanZhanJiangLi.reward.get_Count(); i++)
            {
                JunTuanZhanJiangLi.RewardPair rewardPair = junTuanZhanJiangLi.reward.get_Item(i);
                list.Add(rewardPair.key);
                list2.Add(rewardPair.value);
            }
            for (int j = 0; j < list.get_Count(); j++)
            {
                ItemShow.ShowItem(this.rewardItemsListTrans, list.get_Item(j), -1L, false, null, 2001);
            }
        }
    }
コード例 #3
0
    private void UpdateRewardSuit(int type)
    {
        JunTuanZhanJiangLi junTuanZhanJiangLi = DataReader <JunTuanZhanJiangLi> .Get(1);

        if (junTuanZhanJiangLi != null)
        {
            string   clothes = junTuanZhanJiangLi.Clothes;
            string[] array   = clothes.Split(new char[]
            {
                ';'
            });
            for (int i = 0; i < array.Length; i++)
            {
                string[] array2 = array[i].Split(new char[]
                {
                    ':'
                });
                int num = int.Parse(array2[0]);
                if (num == type)
                {
                    string   text   = array2[1];
                    string[] array3 = text.Split(new char[]
                    {
                        ','
                    });
                    this.fashionItemID = int.Parse(array3[0]);
                    this.equipItemID   = int.Parse(array3[2]);
                    this.wingItemID    = GuildWarManager.Instance.GetRewardWingID(type);
                    Items items = DataReader <Items> .Get(this.fashionItemID);

                    if (items != null)
                    {
                        this.suitNameText.set_text("军团时装:" + GameDataUtils.GetChineseContent(items.name, false));
                    }
                }
            }
        }
    }