Ejemplo n.º 1
0
    private void SetPoint()
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041"),
            "count",
            ANNUALIZED.Convert(myCharInfo.GetHeroPoint())
        });

        this.m_kHeroPoint.Text = empty;
        empty = string.Empty;
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041"),
            "count",
            ANNUALIZED.Convert(myCharInfo.GetEquipPoint())
        });

        this.m_kEquipPoint.Text = empty;
    }
Ejemplo n.º 2
0
    private void ClickList(IUIObject obj)
    {
        if (this.m_eType == ExchangeItemDlg.TYPE.TYPE_EXCHANGE_TICKET)
        {
            this.m_kHelp.Visible = false;
            UIListItemContainer selectedItem = this.m_kList.SelectedItem;
            if (null == selectedItem)
            {
                return;
            }
            PointTable pointTable = (PointTable)selectedItem.Data;
            if (pointTable == null)
            {
                return;
            }
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo == null)
            {
                return;
            }
            this.m_kSelectItem.SetItemTexture(pointTable.m_nItemUnique);
            this.m_kSelectItem.Data  = pointTable;
            this.m_nSelectItemUnique = pointTable.m_nItemUnique;
            this.m_nSelectItemNum    = 1;
            this.SetPoint();
            if (PointManager.HERO_TICKET == pointTable.m_nItemUnique)
            {
                if (0 < pointTable.m_nBuyPoint)
                {
                    this.m_nHeroLimitTicketNum = (int)Math.Min((long)this.m_nHeroLimitTicketNum, myCharInfo.GetHeroPoint() / (long)pointTable.m_nBuyPoint);
                    this.m_kSellNum.MaxValue   = (long)this.m_nHeroLimitTicketNum;
                }
            }
            else if (0 < pointTable.m_nBuyPoint)
            {
                this.m_nEquipLimitTicketNum = (int)Math.Min((long)this.m_nEquipLimitTicketNum, myCharInfo.GetEquipPoint() / (long)pointTable.m_nBuyPoint);
                this.m_kSellNum.MaxValue    = (long)this.m_nEquipLimitTicketNum;
            }
            if (0L >= this.m_kSellNum.MaxValue)
            {
                this.m_kSell.controlIsEnabled = false;
            }
            else
            {
                this.m_kSell.controlIsEnabled = true;
            }
            this.m_kSellNum.Text        = this.m_nSelectItemNum.ToString();
            this.m_kSelectItemName.Text = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(pointTable.m_nItemUnique);
        }
        else if (this.m_eType == ExchangeItemDlg.TYPE.TYPE_EXCHANGE_ITEM)
        {
            UIListItemContainer selectedItem2 = this.m_kList.SelectedItem;
            if (null == selectedItem2)
            {
                return;
            }
            PointTable pointTable2 = (PointTable)selectedItem2.Data;
            if (pointTable2 == null)
            {
                return;
            }
            if (NrTSingleton <NkCharManager> .Instance.GetMyCharInfo() == null)
            {
                return;
            }
            this.m_kSelectItem.SetItemTexture(pointTable2.m_nItemUnique);
            this.m_kSelectItem.Data  = pointTable2;
            this.m_nSelectItemUnique = pointTable2.m_nItemUnique;
            this.SetPoint();
            this.m_nTicketNum = NkUserInventory.instance.Get_First_ItemCnt(pointTable2.m_nNeedItemUnique);
            if (pointTable2.m_nExchangePoint <= this.m_nTicketNum)
            {
                this.m_nSelectItemNum = 1;
            }
            else
            {
                this.m_nSelectItemNum = 0;
            }
            this.m_kSelectItemName.Text = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(pointTable2.m_nItemUnique);

            this.m_kSellNum.MaxValue = (long)(this.m_nTicketNum / pointTable2.m_nExchangePoint);
            this.m_kSellNum.Text     = this.m_nSelectItemNum.ToString();
            if (0L >= this.m_kSellNum.MaxValue)
            {
                this.m_kSell.controlIsEnabled = false;
            }
            else
            {
                this.m_kSell.controlIsEnabled = true;
            }
            this.m_nUseTicketNum = this.m_nSelectItemNum * pointTable2.m_nExchangePoint;
            this.SetUsetTicketNum();
        }
    }
Ejemplo n.º 3
0
    private void SetPoint()
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041"),
            "count",
            ANNUALIZED.Convert(myCharInfo.GetHeroPoint())
        });

        this.m_kHeroPoint.Text = empty;
        empty = string.Empty;
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041"),
            "count",
            ANNUALIZED.Convert(myCharInfo.GetEquipPoint())
        });

        this.m_kEquipPoint.Text = empty;
        if (this.m_eType == ExchangeItemDlg.TYPE.TYPE_EXCHANGE_TICKET)
        {
            this.m_kName.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2260");

            PointLimitTable pointLimitTable = NrTSingleton <PointManager> .Instance.GetPointLimitTable(myCharInfo.GetLevel());

            if (pointLimitTable == null)
            {
                return;
            }
            PointTable pointTable = (PointTable)this.m_kSelectItem.Data;
            if (pointTable == null)
            {
                return;
            }
            if (pointTable.m_nItemUnique == PointManager.HERO_TICKET)
            {
                this.m_nHeroLimitTicketNum = pointLimitTable.m_nHeroTicketNum - (int)myCharInfo.GetCharDetail(6);
                empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2261"),
                    "count",
                    this.m_nHeroLimitTicketNum
                });

                this.m_kLimitTicketNum.Text = empty;
            }
            else
            {
                this.m_nEquipLimitTicketNum = pointLimitTable.m_nEquipTicketNum - (int)myCharInfo.GetCharDetail(7);
                empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2261"),
                    "count",
                    this.m_nEquipLimitTicketNum
                });

                this.m_kLimitTicketNum.Text = empty;
            }
            this.m_kHelp.Visible = true;
        }
        else
        {
            PointTable pointTable2 = (PointTable)this.m_kSelectItem.Data;
            if (pointTable2 == null)
            {
                return;
            }
            this.m_kName2.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromItem(pointTable2.m_nNeedItemUnique.ToString());
        }
    }