Exemple #1
0
    public void Set_ItemInfo(ITEM _cItem)
    {
        if (_cItem == null || !_cItem.IsValid())
        {
            return;
        }
        this.m_nlbEquipInfo.Clear();
        ItemOption_Text[] array    = ItemTooltipDlg.Get_Item_Info(_cItem, null, false, true, G_ID.NONE);
        ITEMINFO          itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(_cItem.m_nItemUnique);

        if (itemInfo == null)
        {
            return;
        }
        NewListItem newListItem = new NewListItem(this.m_nlbEquipInfo.ColumnNum, true, string.Empty);
        int         rank        = _cItem.m_nOption[2];
        int         num         = 0;
        bool        flag        = false;
        string      text        = string.Empty;

        if (_cItem.m_nPosType == 10 || _cItem.m_nPosType == 1 || _cItem.m_nPosType == 2 || _cItem.m_nPosType == 3 || _cItem.m_nPosType == 4)
        {
            text = string.Format("{0}{1} {2}", ItemManager.RankTextColor(rank), ItemManager.RankText(rank), NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo.m_nItemType));
        }
        else
        {
            text = string.Format("{0}", NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo.m_nItemType));
        }
        newListItem.SetListItemData(2, text, null, null, null);
        if (array.Length > 0)
        {
            if (array[0].m_MainOption)
            {
                newListItem.SetListItemData(4, array[0].m_OptionName, null, null, null);
                newListItem.SetListItemData(6, array[0].m_OptionValue, null, null, null);
                num++;
            }
            else
            {
                newListItem.SetListItemData(4, string.Empty, null, null, null);
                newListItem.SetListItemData(6, string.Empty, null, null, null);
            }
            StringBuilder stringBuilder  = new StringBuilder();
            StringBuilder stringBuilder2 = new StringBuilder();
            if (array.Length > num)
            {
                for (int i = num; i < array.Length; i++)
                {
                    stringBuilder.Append(array[i].m_OptionName);
                    stringBuilder2.Append(array[i].m_OptionValue);
                }
            }
            newListItem.SetListItemData(5, stringBuilder.ToString(), null, null, null);
            newListItem.SetListItemData(7, stringBuilder2.ToString(), null, null, null);
        }
        else
        {
            newListItem.SetListItemData(4, string.Empty, null, null, null);
            newListItem.SetListItemData(5, string.Empty, null, null, null);
            newListItem.SetListItemData(6, string.Empty, null, null, null);
            newListItem.SetListItemData(7, string.Empty, null, null, null);
        }
        string text2 = NrTSingleton <ItemManager> .Instance.GetName(_cItem);

        if (_cItem.m_nDurability == 0 && (_cItem.m_nPosType == 1 || _cItem.m_nPosType == 2 || _cItem.m_nPosType == 3 || _cItem.m_nPosType == 4))
        {
            text2 = string.Format("{0} {1}", text2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2984"));
        }
        newListItem.SetListItemData(11, text2, null, null, null);
        StringBuilder stringBuilder3 = new StringBuilder();
        string        value          = "\r\n";

        if (itemInfo.m_strToolTipTextKey != "0")
        {
            stringBuilder3.Append(NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey));
            stringBuilder3.Append(value);
        }
        int num2 = _cItem.m_nOption[4];
        int num3 = _cItem.m_nOption[5];
        int num4 = _cItem.m_nOption[6];
        int num5 = _cItem.m_nOption[9];

        if (num2 > 0 && num3 > 0)
        {
            string             value2            = string.Empty;
            string             empty             = string.Empty;
            BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num2, num3);

            if (battleSkillDetail != null)
            {
                if (itemInfo.IsItemATB(131072L) || itemInfo.IsItemATB(524288L))
                {
                    value2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2381"));
                }
                else
                {
                    value2 = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2183"));
                }
                stringBuilder3.Append(value2);
                stringBuilder3.Append(value);
                NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, null, -1);

                stringBuilder3.Append(empty);
                stringBuilder3.Append(value);
                flag = true;
            }
            string empty2 = string.Empty;
            if (num4 > 0 && num5 > 0 && flag)
            {
                BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num4, num5);

                if (battleSkillDetail2 != null)
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail2.m_nSkillTooltip), battleSkillDetail2, null, -1);
                }
                stringBuilder3.Append(empty2);
                stringBuilder3.Append(value);
            }
        }
        newListItem.SetListItemData(14, stringBuilder3.ToString(), null, null, null);
        newListItem.SetListItemData(8, NrTSingleton <ItemManager> .Instance.GetItemTexture(_cItem.m_nItemUnique), null, null, null);
        if (itemInfo.m_nSetUnique != 0)
        {
            newListItem.SetListItemData(12, string.Empty, _cItem, new EZValueChangedDelegate(this.Click_SetItem), null);
        }
        else
        {
            newListItem.SetListItemData(12, false);
        }
        newListItem.Data = _cItem;
        this.m_nlbEquipInfo.Add(newListItem);
        this.m_nlbEquipInfo.RepositionItems();
        if (itemInfo.m_nSetUnique != 0)
        {
            this.Load_SetEffect();
        }
        this.m_lbNotice.Visible = false;
    }
    public void Item_Tooltip(Form cThis, ITEM pkItem, ITEM pkEquipItem, G_ID eWidowID, bool bEquiped = false)
    {
        if (pkItem == null || !pkItem.IsValid())
        {
            return;
        }
        if (pkItem != null)
        {
            ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(pkItem.m_nItemUnique);

            if (itemInfo != null)
            {
                if (itemInfo.m_nSetUnique != 0)
                {
                    this.SetItemView(true);
                }
                else
                {
                    this.SetItemView(false);
                }
            }
        }
        ItemOption_Text[] array     = ItemTooltipDlg.Get_Item_Info(pkItem, pkEquipItem, bEquiped, true, G_ID.NONE);
        ITEMINFO          itemInfo2 = NrTSingleton <ItemManager> .Instance.GetItemInfo(pkItem.m_nItemUnique);

        if (itemInfo2 == null)
        {
            return;
        }
        int    rank = pkItem.m_nOption[2];
        int    num  = 0;
        string name = NrTSingleton <ItemManager> .Instance.GetName(pkItem);

        this.m_txClass.SetTexture("Win_I_Frame" + ItemManager.ChangeRankToString(rank));
        this.m_lbTitle.Text = string.Format("{0} {1}", name, (!bEquiped) ? string.Empty : string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("2002"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1479")));
        this.m_itItemTex.SetItemTexture(pkItem);
        if (pkItem.m_nPosType == 10 || Protocol_Item.Is_EquipItem(pkItem.m_nItemUnique))
        {
            this.m_lbClass.Text = string.Format("{0}{1} {2}", ItemManager.RankTextColor(rank), ItemManager.RankText(rank), NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo2.m_nItemType));
        }
        else
        {
            this.m_lbClass.Text = string.Format("{0}", NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo2.m_nItemType));
        }
        this.m_lbType.Text = Protocol_Item.GetItemPartText(NrTSingleton <ItemManager> .Instance.GetItemPartByItemUnique(pkItem.m_nItemUnique));
        if (array.Length > 0)
        {
            if (array[0].m_MainOption)
            {
                this.m_lbMainOption.Text = array[0].m_OptionName;
                this.m_flMainValue.SetFlashLabel(array[0].m_OptionValue);
                num++;
            }
            else
            {
                this.m_lbMainOption.Text = string.Empty;
                this.m_flMainValue.SetFlashLabel(string.Empty);
            }
            StringBuilder stringBuilder  = new StringBuilder();
            StringBuilder stringBuilder2 = new StringBuilder();
            if (array.Length > num)
            {
                for (int i = num; i < array.Length; i++)
                {
                    stringBuilder.Append(array[i].m_OptionName);
                    stringBuilder2.Append(array[i].m_OptionValue);
                }
            }
            this.m_lbSubOption.SetFlashLabel(stringBuilder.ToString());
            this.m_flSubValue.SetFlashLabel(stringBuilder2.ToString());
        }
        else
        {
            this.m_lbMainOption.Text = string.Empty;
            this.m_flMainValue.SetFlashLabel(string.Empty);
            this.m_lbSubOption.SetFlashLabel(string.Empty);
            this.m_flSubValue.SetFlashLabel(string.Empty);
        }
        this.m_lbText.SetLocation(this.m_lbText.GetLocation().x, this.m_lbSubOption.GetLocationY() + this.m_lbSubOption.Height + 10f);
        if (itemInfo2.m_strToolTipTextKey != "0")
        {
            string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo2.m_strToolTipTextKey);

            this.m_lbText.SetFlashLabel(textFromItemHelper);
            this.bText = true;
        }
        else
        {
            this.m_lbText.SetFlashLabel(string.Empty);
            this.bText = false;
        }
        int num2 = pkItem.m_nOption[4];
        int num3 = pkItem.m_nOption[5];
        int num4 = pkItem.m_nOption[6];
        int num5 = pkItem.m_nOption[9];

        this.bItemSkillText  = false;
        this.bItemSkillText2 = false;
        if (num2 > 0 && num3 > 0)
        {
            BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num2, num3);

            if (battleSkillDetail != null)
            {
                string flashLabel = string.Empty;
                if (itemInfo2.IsItemATB(131072L) || itemInfo2.IsItemATB(524288L))
                {
                    flashLabel = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2381"));
                }
                else
                {
                    flashLabel = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2183"));
                }
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail.m_nSkillTooltip), battleSkillDetail, null, -1);

                if (this.bText)
                {
                    this.m_lbItemSkillName.SetLocation(this.m_lbItemSkillName.GetLocation().x, this.m_lbText.GetLocationY() + this.m_lbText.Height + 20f);
                }
                else
                {
                    this.m_lbItemSkillName.SetLocation(this.m_lbItemSkillName.GetLocation().x, this.m_lbSubOption.GetLocationY() + this.m_lbSubOption.Height + 20f);
                }
                this.m_lbItemSkillName.SetFlashLabel(flashLabel);
                this.m_lbItemSkillText.SetLocation(this.m_lbItemSkillText.GetLocation().x, this.m_lbItemSkillName.GetLocationY() + this.m_lbItemSkillName.Height + 10f);
                this.m_lbItemSkillText.SetFlashLabel(empty);
                this.bItemSkillText = true;
            }
        }
        else
        {
            this.m_lbItemSkillName.SetFlashLabel(string.Empty);
            this.m_lbItemSkillText.SetFlashLabel(string.Empty);
        }
        if (num4 > 0 && num5 > 0 && this.bItemSkillText)
        {
            BATTLESKILL_DETAIL battleSkillDetail2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(num4, num5);

            if (battleSkillDetail2 != null)
            {
                string empty2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceBattleSkillParam(ref empty2, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillDetail2.m_nSkillTooltip), battleSkillDetail2, null, -1);

                this.m_lbItemSkillText2.SetLocation(this.m_lbItemSkillText.GetLocation().x, this.m_lbItemSkillText.GetLocationY() + this.m_lbItemSkillText.Height);
                this.m_lbItemSkillText2.SetFlashLabel(empty2);
                this.bItemSkillText2 = true;
            }
        }
        else
        {
            this.m_lbItemSkillText2.SetFlashLabel(string.Empty);
        }
        float height;

        if (this.bItemSkillText)
        {
            if (this.bItemSkillText2)
            {
                height = this.m_lbItemSkillText2.GetLocationY() + this.m_lbItemSkillText.Height + 10f;
            }
            else
            {
                height = this.m_lbItemSkillText.GetLocationY() + this.m_lbItemSkillText.Height + 10f;
            }
        }
        else
        {
            height = this.m_lbText.GetLocationY() + this.m_lbText.Height + 14f;
        }
        if (this.bItemSkillText2)
        {
            this.m_txLine.Visible = true;
        }
        else
        {
            this.m_txLine.Visible = false;
        }
        base.SetSize(base.GetSizeX(), height);
        this.m_txBG.SetSize(base.GetSize().x, height);
    }
Exemple #3
0
    public void Set_Item(ITEM a_cItem)
    {
        if (a_cItem == null || !a_cItem.IsValid())
        {
            this.Close();
            return;
        }
        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(a_cItem.m_nItemUnique);

        if (itemInfo == null)
        {
            this.Close();
            return;
        }
        bool           flag           = false;
        ITEM_BOX_GROUP iTEM_BOX_GROUP = null;

        if (itemInfo.IsItemATB(65536L))
        {
            flag           = true;
            iTEM_BOX_GROUP = NrTSingleton <ItemManager> .Instance.GetBoxGroup(a_cItem.m_nItemUnique);

            if (iTEM_BOX_GROUP == null)
            {
                this.Close();
                return;
            }
        }
        this.m_lMainBoxItem = a_cItem;
        this.m_strItemName  = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_lMainBoxItem.m_nItemUnique);

        this.m_BoxitemCount = this.m_lMainBoxItem.m_nItemNum;
        this.SetTitle();
        this.m_ivMainBoxItem.BaseInfoLoderImage = NrTSingleton <ItemManager> .Instance.GetItemTexture(this.m_lMainBoxItem.m_nItemUnique);

        this.m_NlbItemListBox.Clear();
        if (a_cItem != null)
        {
            List <Protocol_Item_Box.Roulette_Item> list = new List <Protocol_Item_Box.Roulette_Item>();
            Protocol_Item_Box.Roulette_Item        item = default(Protocol_Item_Box.Roulette_Item);
            for (int i = 0; i < 12; i++)
            {
                int num;
                int num2;
                if (flag)
                {
                    num  = iTEM_BOX_GROUP.i32GroupItemUnique[i];
                    num2 = iTEM_BOX_GROUP.i32GroupItemNum[i];
                }
                else
                {
                    num  = itemInfo.m_nBoxItemUnique[i];
                    num2 = itemInfo.m_nBoxItemNumber[i];
                }
                if (num > 0)
                {
                    ITEM boxItemTemp = NrTSingleton <ItemManager> .Instance.GetBoxItemTemp(a_cItem.m_nItemUnique, i);

                    if (boxItemTemp != null && boxItemTemp.IsValid())
                    {
                        item.m_nItemUnique = num;
                        item.m_strText     = NrTSingleton <UIDataManager> .Instance.GetString(num2.ToString(), " ", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("442"));

                        list.Add(item);
                        NewListItem newListItem = new NewListItem(this.m_NlbItemListBox.ColumnNum, true, string.Empty);
                        newListItem.SetListItemData(0, true);
                        newListItem.SetListItemData(1, boxItemTemp, boxItemTemp, new EZValueChangedDelegate(this.OnItemToolTip), null);
                        this.m_NlbItemListBox.Add(newListItem);
                    }
                }
            }
            this.m_NlbItemListBox.RepositionItems();
            this.m_saRouletteItem = list.ToArray();
            ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(a_cItem, null, false, false, G_ID.NONE);
            if (array.Length > 0)
            {
                StringBuilder stringBuilder  = new StringBuilder();
                StringBuilder stringBuilder2 = new StringBuilder();
                for (int j = 0; j < array.Length; j++)
                {
                    stringBuilder.Append(array[j].m_OptionName);
                    stringBuilder2.Append(array[j].m_OptionValue);
                }
                this.m_flToolTip1.SetFlashLabel(stringBuilder.ToString());
                this.m_flToolTip2.SetFlashLabel(stringBuilder2.ToString());
            }
            else
            {
                this.m_flToolTip1.SetFlashLabel(string.Empty);
                this.m_flToolTip2.SetFlashLabel(string.Empty);
            }
            this.m_flToolTip3.SetLocation(this.m_flToolTip3.GetLocation().x, this.m_flToolTip2.GetLocationY() + this.m_flToolTip2.Height + 10f);
            if (itemInfo.m_strToolTipTextKey != "0")
            {
                string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey);

                this.m_flToolTip3.SetFlashLabel(textFromItemHelper);
            }
            else
            {
                this.m_flToolTip3.SetFlashLabel(string.Empty);
            }
        }
        base.ShowLayer(0, 1);
    }
Exemple #4
0
    public void SowCompleteItem()
    {
        if (this.m_CompleteItem == null || !this.m_CompleteItem.IsValid())
        {
            this.Close();
            return;
        }
        this.m_ivMainBoxItem.SetTexture(NrTSingleton <ItemManager> .Instance.GetItemTexture(this.m_CompleteItem.m_nItemUnique));
        string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_CompleteItem.m_nItemUnique);

        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("572"),
            "Count",
            this.m_nCompleteItemNum
        });

        this.m_laSelectItemName.SetText(itemNameByItemUnique);
        this.m_laSelectItemCount.SetText(empty);
        ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(this.m_CompleteItem, null, false, false, G_ID.NONE);
        int num = 10;

        if (array.Length > 0)
        {
            if (array.Length > 2)
            {
                array[1].m_OptionName  = "\n" + array[1].m_OptionName;
                array[1].m_OptionValue = "\n" + array[1].m_OptionValue;
            }
            StringBuilder stringBuilder  = new StringBuilder();
            StringBuilder stringBuilder2 = new StringBuilder();
            for (int i = 0; i < array.Length; i++)
            {
                stringBuilder.Append(array[i].m_OptionName);
                stringBuilder2.Append(array[i].m_OptionValue);
            }
            this.m_flToolTip4.SetFlashLabel(stringBuilder.ToString());
            this.m_flToolTip5.SetFlashLabel(stringBuilder2.ToString());
        }
        else
        {
            this.m_flToolTip4.SetFlashLabel(string.Empty);
            this.m_flToolTip5.SetFlashLabel(string.Empty);
            num = 110;
        }
        if (!Protocol_Item.Is_EquipItem(this.m_CompleteItem.m_nItemUnique))
        {
            this.m_flToolTip6.SetLocation(this.m_flToolTip6.GetLocation().x, this.m_flToolTip5.GetLocationY() + this.m_flToolTip5.Height + (float)num);
            ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_CompleteItem.m_nItemUnique);

            if (itemInfo.m_strToolTipTextKey != "0")
            {
                string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey);

                this.m_flToolTip6.SetFlashLabel(textFromItemHelper);
            }
            else
            {
                this.m_flToolTip6.SetFlashLabel(string.Empty);
            }
        }
        this.m_NlbItemListBox.Visible = false;
        this.m_flToolTip1.Hide(true);
        this.m_flToolTip2.Hide(true);
        this.m_flToolTip3.Hide(true);
        this.m_btSlide1.Hide(true);
        this.m_btSlide2.Hide(true);
        this.m_dwSlideBG1.Hide(true);
        this.m_dwSlideBG2.Hide(true);
        this.m_laSelectItemName.Hide(false);
        this.m_flToolTip4.Hide(false);
        this.m_flToolTip5.Hide(false);
        this.m_flToolTip6.Hide(false);
        if (this.m_BoxitemCount > 0)
        {
            this.m_btUseBoxItem.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2484"));
        }
        else
        {
            this.m_btUseBoxItem.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("415"));
        }
        this.m_btUseBoxItem.Hide(false);
        string itemMaterialCode = NrTSingleton <ItemManager> .Instance.GetItemMaterialCode(this.m_CompleteItem.m_nItemUnique);

        if (!string.IsNullOrEmpty(itemMaterialCode))
        {
            TsAudioManager.Container.RequestAudioClip("UI_ITEM", itemMaterialCode, "SELECT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        }
        TsAudioManager.Container.RequestAudioClip("UI_SFX", "ETC", "ROULETTE_POP", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
    }
    public void SetItemData(ITEM pItem, ItemBoxContinue_Dlg.SHOW_TYPE type = ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_RANDOMBOX)
    {
        this.m_MainBoxItem = NkUserInventory.instance.GetFirstItemByUnique(pItem.m_nItemUnique);
        if (this.m_MainBoxItem == null)
        {
            this.Close();
            return;
        }
        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_MainBoxItem.m_nItemUnique);

        if (itemInfo == null)
        {
            return;
        }
        this.m_eShowType = type;
        if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_RANDOMBOX)
        {
            this.SetItemRandomBox();
        }
        else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_GOLDBAR)
        {
            this.SetItemGoldBar();
        }
        else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_EXCHANGE)
        {
            this.SetItemExchage();
        }
        else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_TICKET)
        {
            this.SetItemTicket();
        }
        else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_BATTLESPEED)
        {
            this.SetItemBattleSpeed();
        }
        this.m_itItemTex.SetItemTexture(this.m_MainBoxItem);
        this.m_lbItemTitle.SetText(NrTSingleton <ItemManager> .Instance.GetName(this.m_MainBoxItem));
        this.m_lbItemTypeName.SetText(NrTSingleton <ItemManager> .Instance.GetItemTypeName((eITEM_TYPE)itemInfo.m_nItemType));
        ItemOption_Text[] array = ItemTooltipDlg.Get_Item_Info(this.m_MainBoxItem, null, false, true, G_ID.NONE);
        int num = 0;

        if (array.Length > 0)
        {
            if (array[0].m_MainOption)
            {
                this.m_lbMainOption.Text = array[0].m_OptionName;
                this.m_flMainValue.SetFlashLabel(array[0].m_OptionValue);
                num++;
            }
            else
            {
                this.m_lbMainOption.Text = string.Empty;
                this.m_flMainValue.SetFlashLabel(string.Empty);
            }
        }
        StringBuilder stringBuilder  = new StringBuilder();
        StringBuilder stringBuilder2 = new StringBuilder();

        if (array.Length > num)
        {
            for (int i = num; i < array.Length; i++)
            {
                stringBuilder.Append(array[i].m_OptionName);
                stringBuilder2.Append(array[i].m_OptionValue);
            }
        }
        this.m_lbSubOption.SetFlashLabel(stringBuilder.ToString());
        this.m_flSubValue.SetFlashLabel(stringBuilder2.ToString());
        this.m_lbText.SetLocation(this.m_lbText.GetLocation().x, this.m_lbSubOption.GetLocationY() + this.m_lbSubOption.Height + 10f);
        if (itemInfo.m_strToolTipTextKey != "0")
        {
            string textFromItemHelper = NrTSingleton <NrTextMgr> .Instance.GetTextFromItemHelper(itemInfo.m_strToolTipTextKey);

            this.m_lbText.SetFlashLabel(textFromItemHelper);
        }
        float num2 = this.m_lbText.GetLocationY() + this.m_lbText.Height + 14f;

        this.m_txLine.SetLocationY(num2);
        num2 += 14f;
        this.m_ItemOpenValue_Add.SetLocationY(num2);
        this.m_ItemOpenValue_Minus.SetLocationY(num2);
        this.m_ItemOpenValueSlider.SetLocationY(num2 + 24f);
        this.m_ItemOpenValue_textBG.SetLocationY(num2 + 7f);
        this.m_ItemOpenValue_Button.SetLocationY(num2 + 7f);
        this.m_lbItemOpenValue_Text.SetLocationY(num2 + 7f);
        this.m_ItemOpenValueSliderBG.SetLocationY(num2 + 19f);
        num2 = num2 + this.m_ItemOpenValue_Minus.GetSize().y + 14f;
        this.m_btClose.SetLocationY(num2 + 14f);
        this.m_btAllUse.SetLocationY(num2 + 14f);
        base.SetSize(base.GetSizeX(), num2 + 92f);
        this.m_txBG.SetSize(base.GetSize().x, num2 + 92f);
    }