Пример #1
0
    /// <summary>
    /// 根据当前时间判断物品是否在上架;
    /// </summary>
    /// <param name="shopT"></param>
    /// <returns></returns>
    public static bool IsShopItemInSaling(ShopTemplate shopT)
    {
        DateTime dt1 = GameUtils.ConvertStringToDateTime(shopT.getOnShelve());
        DateTime dt2 = GameUtils.ConvertStringToDateTime(shopT.getOffShelve());

        if (ObjectSelf.GetInstance().ServerDateTime > dt1 && ObjectSelf.GetInstance().ServerDateTime < dt2)
        {
            return(true);
        }

        return(false);
    }