Пример #1
0
        public void UpdateValidLEIs()
        {
            this.ValidLEIs.Clear();
            IDataController dataController = Service.Get <IDataController>();
            CurrentPlayer   player         = Service.Get <CurrentPlayer>();
            int             serverTime     = (int)Service.Get <ServerAPI>().ServerTime;

            Dictionary <string, LimitedEditionItemVO> .ValueCollection all = dataController.GetAll <LimitedEditionItemVO>();
            int num = -1;

            foreach (LimitedEditionItemVO current in all)
            {
                int num2 = current.EndTime - serverTime;
                if (num2 >= 0)
                {
                    if (num == -1 || num2 < num)
                    {
                        num = num2;
                    }
                    int num3 = current.StartTime - serverTime;
                    if (num3 > 0)
                    {
                        if (num == -1 || num3 < num)
                        {
                            num = num3;
                        }
                    }
                    else if (LimitedEditionItemController.IsValidForPlayer(current, player))
                    {
                        this.ValidLEIs.Add(current);
                    }
                }
            }
            if (num != -1 && (long)num < 432000L)
            {
                this.nextUpdateTimer = Service.Get <ViewTimerManager>().CreateViewTimer((float)num, false, new TimerDelegate(this.UpdateValidLEIs), null);
            }
        }
Пример #2
0
 public unsafe static long $Invoke1(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(LimitedEditionItemController.IsValidForPlayer((LimitedEditionItemVO)GCHandledObjects.GCHandleToObject(*args), (CurrentPlayer)GCHandledObjects.GCHandleToObject(args[1]))));
 }