コード例 #1
0
ファイル: GTItemHelper.cs プロジェクト: zyb2013/GameProject3
    public static void ShowItemDialogById(int itemID)
    {
        DItem db = ReadCfgItem.GetDataById(itemID);

        switch (db.ItemType)
        {
        case EItemType.EQUIP:
            break;

        case EItemType.DRUG:
        case EItemType.MAT:
        case EItemType.ACTION:
        case EItemType.MONEY:
        case EItemType.KEY:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIItemInfo);
            UIItemInfo itemInfo = (UIItemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIItemInfo);
            itemInfo.ShowViewById(itemID);
            break;

        case EItemType.GEM:
            break;

        case EItemType.CHIP:
            break;

        case EItemType.FASHION:
            break;

        case EItemType.EXP:
            break;

        case EItemType.BOX:
            break;
        }
    }
コード例 #2
0
    //Cammie Storey
    public void pickUpItem(GameObject item, GameController g_ctrl = null)
    {
        if (this.inventory.Count >= this.inventory_capacity)
        {
            return;
        }

        inventory.Add(item);
        item.SetActive(false);
        displayInventory(g_ctrl);

        GameObject        window         = GameObject.Find("Window - Inventory");
        List <UIItemSlot> inventoryslots = new List <UIItemSlot> (window.GetComponentsInChildren <UIItemSlot>());

        for (int i = 0; i < this.inventory_capacity; i++)
        {
            if (!inventoryslots[i].IsAssigned())
            {
                UIItemInfo itemData = new UIItemInfo();
                itemData.Icon = item.GetComponent <Item>().GetComponent <SpriteRenderer>().sprite;
                itemData.Name = item.GetComponent <Item>().name;
                inventoryslots[i].Assign(itemData);
                break;
            }
        }
    }
コード例 #3
0
ファイル: RnMUI_EquipSlot.cs プロジェクト: raoted/UnityRPG
    /// <summary>
    /// Unassign this slot.
    /// </summary>
    public override void Unassign()
    {
        // Remove the icon
        base.Unassign();

        // Clear the item info
        this.itemInfo = null;
    }
コード例 #4
0
ファイル: RnMUI_EquipSlot.cs プロジェクト: raoted/UnityRPG
    /// <summary>
    /// Checks if the given item can assigned to this slot.
    /// </summary>
    /// <returns><c>true</c>, if equip type was checked, <c>false</c> otherwise.</returns>
    /// <param name="info">Info.</param>
    public virtual bool CheckEquipType(UIItemInfo info)
    {
        if (info.EquipType != this.equipType)
        {
            return(false);
        }

        return(true);
    }
コード例 #5
0
ファイル: UIInventory.cs プロジェクト: ChoiIngon/TheDungeon
    private void Awake()
    {
        item_prefabs[(int)Item.Type.Equipment]  = UIUtil.FindChild <UIEquipItem>(transform, "ItemPrefabs/EquipItem");
        item_prefabs[(int)Item.Type.Expendable] = UIUtil.FindChild <UIPotionItem>(transform, "ItemPrefabs/PotionItem");
        item_prefabs[(int)Item.Type.Key]        = UIUtil.FindChild <UIKeyItem>(transform, "ItemPrefabs/KeyItem");

        close       = UIUtil.FindChild <Button>(transform, "BottomBar/Close");
        item_info   = UIUtil.FindChild <UIItemInfo>(transform, "ItemInfo");
        player_info = UIUtil.FindChild <UIPlayerInfo>(transform, "PlayerInfo");
        player_info.gameObject.SetActive(true);
    }
コード例 #6
0
ファイル: GTItemHelper.cs プロジェクト: zyb2013/GameProject3
    public static void ShowItemDialogByBagType(EBagType bagType, int pos)
    {
        Dictionary <int, XItem> dict = GTDataManager.Instance.GetBagDataByBagType(bagType);

        if (!dict.ContainsKey(pos))
        {
            return;
        }
        XItem item = dict[pos];
        DItem db   = ReadCfgItem.GetDataById(item.Id);

        switch (db.ItemType)
        {
        case EItemType.EQUIP:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIEquipInfo);
            UIEquipInfo w1 = (UIEquipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIEquipInfo);
            w1.ShowViewByPos(EPosType.BagItem, pos);
            break;

        case EItemType.MAT:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIItemInfo);
            UIItemInfo w2 = (UIItemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIItemInfo);
            w2.ShowViewByPos(pos, false);
            break;

        case EItemType.DRUG:
        case EItemType.BOX:
        case EItemType.KEY:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIItemInfo);
            UIItemInfo w3 = (UIItemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIItemInfo);
            w3.ShowViewByPos(pos, true);
            break;

        case EItemType.EXP:
            break;

        case EItemType.CHIP:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIChipInfo);
            UIChipInfo w4 = (UIChipInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIChipInfo);
            w4.ShowViewByPos(pos);
            break;

        case EItemType.GEM:
            GTWindowManager.Instance.OpenWindow(EWindowID.UIGemInfo);
            UIGemInfo w5 = (UIGemInfo)GTWindowManager.Instance.GetWindow(EWindowID.UIGemInfo);
            w5.ShowViewByPos(EPosType.BagGem, pos);
            break;
        }
    }
コード例 #7
0
    /// <summary>
    /// Assign the slot by item info.
    /// </summary>
    /// <param name="itemInfo">Item info.</param>
    public bool Assign(UIItemInfo itemInfo)
    {
        if (itemInfo == null)
        {
            return(false);
        }

        // Use the base class assign
        base.Assign(itemInfo.Icon);

        // Set the item info
        this.itemInfo = itemInfo;

        // Success
        return(true);
    }
コード例 #8
0
ファイル: UIPetStoneTrans.cs プロジェクト: gsoec/lm-source
 // Token: 0x060017A8 RID: 6056 RVA: 0x002861B0 File Offset: 0x002843B0
 public void OnButtonClick(UIButton sender)
 {
     if (sender.m_BtnID1 == 1)
     {
         if (sender.m_BtnID2 == 1)
         {
             this.GM.CloseMenu(EGUIWindow.UI_PetStoneTrans);
         }
         else if (sender.m_BtnID2 == 2)
         {
             if (this.StoneCount == 0)
             {
                 this.GM.AddHUDMessage(this.DM.mStringTable.GetStringByID(14568u), 255, true);
                 return;
             }
             if (this.UseCount == 0)
             {
                 this.GM.AddHUDMessage(this.DM.mStringTable.GetStringByID(5703u), 255, true);
                 return;
             }
             if (this.GM.bCheckStoneTrans)
             {
                 if (this.MessageStr == null)
                 {
                     this.MessageStr = StringManager.Instance.SpawnString(300);
                 }
                 this.MessageStr.Length = 0;
                 CString cstring = StringManager.Instance.StaticString1024();
                 UIItemInfo.SetNameProperties(null, null, cstring, null, ref this.tmpEquip, null);
                 this.MessageStr.StringToFormat(cstring);
                 this.MessageStr.IntToFormat((long)this.UseCount, 1, false);
                 this.MessageStr.AppendFormat(this.DM.mStringTable.GetStringByID(14587u));
                 this.GM.OpenCheckStoneTrans(this.MessageStr);
             }
             else
             {
                 this.SendTrans();
             }
         }
     }
     else if (sender.m_BtnID1 == 2)
     {
         this.GM.m_UICalculator.m_CalculatorHandler = this;
         this.GM.m_UICalculator.OpenCalculator(this.m_Slider.MaxValue, this.m_Slider.Value, 260f, 100f, this.m_Slider, 0L);
     }
 }
コード例 #9
0
ファイル: RnMUI_EquipSlot.cs プロジェクト: raoted/UnityRPG
    /// <summary>
    /// Performs a slot swap.
    /// </summary>
    /// <param name="targetObject">Target slot.</param>
    public override bool PerformSlotSwap(Object targetObject)
    {
        UIItemInfo targetItemInfo = null;
        bool       assign1        = false;

        if (targetObject is RnMUI_ItemSlot)
        {
            targetItemInfo = (targetObject as RnMUI_ItemSlot).GetItemInfo();
            assign1        = (targetObject as RnMUI_ItemSlot).Assign(this);
        }
        else if (targetObject is RnMUI_EquipSlot)
        {
            targetItemInfo = (targetObject as RnMUI_EquipSlot).GetItemInfo();
            assign1        = (targetObject as RnMUI_EquipSlot).Assign(this);
        }

        // Assign this slot by the target slot item info
        bool assign2 = this.Assign(targetItemInfo);

        // Return the status
        return(assign1 && assign2);
    }
コード例 #10
0
ファイル: RnMUI_ItemSlot.cs プロジェクト: raoted/UnityRPG
    /// <summary>
    /// Shows a tooltip with the given item info.
    /// </summary>
    /// <param name="info">Info.</param>
    /// <param name="widget">Widget.</param>
    public static void ShowTooltip(UIItemInfo info, UIWidget widget)
    {
        if (info == null)
        {
            return;
        }

        // Set the title and description
        RnMUI_Tooltip.SetTitle(info.Name);
        RnMUI_Tooltip.SetDescription(info.Description);

        // Item types
        RnMUI_Tooltip.AddAttribute(info.Type, "");
        RnMUI_Tooltip.AddAttribute(info.Subtype, "");

        if (info.ItemType == 1)
        {
            RnMUI_Tooltip.AddAttribute(info.Damage.ToString(), " Damage");
            RnMUI_Tooltip.AddAttribute(info.AttackSpeed.ToString("0.0"), " Attack speed");

            RnMUI_Tooltip.AddAttribute_SingleColumn("(" + ((float)info.Damage / info.AttackSpeed).ToString("0.0") + " damage per second)", "");
        }
        else
        {
            RnMUI_Tooltip.AddAttribute(info.Block.ToString(), " Block");
            RnMUI_Tooltip.AddAttribute(info.Armor.ToString(), " Armor");
        }

        RnMUI_Tooltip.AddAttribute_SingleColumn("", "+" + info.Stamina.ToString() + " Stamina", new RectOffset(0, 0, 7, 0));
        RnMUI_Tooltip.AddAttribute_SingleColumn("", "+" + info.Strength.ToString() + " Strength");

        // Set the tooltip position
        RnMUI_Tooltip.SetPosition(widget);

        // Show the tooltip
        RnMUI_Tooltip.Show();
    }
コード例 #11
0
ファイル: UISimpleItemInfo.cs プロジェクト: gsoec/lm-source
    // Token: 0x06001BBB RID: 7099 RVA: 0x00313DB0 File Offset: 0x00311FB0
    public void Show(UIButtonHint hint, ushort ItemID, int Num = -1, UIButtonHint.ePosition position = UIButtonHint.ePosition.Original, Vector3?upsetPoint = null)
    {
        if (hint == null)
        {
            return;
        }
        if (GUIManager.Instance.m_LordInfo.m_ButtonHint != null)
        {
            GUIManager.Instance.m_LordInfo.Hide(GUIManager.Instance.m_LordInfo.m_ButtonHint);
        }
        DataManager   instance    = DataManager.Instance;
        RectTransform x           = hint.transform as RectTransform;
        Equip         recordByKey = instance.EquipTable.GetRecordByKey(ItemID);

        if (x == null || recordByKey.EquipKey != ItemID)
        {
            return;
        }
        if (recordByKey.EquipKind - 1 == 4 && GUIManager.Instance.FindMenu(EGUIWindow.Door) != null)
        {
            this.HeroID = recordByKey.SyntheticParts[0].SyntheticItem;
            this.ItemBtnRayCast.blocksRaycasts = true;
            this.InfoIcon.gameObject.SetActive(true);
        }
        else
        {
            this.ItemBtnRayCast.blocksRaycasts = false;
            this.InfoIcon.gameObject.SetActive(false);
        }
        if (this.m_HeroBtn.gameObject.activeSelf)
        {
            this.ItemGo.SetActive(true);
            this.ItemPanel.gameObject.SetActive(true);
            this.HeroPanel.gameObject.SetActive(false);
        }
        ushort num;

        if (Num == -1)
        {
            num = instance.GetCurItemQuantity(ItemID, 0);
        }
        else
        {
            num = (ushort)Num;
        }
        this.m_RectTransform.gameObject.SetActive(true);
        this.m_RectTransform.SetAsLastSibling();
        GUIManager.Instance.ChangeHeroItemImg(this.m_ItemBtn.transform, eHeroOrItem.Item, ItemID, 0, 0, 0);
        UIItemInfo.SetNameProperties(this.m_Name, this.m_Properties, this.NameStr, this.PropertiesStr, ref recordByKey, this.AddionalStr);
        if (this.AddionalStr.Length > 0)
        {
            this.PropertiesStr.Append(this.AddionalStr);
            this.m_Properties.text = this.PropertiesStr.ToString();
            this.m_Properties.SetAllDirty();
            this.m_Properties.cachedTextGenerator.Invalidate();
        }
        Vector2 sizeDelta = this.rectProperties.sizeDelta;
        float   num2      = this.m_Properties.preferredHeight - this.OriTextHeight;

        sizeDelta.y = this.m_Properties.preferredHeight;
        this.rectProperties.sizeDelta = sizeDelta;
        sizeDelta   = this.m_BackRect.sizeDelta;
        sizeDelta.y = Mathf.Max(this.OriHeight, this.OriHeight + num2);
        this.m_BackRect.sizeDelta = sizeDelta;
        this.HeroNameStr.ClearString();
        EItemType eitemType = (EItemType)(recordByKey.EquipKind - 1);

        switch (eitemType)
        {
        case EItemType.EIT_SingleNumSynEquip:
        case EItemType.EIT_MultiNumSynEquip:
            this.HeroNameStr.IntToFormat((long)recordByKey.NeedLv, 1, false);
            this.HeroNameStr.AppendFormat(instance.mStringTable.GetStringByID(148u));
            this.m_ItemLvText.text = this.HeroNameStr.ToString();
            this.m_ItemLvText.SetAllDirty();
            this.m_ItemLvText.cachedTextGenerator.Invalidate();
            this.m_ItemLvText.color  = new Color(0.46f, 1f, 1f);
            this.m_ItemKindText.text = instance.mStringTable.GetStringByID(886u);
            break;

        case EItemType.EIT_SynBook:
            this.m_ItemKindText.text = instance.mStringTable.GetStringByID(255u);
            break;

        case EItemType.EIT_SynBaseEquip:
            this.m_ItemKindText.text = instance.mStringTable.GetStringByID(254u);
            break;

        case EItemType.EIT_HeroStone:
            this.m_ItemKindText.text = instance.mStringTable.GetStringByID(256u);
            break;

        case EItemType.EIT_Consumables:
            this.m_ItemKindText.text = instance.mStringTable.GetStringByID(253u);
            break;

        default:
            if (eitemType != EItemType.EIT_EnhanceStone)
            {
                this.m_ItemKindText.text = string.Empty;
            }
            else
            {
                this.m_ItemKindText.text = instance.mStringTable.GetStringByID(16050u);
            }
            break;

        case EItemType.EIT_CaseByCase:
        {
            ECaseByCaseType ecaseByCaseType = (ECaseByCaseType)recordByKey.PropertiesInfo[0].Propertieskey;
            if (ecaseByCaseType == ECaseByCaseType.ECBCT_PetCore)
            {
                this.m_ItemKindText.text = instance.mStringTable.GetStringByID(14654u);
            }
            else if (ecaseByCaseType == ECaseByCaseType.ECBCT_PetMaterial)
            {
                this.m_ItemKindText.text = instance.mStringTable.GetStringByID(879u);
            }
            else
            {
                this.m_ItemKindText.text = string.Empty;
            }
            break;
        }
        }
        if ((recordByKey.EquipKind != 18 || recordByKey.PropertiesInfo[2].Propertieskey < 1 || recordByKey.PropertiesInfo[2].Propertieskey > 2) && (recordByKey.EquipKind != 11 || recordByKey.PropertiesInfo[0].Propertieskey < 6 || recordByKey.PropertiesInfo[0].Propertieskey > 7))
        {
            if (recordByKey.EquipKind == 19 && recordByKey.PropertiesInfo[3].Propertieskey == 1)
            {
                this.m_OwnedText.text = string.Empty;
            }
            else
            {
                this.OwnedStr.ClearString();
                this.OwnedStr.Append("(");
                this.OwnedStr.IntToFormat((long)num, 1, true);
                this.OwnedStr.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(79u));
                this.OwnedStr.Append(")");
                this.m_OwnedText.color = Color.white;
                this.m_OwnedText.text  = this.OwnedStr.ToString();
                this.m_OwnedText.SetAllDirty();
                this.m_OwnedText.cachedTextGenerator.Invalidate();
            }
        }
        else
        {
            this.m_OwnedText.text = string.Empty;
        }
        if (recordByKey.RecoverPrice > 0u)
        {
            this.PriceStr.ClearString();
            this.PriceStr.IntToFormat((long)((ulong)recordByKey.RecoverPrice), 1, true);
            this.PriceStr.AppendFormat("{0}");
            this.m_Price.text = this.PriceStr.ToString();
            this.m_Price.SetAllDirty();
            this.m_Price.cachedTextGenerator.Invalidate();
            this.m_Coin.enabled = true;
        }
        else
        {
            this.m_Coin.enabled = false;
            this.m_Price.text   = string.Empty;
        }
        hint.GetTipPosition(this.m_BackRect, position, upsetPoint);
        this.m_ItemRect.anchoredPosition = this.m_BackRect.anchoredPosition + this.ItemPosUpset;
        float num3 = -this.m_BackRect.anchoredPosition3D.y + this.m_BackRect.sizeDelta.y;

        if (num3 > GUIManager.Instance.m_MessageBoxLayer.rect.size.y)
        {
            this.m_Properties.fontSize = 18 - Convert.ToInt32((num3 - GUIManager.Instance.m_MessageBoxLayer.rect.size.y) * 0.038f);
            Vector2 sizeDelta2 = this.m_Properties.rectTransform.sizeDelta;
            sizeDelta2.y = Mathf.Max(66f, this.m_Properties.preferredHeight);
            this.m_Properties.rectTransform.sizeDelta = sizeDelta2;
            sizeDelta2   = this.m_BackRect.sizeDelta;
            sizeDelta2.y = Mathf.Max(186f, 123.6f + this.m_Properties.preferredHeight + 14.4f);
            this.m_BackRect.sizeDelta = sizeDelta2;
        }
        this.m_ButtonHint      = hint;
        this.Canvasgroup.alpha = 1f;
    }
コード例 #12
0
ファイル: ItemInfoDialog.cs プロジェクト: WeeirJoe/Joe
 public void AssignItem(UIItemInfo item)
 {
     Item = item;
 }
コード例 #13
0
ファイル: UIOpenBox.cs プロジェクト: gsoec/lm-source
 // Token: 0x06001ED6 RID: 7894 RVA: 0x003AF68C File Offset: 0x003AD88C
 public void UpDateRowItem(GameObject item, int dataIdx, int panelObjectIdx, int panelId)
 {
     if (panelObjectIdx < 9)
     {
         if (!this.bFindScrollComp[panelObjectIdx])
         {
             this.bFindScrollComp[panelObjectIdx]            = true;
             this.ScrollComp[panelObjectIdx].LineImage       = item.transform.GetChild(0).GetComponent <Image>();
             this.ScrollComp[panelObjectIdx].HIBtn           = item.transform.GetChild(1).GetComponent <UIHIBtn>();
             this.ScrollComp[panelObjectIdx].HIBtn.m_Handler = this;
             this.ScrollComp[panelObjectIdx].LEBtn           = item.transform.GetChild(2).GetComponent <UILEBtn>();
             this.ScrollComp[panelObjectIdx].LEBtn.m_Handler = this;
             this.ScrollComp[panelObjectIdx].ItemName        = item.transform.GetChild(4).GetComponent <UIText>();
             this.ScrollComp[panelObjectIdx].ItemCountText   = item.transform.GetChild(5).GetComponent <UIText>();
             this.ScrollComp[panelObjectIdx].RankImg         = item.transform.GetChild(3).GetComponent <Image>();
             this.ScrollComp[panelObjectIdx].RankText        = item.transform.GetChild(3).GetChild(0).GetComponent <UIText>();
             this.ScrollComp[panelObjectIdx].Btn3            = item.transform.GetChild(6).GetComponent <UIButton>();
             this.ScrollComp[panelObjectIdx].Hint3           = item.transform.GetChild(6).GetComponent <UIButtonHint>();
             this.ScrollComp[panelObjectIdx].Hint3.m_Handler = this;
             this.ScrollComp[panelObjectIdx].Hint3.DelayTime = 0.2f;
             this.PriceStr[panelObjectIdx] = StringManager.Instance.SpawnString(30);
             this.NameStr[panelObjectIdx]  = StringManager.Instance.SpawnString(150);
             this.RankStr[panelObjectIdx]  = StringManager.Instance.SpawnString(30);
         }
         if (dataIdx < 0)
         {
             return;
         }
         ushort num  = 1;
         ushort num2 = 1;
         byte   b    = 1;
         bool   flag = false;
         this.NameStr[panelObjectIdx].Length            = 0;
         this.ScrollComp[panelObjectIdx].HIBtn.m_BtnID2 = panelObjectIdx;
         if (this.OpenKind == 1 || this.OpenKind == 4)
         {
             this.ScrollComp[panelObjectIdx].LineImage.color = new Color32(94, 183, 138, byte.MaxValue);
             if (this.tmpEquip.EquipKind == 18)
             {
                 if (this.IsGiftBox(this.BoxID))
                 {
                     if (dataIdx >= this.tmpGB.ItemData.Length)
                     {
                         return;
                     }
                     num  = this.tmpGB.ItemData[dataIdx].ItemID;
                     num2 = this.tmpGB.ItemData[dataIdx].ItemCount;
                 }
                 else
                 {
                     if (dataIdx >= this.tmpLB.ItemData.Length)
                     {
                         return;
                     }
                     num  = this.tmpLB.ItemData[dataIdx].ItemID;
                     num2 = this.tmpLB.ItemData[dataIdx].ItemCount;
                 }
                 Equip recordByKey = this.DM.EquipTable.GetRecordByKey(num);
                 flag = this.GM.IsLeadItem(recordByKey.EquipKind);
                 this.NameStr[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID((uint)recordByKey.EquipName));
                 if (flag)
                 {
                     if (this.EndRank == 0)
                     {
                         this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(this.BeginRank));
                         this.NameStr[panelObjectIdx].AppendFormat("({0})");
                     }
                     else
                     {
                         this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(this.BeginRank));
                         this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(this.EndRank));
                         this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7738u));
                     }
                 }
                 if (recordByKey.EquipKind == 30)
                 {
                     PetTbl recordByKey2 = PetManager.Instance.PetTable.GetRecordByKey(recordByKey.SyntheticParts[0].SyntheticItem);
                     this.RankStr[panelObjectIdx].Length = 0;
                     StringManager.IntToStr(this.RankStr[panelObjectIdx], (long)recordByKey2.Rare, 1, false);
                     this.ScrollComp[panelObjectIdx].RankText.text = this.RankStr[panelObjectIdx].ToString();
                     this.ScrollComp[panelObjectIdx].RankText.SetAllDirty();
                     this.ScrollComp[panelObjectIdx].RankText.cachedTextGenerator.Invalidate();
                     this.ScrollComp[panelObjectIdx].RankImg.gameObject.SetActive(true);
                 }
                 else
                 {
                     this.ScrollComp[panelObjectIdx].RankImg.gameObject.SetActive(false);
                 }
             }
             else
             {
                 if (this.tmpEquip.EquipKind != 19)
                 {
                     return;
                 }
                 if (dataIdx >= this.tmpCB.ItemData.Length)
                 {
                     return;
                 }
                 num  = this.tmpCB.ItemData[dataIdx].ItemID;
                 num2 = this.tmpCB.ItemData[dataIdx].ItemCount;
                 b    = this.tmpCB.ItemData[dataIdx].Rank;
                 Equip recordByKey = this.DM.EquipTable.GetRecordByKey(num);
                 flag = this.GM.IsLeadItem(recordByKey.EquipKind);
                 if (this.tmpCB.ItemData[dataIdx].Rank != 0)
                 {
                     this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(this.tmpCB.ItemData[dataIdx].Rank));
                     this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7739u));
                 }
                 else if (recordByKey.EquipKind == 18 && this.tmpEquip.PropertiesInfo[0].Propertieskey != 6)
                 {
                     byte itemRank = 1;
                     if (this.tmpEquip.PropertiesInfo[0].Propertieskey == 1)
                     {
                         itemRank = 3;
                     }
                     else if (this.tmpEquip.PropertiesInfo[0].Propertieskey == 2)
                     {
                         itemRank = 4;
                     }
                     else if (this.tmpEquip.PropertiesInfo[0].Propertieskey == 3)
                     {
                         itemRank = 5;
                     }
                     this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(itemRank));
                     this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7739u));
                 }
                 this.NameStr[panelObjectIdx].Append(this.DM.mStringTable.GetStringByID((uint)recordByKey.EquipName));
             }
         }
         else if (this.OpenKind == 2)
         {
             this.ScrollComp[panelObjectIdx].LineImage.color = new Color32(94, 165, 183, byte.MaxValue);
             if (dataIdx >= this.GM.CommonItemData.Count)
             {
                 return;
             }
             num  = this.GM.CommonItemData[dataIdx].ItemID;
             num2 = this.GM.CommonItemData[dataIdx].Num;
             b    = this.GM.CommonItemData[dataIdx].ItemRank;
             Equip recordByKey = this.DM.EquipTable.GetRecordByKey(num);
             flag = this.GM.IsLeadItem(recordByKey.EquipKind);
             if (this.GM.CommonItemData[dataIdx].ItemRank != 0)
             {
                 this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(b));
                 this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7739u));
             }
             CString cstring = StringManager.Instance.StaticString1024();
             UIItemInfo.SetNameProperties(null, null, cstring, null, ref recordByKey, null);
             this.NameStr[panelObjectIdx].Append(cstring);
         }
         else if (this.OpenKind == 3)
         {
             this.ScrollComp[panelObjectIdx].LineImage.color = new Color32(94, 165, 183, byte.MaxValue);
             MerchantmanManager instance = MerchantmanManager.Instance;
             if (dataIdx >= (int)instance.MerchantmanExtraData.DataLen)
             {
                 return;
             }
             num  = instance.MerchantmanExtraData.ItemContain[dataIdx].ItemID;
             num2 = instance.MerchantmanExtraData.ItemContain[dataIdx].Num;
             b    = instance.MerchantmanExtraData.ItemContain[dataIdx].ItemRank;
             Equip recordByKey = this.DM.EquipTable.GetRecordByKey(num);
             flag = this.GM.IsLeadItem(recordByKey.EquipKind);
             if (b != 0)
             {
                 this.NameStr[panelObjectIdx].StringToFormat(MallManager.Instance.GetItemRankName(b));
                 this.NameStr[panelObjectIdx].AppendFormat(this.DM.mStringTable.GetStringByID(7739u));
             }
             CString cstring2 = StringManager.Instance.StaticString1024();
             UIItemInfo.SetNameProperties(null, null, cstring2, null, ref recordByKey, null);
             this.NameStr[panelObjectIdx].Append(cstring2);
         }
         if (flag)
         {
             GUIManager.Instance.ChangeLordEquipImg(this.ScrollComp[panelObjectIdx].LEBtn.transform, num, b, eLordEquipDisplayKind.OnlyItem, 0, 0, 0, 0, 0, false);
         }
         else
         {
             GUIManager.Instance.ChangeHeroItemImg(this.ScrollComp[panelObjectIdx].HIBtn.transform, eHeroOrItem.Item, num, 0, 0, 0);
         }
         this.ScrollComp[panelObjectIdx].LEBtn.gameObject.SetActive(flag);
         this.ScrollComp[panelObjectIdx].HIBtn.gameObject.SetActive(!flag);
         this.ScrollComp[panelObjectIdx].Hint3.Parm1 = num;
         this.ScrollComp[panelObjectIdx].Hint3.Parm2 = b;
         if (flag || (!MallManager.Instance.CheckCanOpenDetail(num) && !PetManager.Instance.IsFakePetItem(num)))
         {
             this.ScrollComp[panelObjectIdx].Hint3.enabled = true;
         }
         else
         {
             this.ScrollComp[panelObjectIdx].Hint3.enabled = false;
         }
         this.ScrollComp[panelObjectIdx].Btn3.gameObject.SetActive(this.ScrollComp[panelObjectIdx].Hint3.enabled);
         this.ScrollComp[panelObjectIdx].ItemName.text = this.NameStr[panelObjectIdx].ToString();
         this.ScrollComp[panelObjectIdx].ItemName.SetAllDirty();
         this.ScrollComp[panelObjectIdx].ItemName.cachedTextGenerator.Invalidate();
         this.PriceStr[panelObjectIdx].Length = 0;
         StringManager.IntToStr(this.PriceStr[panelObjectIdx], (long)num2, 1, true);
         this.ScrollComp[panelObjectIdx].ItemCountText.text = this.PriceStr[panelObjectIdx].ToString();
         this.ScrollComp[panelObjectIdx].ItemCountText.SetAllDirty();
         this.ScrollComp[panelObjectIdx].ItemCountText.cachedTextGenerator.Invalidate();
     }
 }