Exemplo n.º 1
0
    /** 是否有效 */
    public override bool isValid()
    {
        NoticeSample             noticeSample  = getSample();
        EquipRemakeNoticeContent noticeContent = noticeSample.content as EquipRemakeNoticeContent;

        if (noticeContent != null)
        {
            User user = UserManager.Instance.self;
            if (user.getVipLevel() < noticeContent.getShowVipLevel() || user.getUserLevel() < noticeContent.getShowUserLevel())
            {
                return(false);
            }
        }
        activeTime = ActiveTime.getActiveTimeByID(getSample().timeID);
        if (activeTime.getIsFinish())
        {
            return(false);
        }
        object obj = NoticeActiveManagerment.Instance.getActiveInfoBySid(sid);

        if (obj is DoubleRMBInfo)
        {
            DoubleRMBInfo doubleRMBInfo = obj as DoubleRMBInfo;
            if (doubleRMBInfo != null && doubleRMBInfo.state)
            {
                return(false);
            }
        }
        return(ServerTimeKit.getSecondTime() >= activeTime.getPreShowTime());
    }
Exemplo n.º 2
0
 /** 是否有效 */
 public override bool isValid()
 {
     activeTime = ActiveTime.getActiveTimeByID(getSample().timeID);
     if (activeTime.getIsFinish())
     {
         return(false);
     }
     return(ServerTimeKit.getSecondTime() >= activeTime.getPreShowTime());
 }
Exemplo n.º 3
0
    public override bool isValid()
    {
        //显示规则策划定
        activeTime = getActiveTime();
        if (activeTime.getIsFinish())
        {
            return(false);
        }
        int now = ServerTimeKit.getSecondTime();

        return(activeTime.getPreShowTime() < now && now < activeTime.getEndTime());
    }
Exemplo n.º 4
0
 public override bool isValid()
 {
     activeTime = ActiveTime.getActiveTimeByID(getSample().timeID);
     if (activeTime.getIsFinish())
     {
         return(false);
     }
     if (UserManager.Instance.self.getUserLevel() < getSample().levelLimit)
     {
         return(false);
     }
     return(ServerTimeKit.getSecondTime() >= activeTime.getPreShowTime());
 }
Exemplo n.º 5
0
 /// <summary>
 /// 是否有效,请先初始化奖品数据
 /// </summary>
 public bool isValid()
 {
     if (timeID == -1)
     {
         return(false);
     }
     activeTime = ActiveTime.getActiveTimeByID(timeID);
     if (activeTime.getIsFinish())
     {
         return(false);
     }
     return(ServerTimeKit.getSecondTime() >= activeTime.getPreShowTime());
 }
Exemplo n.º 6
0
    public bool IsCanShow(int activeID)
    {
        DoubleRMBInfo info = NoticeActiveManagerment.Instance.getActiveInfoBySid(activeID) as DoubleRMBInfo;
        //if (info.state)
        //return false;
        ActiveTime activeTime = ActiveTime.getActiveTimeByID(NoticeSampleManager.Instance.getNoticeSampleBySid(activeID).timeID);

        int now = ServerTimeKit.getSecondTime();

        if (now > activeTime.getPreShowTime() && now < activeTime.getStartTime() && activeTime.getStartTime() != -1)
        {
            return(true);
        }
        if (activeTime.getIsFinish())
        {
            return(false);
        }
        if (now < activeTime.getPreShowTime() || (now > activeTime.getEndTime() && activeTime.getEndTime() != -1))
        {
            return(false);
        }
        return(true);
    }
Exemplo n.º 7
0
    public override bool isValid()
    {
        TimeInfoSample tsample = TimeConfigManager.Instance.getTimeInfoSampleBySid(getSample().timeID);

        if (activeTime == null)
        {
            activeTime = ActiveTime.getActiveTimeByType(tsample);
            activeTime.initTime(ServerTimeKit.getSecondTime());
        }
        if (activeTime.getIsFinish())
        {
            return(false);
        }
        return(ServerTimeKit.getSecondTime() >= activeTime.getPreShowTime());
    }
Exemplo n.º 8
0
    public override bool isValid()
    {
        //TODO   取时间
//		activeTime = ActiveTime.getActiveTimeByID (getSample ().timeID);
        //这里用兑换商店的持续时间来确定活动的开启
        int[] sids = (getSample().content as SidNoticeContent).sids;        //获取商店的时间sid
        activeTime = ActiveTime.getActiveTimeByID(sids[0]);
        if (activeTime.getIsFinish())
        {
            return(false);
        }
        if (UserManager.Instance.self.getUserLevel() < getSample().levelLimit)
        {
            return(false);
        }
        return(ServerTimeKit.getSecondTime() >= activeTime.getPreShowTime());
    }
Exemplo n.º 9
0
    public override bool isValid()
    {
        NoticeSample sample = NoticeSampleManager.Instance.getNoticeSampleBySid(sid);

        activeTime = ActiveTime.getActiveTimeByID(sample.timeID);
        if (activeTime.getIsFinish())
        {
            return(false);
        }
        if (activeTime.getEndTime() == 0)
        {
            return(true);
        }
        int now = ServerTimeKit.getSecondTime();

        return(now >= activeTime.getPreShowTime() && now <= activeTime.getDetailEndTime());
    }
Exemplo n.º 10
0
    public override bool isValid()
    {
        //bool isShow = false;
        //       System.Collections.Hashtable table = HappySundaySampleManager.Instance.samples;
//        System.DateTime date = TimeKit.getDateTime(ServerTimeKit.getSecondTime());
//        foreach (System.Collections.DictionaryEntry item in table)
//        {
//            HappySundaySample sample = item.Value as HappySundaySample;
//            if (sample.Week == (int)date.DayOfWeek)
//            {
//                isShow = true;
//                break;
//            }
//        }
        //if (!isShow) return false;
        //TODO   取时间
        activeTime = ActiveTime.getActiveTimeByID(getSample().timeID);
        if (activeTime.getIsFinish())
        {
            return(false);
        }
        if (UserManager.Instance.self.getUserLevel() < getSample().levelLimit)
        {
            return(false);
        }
        return(ServerTimeKit.getSecondTime() >= activeTime.getPreShowTime());

        if (activeTime.getStartTime() > ServerTimeKit.getSecondTime())
        {
            return(false);
        }
        int onlineDay = (ServerTimeKit.getSecondTime() - ServerTimeKit.onlineTime) / 3600 / 24;

        if (HappySundaySampleManager.Instance.getDataBySid(1).OnlineDay > onlineDay)
        {
            return(false);
        }
        return(true);
    }