少年修仙传客户端代码仓库
client_Zxw
2018-08-29 df33043da71b70d6f6dafcab6da1894a58732673
3041 前端 通过跳转仙盟宝库某些物品为高亮
3个文件已修改
73 ■■■■ 已修改文件
System/FairyAu/PlayerFairyAuTreasureData.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/WarehouseGrid.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/WarehouseTipsWin.cs 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/PlayerFairyAuTreasureData.cs
@@ -57,6 +57,7 @@
    public static event OnFamilyStoreItemInfo Event_FamilyStoreItemInfo;//仓库信息的刷新
    public int _FairyAuIntegral = 0;//获取仙盟积分
    public int JumpItemID = 0;//跳转获取ID
    public override void Init()
    {
        
System/FairyAu/WarehouseGrid.cs
@@ -13,7 +13,7 @@
        [SerializeField] GameObject m_ItemBG;
        [SerializeField] ItemCell m_ItemCell;
        [SerializeField] GameObject m_Lllume;
        [SerializeField] UIEffect m_uieffect;
        public GameObject ItemBG
        {
            get { return m_ItemBG; }
@@ -31,6 +31,11 @@
            get { return m_Lllume; }
            set { m_Lllume = value; }
        }
        public UIEffect Uieffect
        {
            get { return m_uieffect; }
            set { m_uieffect = value; }
        }
    }
}
System/FairyAu/WarehouseTipsWin.cs
@@ -80,6 +80,7 @@
        int Item_lv = 0;//标记物品阶数
        int Item_Color = 0;//标记物品颜色
        private Dictionary<int, bool> _EquipmentArray = new Dictionary<int, bool>();//用来存储需要销毁的装备下标
        private Dictionary<int, int> DicHighlight = new Dictionary<int, int>();//需要高亮的物品
        int _indexList = 0;//标记需要兑换的数组下标
        int _WPID = 0;//用来标记需要兑换的物品ID
        private int SpiritPetDan = 0;
@@ -123,6 +124,7 @@
            _CleanBtn.gameObject.SetActive(true);
            _WarehouseCountBG.SetActive(true);
            _CountText.text = playerFairyAuTreasureData._FairyAuIntegral.ToString();
            SetItemID();//获取高亮特效物品ID
            base.OnCreateGridLineCell(_GridlineCtrl);
        }
@@ -135,6 +137,10 @@
        protected override void OnPreClose()
        {
            if (playerFairyAuTreasureData.JumpItemID != 0)
            {
                playerFairyAuTreasureData.JumpItemID = 0;
            }
        }
        protected override void OnAfterClose()
@@ -159,10 +165,17 @@
                WarehouseGrid warehouseGrid = cell.transform.GetChild(childCode).GetComponent<WarehouseGrid>();
                int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
                warehouseGrid.ItemCell.gameObject.SetActive(false);
                warehouseGrid.Uieffect.gameObject.SetActive(false);
                if (cellCount - 1 < playerFairyAuTreasureData._DicfamilyStoreItem.Count)
                {
                    warehouseGrid.ItemCell.gameObject.SetActive(true);
                    FamilyStoreItem itemModel = playerFairyAuTreasureData._DicfamilyStoreItem[_listArray[cellCount - 1]];
                    int _IndexKey = _listArray[cellCount - 1];
                    FamilyStoreItem itemModel = playerFairyAuTreasureData._DicfamilyStoreItem[_IndexKey];
                    if (DicHighlight.ContainsKey(_IndexKey))//需要选中的特效
                    {
                        warehouseGrid.Uieffect.gameObject.SetActive(true);
                        warehouseGrid.Uieffect.Play();
                    }
                    ItemCellModel cellModel = new ItemCellModel(itemModel.ItemID, false, 0, 0, "", PackType.rptDeleted, true, itemModel._UserData);
                    warehouseGrid.ItemCell.Init(cellModel);
                    if (AchievementGoto.achievementType == AchievementGoto.SpiritPetDan)//兑换灵宠丹(221)
@@ -181,12 +194,12 @@
                            AchievementGuideEffect1.transform.SetParentEx(warehouseGrid.ItemCell.transform, Vector3.zero, Vector3.zero, Vector3.one);
                        }
                    }
                    int _int = _listArray[cellCount - 1];
                    LightUpJudgment(warehouseGrid.Lllume, _bool, playerFairyAuTreasureData._DicfamilyStoreItem[(_listArray[cellCount - 1])].Index);
                    LightUpJudgment(warehouseGrid.Lllume, _bool, playerFairyAuTreasureData._DicfamilyStoreItem[_IndexKey].Index);
                    warehouseGrid.ItemCell.cellBtn.RemoveAllListeners();
                    warehouseGrid.ItemCell.cellBtn.AddListener(() =>
                    {
                        TypeJudgment(warehouseGrid.Lllume, _bool, (int)itemModel.ItemID, playerFairyAuTreasureData._DicfamilyStoreItem[(_listArray[cellCount - 1])].Index);
                        TypeJudgment(warehouseGrid.Lllume, _bool, (int)itemModel.ItemID, playerFairyAuTreasureData._DicfamilyStoreItem[_IndexKey].Index);
                    });
                }
                else
@@ -418,11 +431,11 @@
        }
        #region//一推的Toggle
        void IsNoConentA(Toggle toogleA )
        void IsNoConentA(Toggle toogleA)
        {
            for (int i = 0; i < _ContentOne.childCount; i++)
            {
                if (_ContentOne.GetChild(i).GetComponent<Toggle>().name == toogleA.name)
                {
                    _ContentOne.GetChild(i).GetComponent<Toggle>().isOn = true;
@@ -433,11 +446,11 @@
                }
            }
        }
        void IsNoConentB(Toggle ToogleB )
        void IsNoConentB(Toggle ToogleB)
        {
            for (int i = 0; i < _ContentTwo.childCount; i++)
            {
                if (_ContentTwo.GetChild(i).GetComponent<Toggle>().name == ToogleB.name)
                {
                    _ContentTwo.GetChild(i).GetComponent<Toggle>().isOn = true;
@@ -895,6 +908,7 @@
            {
                _listArray.Add(key);
            }
            SetItemID();//获取高亮特效物品ID
            _GridlineCtrl.m_Scorller.RefreshActiveCellViews();//刷新当前可见
        }
        void FamilyActionInfo()
@@ -982,6 +996,41 @@
            }
            return _DicConditions;
        }
        private void SetItemID()//获取物品ID
        {
            DicHighlight.Clear();//需要亮的仓库物品下标
            int Order = 0;//阶数
            int Color = 0;//颜色
            int Star = 0;//颜色
            if (playerFairyAuTreasureData.JumpItemID == 0)
            {
                return;
            }
            int ItemId = playerFairyAuTreasureData.JumpItemID;
            var itemconfig = Config.Instance.Get<ItemConfig>(ItemId);
            if (itemconfig.EquipPlace == 0 && itemconfig.EquipPlace > 10)
            {
                return;
            }
            Order = itemconfig.LV;
            Color = itemconfig.ItemColor;
            Star = itemconfig.StarLevel;
            foreach (var key in playerFairyAuTreasureData._DicfamilyStoreItem.Keys)
            {
                var item_config = Config.Instance.Get<ItemConfig>(key);
                if (item_config.EquipPlace == 0 && item_config.EquipPlace > 10)
                {
                    continue;
                }
                if (item_config.LV >= Order && item_config.ItemColor >= Color
                    && item_config.StarLevel >= Star && PlayerDatas.Instance.baseData.Job == item_config.JobLimit / 100)
                {
                    DicHighlight.Add(key,1);
                }
            }
        }
    }
}