public void Initialize(EquipmentInfoData _equipmentinfodata, int modelid)
        {
            this.modelID = _equipmentinfodata.ModelId.ToString();
            this.equipID = _equipmentinfodata.EquipmentId.ToString();
            SysGameItemsVo dataById = BaseDataMgr.instance.GetDataById <SysGameItemsVo>(this.ModelID);

            try
            {
                this.variety = int.Parse(dataById.sub_type.Split(new char[]
                {
                    '|'
                })[1]);
            }
            catch (Exception var_1_61)
            {
            }
            this.classification      = dataById.quality;
            this.runesclassification = (RunesClassification)this.classification;
            this.runesvariety        = (RunesVariety)this.variety;
            UIEventListener.Get(this.rune_compound.gameObject).onClick = new UIEventListener.VoidDelegate(this.Click_2_Item);
            UIEventListener.Get(this.rune_purchase.gameObject).onClick = new UIEventListener.VoidDelegate(this.Click_2_Item);
            this.count            = _equipmentinfodata.Count;
            this.rune_number.text = this.count.ToString();
            if (_equipmentinfodata.Count < 0)
            {
                this.rune_number.text = "0";
            }
            this.SetBtnState(this.count, dataById);
        }
 private void OnMsg_runesviewFilterClassification(MobaMessage msg)
 {
     if (msg.Param != null)
     {
         RunesClassification rcf = (RunesClassification)((int)msg.Param);
         this.FilterClassification(rcf);
         this.RePosition();
     }
 }
        private void FilterClassification(RunesClassification rcf)
        {
            this.claRunesList.Clear();
            if (this.allRunesList.Count != this.gridFilterArea.transform.childCount)
            {
                this.allRunesList.Clear();
                for (int num = 0; num != this.gridFilterArea.transform.childCount; num++)
                {
                    this.allRunesList.Add(this.gridFilterArea.transform.GetChild(num).GetComponent <RunesOperationItem>());
                }
            }
            UIToggle activeToggle = UIToggle.GetActiveToggle(5);
            bool     flag         = null != activeToggle && this.varRunesList.Count > 0;

            for (int num2 = 0; num2 != this.allRunesList.Count; num2++)
            {
                if (this.allRunesList[num2].Runesclassification == rcf)
                {
                    this.claRunesList.Add(this.allRunesList[num2]);
                }
            }
            if (rcf != RunesClassification.All)
            {
                if (flag)
                {
                    for (int num3 = 0; num3 != this.varRunesList.Count; num3++)
                    {
                        this.varRunesList[num3].gameObject.SetActive(this.varRunesList[num3].Runesclassification == rcf);
                    }
                }
                else
                {
                    for (int num4 = 0; num4 != this.allRunesList.Count; num4++)
                    {
                        this.allRunesList[num4].gameObject.SetActive(this.allRunesList[num4].Runesclassification == rcf);
                    }
                }
            }
            else
            {
                this.varRunesList.Clear();
                for (int num5 = 0; num5 != this.allRunesList.Count; num5++)
                {
                    this.allRunesList[num5].gameObject.SetActive(true);
                }
            }
        }
        public void Init(EquipmentInfoData _equipmentinfodata, int modelid)
        {
            this.modelID = _equipmentinfodata.ModelId.ToString();
            this.equipID = _equipmentinfodata.EquipmentId.ToString();
            SysGameItemsVo dataById = BaseDataMgr.instance.GetDataById <SysGameItemsVo>(this.ModelID);

            try
            {
                this.variety = int.Parse(dataById.sub_type.Split(new char[]
                {
                    '|'
                })[1]);
            }
            catch (Exception var_1_62)
            {
            }
            this.classification      = dataById.quality;
            this.runesclassification = (RunesClassification)this.classification;
            this.runesvariety        = (RunesVariety)this.variety;
            UIEventListener.Get(this.rune_inlay.gameObject).onClick   = new UIEventListener.VoidDelegate(this.ClickItem);
            UIEventListener.Get(this.rune_demount.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickItem);
            this.count            = _equipmentinfodata.Count;
            this.rune_number.text = this.count.ToString();
            if (_equipmentinfodata.Count < 0)
            {
                this.rune_number.text = "0";
            }
            this.rune_compound.gameObject.SetActive(false);
            if (modelid != 0)
            {
                bool flag = modelid == int.Parse(this.modelID);
                this.runesstate = ((!flag) ? RunesState.UnEquiped : RunesState.Equipted);
                this.rune_inlay.gameObject.SetActive(!flag);
                this.rune_demount.gameObject.SetActive(flag);
            }
            else
            {
                this.runesstate = RunesState.UnEquiped;
                this.rune_number.gameObject.SetActive(true);
                this.rune_inlay.gameObject.SetActive(true);
                this.rune_demount.gameObject.SetActive(false);
            }
            this.Details(dataById);
        }
Exemple #5
0
 private void ClickFilterClassification(GameObject obj)
 {
     if (null != obj)
     {
         string name = obj.name;
         if (name.CompareTo("All") == 0)
         {
             MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewFilterClassification, RunesClassification.All, false);
             for (int num = 0; num != this.btnFilterVariety.Count; num++)
             {
                 this.btnFilterVariety[num].optionCanBeNone = true;
                 this.btnFilterVariety[num].value           = false;
                 this.btnFilterVariety[num].optionCanBeNone = false;
             }
             return;
         }
         RunesClassification runesClassification = (RunesClassification)((int)Enum.Parse(typeof(RunesClassification), name));
         MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewFilterClassification, runesClassification, false);
     }
 }