Beispiel #1
0
        private void refresh()
        {
            Player player = GameLogic.Binder.GameState.Player;

            foreach (KeyValuePair <string, ConfigPromotionEvents.Event> pair in this.m_remotePromotionEvents)
            {
                string key = pair.Key;
                ConfigPromotionEvents.Event data = pair.Value;
                if (!player.PromotionEvents.Instances.ContainsKey(key))
                {
                    CmdStartPromotionEvent.ExecuteStatic(player, key, data);
                }
                else
                {
                    CmdRefreshPromotionEvent.ExecuteStatic(player, key);
                }
            }
            this.m_promotionsToEnd.Clear();
            foreach (KeyValuePair <string, PromotionEventInstance> pair2 in player.PromotionEvents.Instances)
            {
                string str2 = pair2.Key;
                if (!this.m_remotePromotionEvents.ContainsKey(str2))
                {
                    this.m_promotionsToEnd.Add(str2);
                }
            }
            for (int i = 0; i < this.m_promotionsToEnd.Count; i++)
            {
                CmdEndPromotionEvent.ExecuteStatic(player, this.m_promotionsToEnd[i]);
            }
        }
Beispiel #2
0
 protected override void onCleanup()
 {
     this.cleanupHeader();
     this.cleanupMissions();
     this.cleanupSpecialOffer();
     this.m_contentData      = null;
     this.m_contentLastData  = null;
     this.m_contentInstance  = null;
     this.m_isInitialRefresh = false;
     this.m_lastActiveIapPlacementPromotionId = null;
 }
Beispiel #3
0
        protected override void onRefresh()
        {
            Player player = GameLogic.Binder.GameState.Player;

            this.m_contentInstance = player.PromotionEvents.getNewestEventInstance();
            bool flag = this.m_contentInstance != null;

            this.Contents.SetActive(flag);
            if (flag)
            {
                this.m_contentData = this.m_contentInstance.getData();
                this.refreshHeader();
                this.refreshInfo();
                this.refreshMissions();
                this.refreshSpecialOffer();
                this.m_contentLastData  = this.m_contentData;
                this.m_isInitialRefresh = false;
            }
        }
Beispiel #4
0
 public CmdStartPromotionEvent(Player player, string promotionId, ConfigPromotionEvents.Event data)
 {
     this.m_player      = player;
     this.m_promotionId = promotionId;
     this.m_data        = data;
 }