Example #1
0
    public void RefreshInfo()
    {
        this.InitControl();
        this.m_nlbSellList.Clear();
        long num  = 1L;
        int  num2 = 0;

        for (int i = 0; i < this.m_MerchantItemList.Count; i++)
        {
            long iAtbFlag = num << (int)this.m_MerchantItemList[i].i16SellType;
            if (!NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IsAtbAgitMerchantBuyItemFlag(iAtbFlag))
            {
                this.MakeMerchantItem(this.m_MerchantItemList[i]);
                num2++;
            }
        }
        this.m_nlbSellList.RepositionItems();
        if (num2 == 0)
        {
            this.m_SoldOut.Visible = true;
        }
        else
        {
            this.m_SoldOut.Visible = false;
        }
        this.m_SelectInfo = null;
    }
Example #2
0
    public void ClickSellList(IUIObject obj)
    {
        if (this.m_nlbSellList.GetSelectItem() == null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("227"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        UIListItemContainer selectItem = this.m_nlbSellList.GetSelectItem();

        if (selectItem == null)
        {
            return;
        }
        if (selectItem.Data == null)
        {
            return;
        }
        AGIT_MERCHANT_SUB_INFO aGIT_MERCHANT_SUB_INFO = (AGIT_MERCHANT_SUB_INFO)selectItem.Data;

        if (aGIT_MERCHANT_SUB_INFO == null)
        {
            return;
        }
        this.SelectMerchantItem(aGIT_MERCHANT_SUB_INFO);
    }
Example #3
0
    public void MakeMerchantItem(AGIT_MERCHANT_SUB_INFO Data)
    {
        NewListItem newListItem = new NewListItem(this.m_nlbSellList.ColumnNum, true, string.Empty);

        newListItem.SetListItemData(1, NrTSingleton <ItemManager> .Instance.GetItemTexture(Data.i32ItemUnique), null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1697"),
            "itemname",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(Data.i32ItemUnique),
            "count",
            Data.i32ItemNum
        });

        newListItem.SetListItemData(2, this.m_strText, null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("411"),
            "count",
            Data.i32PriceHearts
        });

        newListItem.SetListItemData(3, Data.i32PriceHearts.ToString(), null, null, null);
        newListItem.Data = Data;
        this.m_nlbSellList.Add(newListItem);
    }
Example #4
0
    public void SelectMerchantItem(AGIT_MERCHANT_SUB_INFO MerchantInfo)
    {
        if (MerchantInfo == null)
        {
            return;
        }
        this.m_SelectInfo = MerchantInfo;
        ITEM iTEM = new ITEM();

        iTEM.m_nItemUnique = MerchantInfo.i32ItemUnique;
        iTEM.m_nItemNum    = MerchantInfo.i32ItemNum;
        this.m_itSelectItem.SetItemTexture(iTEM);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2544"),
            "itemname",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(MerchantInfo.i32ItemUnique),
            "count",
            MerchantInfo.i32ItemNum
        });

        this.m_lbEquip.SetText(this.m_strText);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1803"),
            "itemname",
            NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(70000)
        });

        this.m_lbItemName.SetText(this.m_strText);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2272"),
            "count1",
            MerchantInfo.i32PriceHearts,
            "count2",
            NkUserInventory.GetInstance().Get_First_ItemCnt(70000)
        });

        this.m_lbItemNum.SetText(this.m_strText);
    }
Example #5
0
 public void AddMerchantItem(AGIT_MERCHANT_SUB_INFO Data)
 {
     this.m_MerchantItemList.Add(Data);
 }