//INT GetMoney2(void);
        //INT GetPropertys(void);
        //INT GetAuthorInfo(void);
        //INT GetExplain(void);
        //const char* GetDesc1(void);
        //string GetDesc2(void);
        //INT GetDesc3(void);

        //// 取得强化状态 [9/9/2011 edit by ZL]
        //Item_Enhance GetStrenthState(void);

        //// 取得强化等级 [9/9/2011 edit by ZL]
        //Lua_Item_Strength GetStrenth(void);

        //// 取得装备评分 [9/26/2011 edit by ZL]
        //INT GetItemScoreInfo(void);

        //// 取得装备档次 [9/26/2011 edit by ZL]
        //INT GetItemDangci(void);

        //// 得到装备的品级 [9/26/2011 edit by ZL]
        //INT GetItemPinJi(void);

        //// 得到装备的颜色 [9/26/2011 edit by ZL]
        //INT GetItemColor(void);

        //// 得到装备的五行 [9/26/2011 edit by ZL]
        //INT GetItemWuXing(void);

        //// 得到装备的品级值 [9/26/2011 edit by ZL]
        //Lua_ItemPinJiValue GetItemPinJiValue(void);

        //// 得到镶嵌宝石信息 [9/26/2011 edit by ZL]
        //Lua_ItemGemDescribe GetGemDescribe(int nIndex);

        //// 得到装备的魂印属性 [10/10/2011 edit by ZL]
        //const char*	GetPrintSoulAttribute(void);

        //// 得到当前装备的魂印属性是否激活 [10/10/2011 edit by ZL]
        //INT GetItemSoulActive(void);

        //// 得到装备的魂印类型 [10/10/2011 edit by ZL]
        //INT	GetItemPrintSoulType(void);

        //INT GetDesc5(void);
        //INT GetIconName(void);
        //string GetGemIcon1(void);
        //string GetGemIcon2(void);
        //string GetGemIcon3(void);

        internal string GetTitle()
        {
            if (currAction != null)
            {
                return(currAction.GetName());
            }
            else
            {
                return("");
            }
        }
Esempio n. 2
0
    void UpdateItems(TabMode tab, byte pageindex)
    {
        if (tab == TabMode.TAB_BUY)
        {
            int nTotalNum = UIInfterface.Instance.GetActionNum(ActionNameType.boothItem);
            int maxPage   = nTotalNum / MAX_ITEM_PERPAGE + 1;
            if (nTotalNum % MAX_ITEM_PERPAGE != 0)
            {
                maxPage++;
            }

            if (pageIndex < 1 || pageIndex > maxPage)
            {
                return;
            }

            int nUnit = Interface.NPCShop.Instance.GetShopType("unit");

            int startIndex = (pageIndex - 1) * MAX_ITEM_PERPAGE;

            for (int i = 0; i < MAX_ITEM_PERPAGE; i++)
            {
                CActionItem action = CActionSystem.Instance.EnumAction(i + startIndex, ActionNameType.boothItem);
                if (action == null)
                {
                    continue;
                }
                if (itemList[i] != null)
                {
                    itemList[i].SetActionItemByActionId(action.GetID());
                }

                uint price = Interface.NPCShop.Instance.EnumItemPrice(i);
                if (nUnit == 1)
                {
                    itemPriceCopper[i].Text = price.ToString();
                }

                itemNames[i].Text = action.GetName();
            }

            if (pageIndex < maxPage)
            {
                nextPageBtn.controlIsEnabled = true;
            }
            if (pageIndex > 1)
            {
                prePageBtn.controlIsEnabled = true;
            }
        }
        else if (tab == TabMode.TAB_REDEEM)
        {
            int ntype = Interface.NPCShop.Instance.GetShopType("callback");
            if (ntype <= 0)
            {
                return;
            }
            int nNum  = Interface.NPCShop.Instance.GetCallBackNum();
            int nUnit = Interface.NPCShop.Instance.GetShopType("unit");

            int maxPage = nNum / MAX_ITEM_PERPAGE + 1;
            if (nNum % MAX_ITEM_PERPAGE != 0)
            {
                maxPage++;
            }

            if (pageIndex < 1 || pageIndex > maxPage)
            {
                return;
            }

            int startIndex = (pageIndex - 1) * MAX_ITEM_PERPAGE;
            for (int i = 0; i < MAX_ITEM_PERPAGE; i++)
            {
                CActionItem action = Interface.NPCShop.Instance.EnumCallBackItem(i + startIndex);
                if (action != null)
                {
                    if (itemList[i] != null)
                    {
                        itemList[i].SetActionItemByActionId(action.GetID());
                    }

                    uint price = Interface.NPCShop.Instance.EnumItemSoldPrice(i);
                    if (nUnit == 1)
                    {
                        itemPriceCopper[i].Text = price.ToString();
                    }

                    itemNames[i].Text = action.GetName();
                }
            }
            if (pageIndex < maxPage)
            {
                nextPageBtn.controlIsEnabled = true;
            }
            if (pageIndex > 1)
            {
                prePageBtn.controlIsEnabled = true;
            }
        }
    }