private void RunesExtension(GameObject obj)
 {
     if (null != obj)
     {
         bool      isNeedRefresh = true;
         RunesItem tempRunesItem = obj.GetComponent <RunesItem>();
         if (null != this.lastRune && this.lastRune.RunePosition == tempRunesItem.RunePosition)
         {
             isNeedRefresh = false;
         }
         int limitLock = (int)tempRunesItem.LimitLock;
         if (limitLock == 0)
         {
             Singleton <TipView> .Instance.ShowViewSetText("召唤师等级" + tempRunesItem.RankRune + "级可使用", 1f);
         }
         else if (limitLock == 1)
         {
             GridHelper.FillGrid <RunesItem>(this.gridRunes, this.runesItem, this.Num, delegate(int idx, RunesItem comp)
             {
                 comp.ChangeState(tempRunesItem);
             });
             RunesPara runesPara = default(RunesPara);
             this.lastRune           = tempRunesItem;
             runesPara.isNeedRefresh = isNeedRefresh;
             runesPara.runesItem     = this.lastRune;
             MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewClickRune, runesPara, false);
         }
     }
 }
        private void SkipToAnotherRune()
        {
            List <RunesItem> list = new List <RunesItem>();

            if (this.gridRunes.transform.childCount > 0)
            {
                for (int i = 0; i < this.gridRunes.transform.childCount; i++)
                {
                    list.Add(this.gridRunes.transform.GetChild(i).GetComponent <RunesItem>());
                }
            }
            list = list.FindAll((RunesItem obj) => obj.LimitLock == Limit_lock.unlocked && obj.ModelID == 0);
            int num = -1;

            for (int num2 = 0; num2 != list.Count; num2++)
            {
                if (list[num2].RunePosition > this.lastRune.RunePosition)
                {
                    num = num2;
                    break;
                }
                num = -1;
            }
            if (list.Count > 0 && num == -1)
            {
                num = 0;
            }
            if (num == -1)
            {
                return;
            }
            this.lastRune = list[num];
            bool isNeedRefresh = true;

            GridHelper.FillGrid <RunesItem>(this.gridRunes, this.runesItem, this.Num, delegate(int idx, RunesItem comp)
            {
                comp.ChangeState(this.lastRune);
            });
            RunesPara runesPara = default(RunesPara);

            runesPara.isNeedRefresh = isNeedRefresh;
            runesPara.runesItem     = this.lastRune;
            MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewClickRune, runesPara, false);
        }
예제 #3
0
 private void OnMsg_runesviewClickRune(MobaMessage msg)
 {
     if (msg.Param != null)
     {
         RunesPara runesPara = default(RunesPara);
         try
         {
             runesPara = (RunesPara)msg.Param;
         }
         catch
         {
             return;
         }
         this.thisRP        = runesPara;
         this.runesPosition = (int)runesPara.runesItem.RunePosition;
         if (runesPara.isNeedRefresh)
         {
             this.CollectRunes();
             this.GenerateSort((!(null == runesPara.runesItem)) ? runesPara.runesItem.ModelID : 0);
         }
     }
 }