Пример #1
0
    void BuyGoods()
    {
        if (Singleton <ObjManager> .Instance.MainPlayer == null)
        {
            return;
        }

        Tab_VIPShop tabVIPShop = TableManager.GetVIPShopByID(m_ItemID, 0);

        if (tabVIPShop != null)
        {
            int nPlayerVIPLevel = VipData.GetVipLv();
            if (nPlayerVIPLevel < tabVIPShop.BuyLevelReq)
            {
                Singleton <ObjManager> .Instance.MainPlayer.SendNoticMsg(false, "#{2512}");

                return;
            }
        }

        if (YuanBaoShopLogic.Instance() != null)
        {
            YuanBaoShopLogic.Instance().ShowYBShopNumChoose(m_GoodsId, ConvertGoodsTypeToSlotType(m_eItemType), m_ItemID, m_Num, m_CurPrice, m_eDeadlineType, m_Name);
        }
    }
Пример #2
0
    bool IsTabNewGoods(Tab_YuanBaoShop tabYuanBaoShop)
    {
        if (tabYuanBaoShop.TabIndex != (int)m_CurTabIndex)
        {
            return(false);
        }

        if (false == IsGoodsOnSell(tabYuanBaoShop))
        {
            return(false);
        }

        if (m_CurTabIndex == TAB_INDEX.TAB_VIP)
        {
            if (tabYuanBaoShop.ItemType != (int)YuanBaoShopItemLogic.ITEM_TYPE.TYPE_ITEM)
            {
                return(false);
            }

            Tab_VIPShop tabVIPShop = TableManager.GetVIPShopByID(tabYuanBaoShop.ItemID, 0);
            if (tabVIPShop == null)
            {
                return(false);
            }

            int nPlayerVIPLevel = VipData.GetVipLv();

            if (nPlayerVIPLevel < tabVIPShop.ShowLevelReq)
            {
                return(false);
            }
        }

        return(true);
    }