少年修仙传客户端代码仓库
client_Wu Xijin
2019-06-24 a539da5bd521e3ce58f549be9782f30148b21d8f
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
3个文件已修改
43 ■■■■ 已修改文件
System/RidingPet/RidingPetBossModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RidingPet/RidingPetBossRewardCell.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/BuyItemController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RidingPet/RidingPetBossModel.cs
@@ -58,6 +58,7 @@
                    {
                        id = itemArray[i][0],
                        count = itemArray[i][1],
                        quality = itemArray[i].Length > 2 ? itemArray[i][2] : 0,
                    });
                }
                bossRewards.Add(new RidingPetBossReward()
System/RidingPet/RidingPetBossRewardCell.cs
@@ -8,7 +8,10 @@
    public class RidingPetBossRewardCell : CellView
    {
        [SerializeField] Text m_Rank;
        [SerializeField] ScrollRect m_Scroller;
        [SerializeField] ItemCell[] m_Items;
        [SerializeField] Transform m_MustDrop;
        [SerializeField] ItemCell m_MustItem;
        public void Display(RidingPetBossReward bossReward)
        {
@@ -22,13 +25,18 @@
                m_Rank.text = Language.Get("AllianceBossRank", bossReward.rankArea.x);
            }
            List<Item> items = bossReward.items.FindAll((x) =>
            {
                return x.quality == 0;
            });
            for (int i = 0; i < m_Items.Length; i++)
            {
                m_Items[i].gameObject.SetActive(i < bossReward.items.Count);
                if (i < bossReward.items.Count)
                m_Items[i].gameObject.SetActive(items != null && i < items.Count);
                if (items != null && i < items.Count)
                {
                    var itemId = bossReward.items[i].id;
                    var itemData = new ItemCellModel(itemId, true, (ulong)bossReward.items[i].count);
                    var itemId = items[i].id;
                    var itemData = new ItemCellModel(itemId, true, (ulong)items[i].count);
                    m_Items[i].Init(itemData);
                    m_Items[i].button.SetListener(() =>
                    {
@@ -36,6 +44,24 @@
                    });
                }
            }
            m_Scroller.horizontalNormalizedPosition = 0f;
            Item mustItem = bossReward.items.Find((x)=>
            {
                return x.quality == 1;
            });
            m_MustDrop.gameObject.SetActive(mustItem.id != 0);
            if (mustItem.id != 0)
            {
                var itemData = new ItemCellModel(mustItem.id, true, (ulong)mustItem.count);
                m_MustItem.Init(itemData);
                m_MustItem.button.SetListener(() =>
                {
                    ItemTipUtility.Show(mustItem.id);
                });
            }
        }
    }
}
System/Store/BuyItemController.cs
@@ -109,7 +109,7 @@
    public void SetBuyCount(int goodId, int count)
    {
        var countLimit = GetBuyCountLimit(goodId, count);
        var countLimit = GetBuyCountLimit(goodId, PlayerDatas.Instance.baseData.VIPLv);
        if (countLimit == -1)
        {
            wannaBuyCount.value = Mathf.Clamp(count, 1, 999);
@@ -166,7 +166,7 @@
            return -1;
        }
        var isVipLimitGood = config != null && config.VIPLV.Length > 1 && config.VIPLV[0] > 0;
        var isVipLimitGood = config != null && config.VIPLV.Length > 1;
        var canBuy = 0;
        if (isVipLimitGood)
        {
@@ -178,8 +178,8 @@
                    index = i;
                    break;
                }
            }
            }
            if (index != -1)
            {
                canBuy = config.PurchaseNumber[index];