Пример #1
0
        private static TournamentVO GetLiveTournamentForBonus(uint timeToCheck)
        {
            string          planetId       = Service.Get <CurrentPlayer>().PlanetId;
            IDataController dataController = Service.Get <IDataController>();

            foreach (TournamentVO current in dataController.GetAll <TournamentVO>())
            {
                if (TournamentController.IsPlanetaryConflict(current) && current.PlanetId == planetId && TimedEventUtils.IsTimedEventLive(current, timeToCheck))
                {
                    return(current);
                }
            }
            return(null);
        }
Пример #2
0
        public static List <TournamentVO> GetTournamentVOs(TournamentFilter tournamentFilter)
        {
            List <TournamentVO> list           = new List <TournamentVO>();
            IDataController     dataController = Service.Get <IDataController>();

            foreach (TournamentVO current in dataController.GetAll <TournamentVO>())
            {
                if (TournamentController.IsPlanetaryConflict(current))
                {
                    bool flag;
                    switch (tournamentFilter)
                    {
                    case TournamentFilter.Live:
                        flag = TimedEventUtils.IsTimedEventLive(current);
                        break;

                    case TournamentFilter.LiveOrClosing:
                        flag = TimedEventUtils.IsTimedEventLiveOrClosing(current);
                        break;

                    case TournamentFilter.Active:
                        flag = TimedEventUtils.IsTimedEventActive(current);
                        break;

                    case TournamentFilter.All:
                        goto IL_60;

                    default:
                        goto IL_60;
                    }
IL_63:
                    if (flag)
                    {
                        list.Add(current);
                        continue;
                    }
                    continue;
IL_60:
                    flag = true;
                    goto IL_63;
                }
            }
            return(list);
        }
Пример #3
0
 public unsafe static long $Invoke16(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(TournamentController.IsPlanetaryConflict((TournamentVO)GCHandledObjects.GCHandleToObject(*args))));
 }