Beispiel #1
0
    /// <summary>
    /// 获取商店代币类型
    /// </summary>
    public static int GetShopCurrencyType(int shopType)
    {
        s_shop_manual_refreshInfo info = GetShopManualRefresh(shopType);

        if (info != null)
        {
            return(info.currency_type);
        }
        return(-1);
    }
Beispiel #2
0
    /// <summary>
    /// 获取商店在第n次刷新所消耗的代币量
    /// </summary>
    public static int GetShopRefreshCost(int shopType, int times)
    {
        s_shop_manual_refreshInfo info = GetShopManualRefresh(shopType);

        if (info != null)
        {
            string costStr   = info.cost;
            int    costCount = NdUtil.GetLength(costStr);
            if (times >= costCount)
            {
                times = costCount - 1;
            }
            return(NdUtil.GetIntValue(costStr, times));
        }
        return(-1);
    }