Exemple #1
0
    public static int GetVipMaxTeamCopySceneNum(int sceneid, int nCost)
    {
        if (nCost < 0)
        {
            return(0);
        }

        int nLevel = 0;
        int nLeft  = 0;

        GetVipLevel(nCost, ref nLevel, ref nLeft);
        Tab_VipBook pVipBook = TableManager.GetVipBookByID(nLevel, 0);

        if (pVipBook != null)
        {
            for (int i = 0; i < pVipBook.getTeamSceneIdCount(); ++i)
            {
                if (pVipBook.GetTeamSceneIdbyIndex(i) == sceneid)
                {
                    return(pVipBook.GetBuyTeamSceneCountbyIndex(i));
                }
            }
        }
        return(0);
    }
Exemple #2
0
    /*
     * return 1: single, 2:team,0:valid
     */
    public static int GetBuyCopySceneMode(int sceneid, int nSingle)
    {
        Tab_VipBook pVipBook = TableManager.GetVipBookByID(0, 0);

        if (pVipBook != null)
        {
            if (nSingle == 1)
            {
                return(1);
//                for (int i = 0; i < pVipBook.getSceneIdCount(); i++)
//				{
//                    if (sceneid == pVipBook.GetSceneIdbyIndex(i))
//					{
//                        return 1;
//                    }
//                }
            }
            else
            {
                for (int i = 0; i < pVipBook.getTeamSceneIdCount(); ++i)
                {
                    if (sceneid == pVipBook.GetTeamSceneIdbyIndex(i))
                    {
                        return(2);
                    }
                }
            }
        }
        return(0);
    }
Exemple #3
0
    public static int GetVipTeamCopySceneNum(int sceneid)
    {
//        int nId = GlobeVar.INVALID_ID;

        Tab_VipBook pVipBook = TableManager.GetVipBookByID(GetVipLv(), 0);

        if (pVipBook != null)
        {
            for (int i = 0; i < pVipBook.getTeamSceneIdCount(); ++i)
            {
                if (sceneid == pVipBook.GetTeamSceneIdbyIndex(i))
                {
                    return(GameManager.gameManager.PlayerDataPool.CommonData.GetCommonData(s_nVipTeamCopySceneArray[i]));
                }
            }
        }
        return(GlobeVar.INVALID_ID);
    }