예제 #1
0
        public bool IsMoreCombat(int plotId)
        {
            var plot = new ShareCacheStruct <PlotInfo>().FindKey(plotId);

            if (plot != null)
            {
                //string key = _userId + plotId;
                //int timesNum = _userTimesList != null && _userTimesList.ContainsKey(key) ? _userTimesList[key] : 0;
                //return timesNum < MaxCombatNum;
                int timesNum = CombatHelper.GetDailyMorePlotNum(_userId, plotId);
                return(timesNum < MaxCombatNum);
            }
            return(false);
        }
예제 #2
0
        public bool IsCombat(int plotId)
        {
            var plot = new ShareCacheStruct <PlotInfo>().FindKey(plotId);

            if (plot != null)
            {
                //todo
                var userPlot = UserPlotHelper.GetUserPlotInfo(_userId, plot.PrePlotID);
                //new PersonalCacheStruct<UserPlot>().FindKey(_userId, plot.PrePlotID);)
                if (userPlot != null && userPlot.PlotStatus == PlotStatus.Completed)
                {
                    //string key = _userId + plotId;
                    //int timesNum = _userTimesList != null && _userTimesList.ContainsKey(key) ? _userTimesList[key] : 0;
                    //return timesNum < MaxCombatNum;
                    int timesNum = CombatHelper.GetDailyMorePlotNum(_userId, plotId);
                    return(timesNum < MaxCombatNum);
                }
            }
            return(false);
        }