Beispiel #1
0
 public void InitData(PItem rInfo)
 {
     ItemID = rInfo.itemId;
     rInfo.CopyTo(ref Item);
     //Item = rInfo;
     if (rInfo.growAttr?.petAttr != null)
     {
         Grade     = rInfo.growAttr.petAttr.grade;
         Level     = rInfo.growAttr.petAttr.level;
         Exp       = rInfo.growAttr.petAttr.exp;
         MoodValue = rInfo.growAttr.petAttr.moodValue;
         Status    = rInfo.growAttr.petAttr.status;
     }
 }
Beispiel #2
0
    void RefreshData(PItem item, bool success, RuneInWhichPanel type)
    {
        if (type == RuneInWhichPanel.Equip)
        {
            return;
        }
        _type   = type;
        curItem = item;
        moduleRune.evolveList.Clear();
        moduleRune.swallowedIdList.Clear();

        if (view)
        {
            view.progress = 0;
        }

        RefreshPanelActive(type);
        if (type == RuneInWhichPanel.Intentify)
        {
            RefreshDefault(item);

            if (!success)
            {
                RefreshNoChangePanel(item);
            }
            else
            {
                Util.SetText(runeLv, $"Lv.{item.growAttr.runeAttr.level}");
                pres.PlayAnimToPreview(moduleRune.GetExpProgress(curItem) + curItem.growAttr.runeAttr.level);
                moduleGlobal.ShowMessage(Util.GetString((int)TextForMatType.RuneUIText, 30));
            }

            RefreshProgress();
            RefreshChangePanel(item);

            moduleRune.GetUpLvList(item);
            dataSource.SetItems(moduleRune.upLevelList);
            noItmesTip.SafeSetActive(moduleRune.upLevelList.Count < 1);
            return;
        }


        if (type == RuneInWhichPanel.Evolve)
        {
            _RefreshPreViewPanel(moduleRune.evolveList);
            RefreshCoin();
            _RefreshStar(item);

            if (!success)
            {
                curItem.CopyTo(ref beforeItem);
                _RefreshNoChange(item);
            }
            else
            {
                _SuccessPanel();
            }

            moduleRune.GetUpStarList(item);
            moduleRune.SortGuideItem();
            dataSource.SetItems(moduleRune.upStarList);
            noItmesTip.SafeSetActive(moduleRune.upStarList.Count < 1);
        }
    }