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_runesviewFilterVariety(MobaMessage msg)
 {
     if (msg.Param != null)
     {
         RunesVariety rv = (RunesVariety)((int)msg.Param);
         this.FilterVariety(rv);
         this.RePosition();
     }
 }
Example #3
0
 private void ClickFilterVariety(GameObject obj)
 {
     if (null != obj)
     {
         string       name         = obj.name;
         RunesVariety runesVariety = (RunesVariety)((int)Enum.Parse(typeof(RunesVariety), name));
         MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewFilterVariety, runesVariety, false);
     }
 }
        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);
        }
        private void FilterVariety(RunesVariety rv)
        {
            this.varRunesList.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(4);
            bool     flag         = null != activeToggle && this.claRunesList.Count > 0;

            for (int num2 = 0; num2 != this.allRunesList.Count; num2++)
            {
                if (this.allRunesList[num2].Runesvariety == rv)
                {
                    this.varRunesList.Add(this.allRunesList[num2]);
                }
            }
            if (flag)
            {
                for (int num3 = 0; num3 != this.claRunesList.Count; num3++)
                {
                    this.claRunesList[num3].gameObject.SetActive(this.claRunesList[num3].Runesvariety == rv);
                }
            }
            else
            {
                for (int num4 = 0; num4 != this.allRunesList.Count; num4++)
                {
                    this.allRunesList[num4].gameObject.SetActive(this.allRunesList[num4].Runesvariety == rv);
                }
            }
        }