Example #1
0
        public override void Handle(Session Session)
        {
            string            ResponseJson = Session.GetResponseBodyAsString();
            EventListDungeons result       = JsonConvert.DeserializeObject <EventListDungeons>(ResponseJson);

            lock (FFRKProxy.Instance.Cache.SyncRoot)
            {
                foreach (DataDungeon dungeon in result.Dungeons)
                {
                    DataCache.Dungeons.Key key = new DataCache.Dungeons.Key {
                        DungeonId = dungeon.Id
                    };
                    DataCache.Dungeons.Data data = null;
                    if (!FFRKProxy.Instance.Cache.Dungeons.TryGetValue(key, out data))
                    {
                        data = new DataCache.Dungeons.Data
                        {
                            Difficulty = dungeon.Difficulty,
                            Name       = dungeon.Name,
                            Series     = dungeon.SeriesId,
                            Type       = dungeon.Type,
                            WorldId    = dungeon.WorldId
                        };
                        FFRKProxy.Instance.Cache.Dungeons.Update(key, data);
                    }
                }
            }

            FFRKProxy.Instance.Database.BeginExecuteRequest(new DbOpRecordDungeonList(result));
            FFRKProxy.Instance.RaiseListDungeons(result);
        }
Example #2
0
 internal void RaiseListDungeons(EventListDungeons dungeons)
 {
     if (OnListDungeons != null)
     {
         OnListDungeons(dungeons);
     }
 }
Example #3
0
        public override void Handle(Session Session)
        {
            EventListDungeons dungeons = JsonConvert.DeserializeObject <EventListDungeons>(Session.GetResponseBodyAsString());

            lock (FFRKProxy.Instance.Cache.SyncRoot)
            {
                foreach (DataDungeon dungeon in dungeons.Dungeons)
                {
                    Key key = new Key()
                    {
                        DungeonId = dungeon.Id
                    };
                    Data data = (Data)null;
                    if (!FFRKProxy.Instance.Cache.Dungeons.TryGetValue(key, out data))
                    {
                        Data v = new Data()
                        {
                            Difficulty = dungeon.Difficulty,
                            Name       = dungeon.Name,
                            Series     = dungeon.SeriesId,
                            Type       = dungeon.Type,
                            WorldId    = dungeon.WorldId
                        };
                        FFRKProxy.Instance.Cache.Dungeons.Update(key, v);
                    }
                }
            }
            FFRKProxy.Instance.RaiseListDungeons(dungeons);
        }
Example #4
0
 void FFRKProxy_OnListDungeons(EventListDungeons dungeons)
 {
     this.BeginInvoke((Action)(() => {
         PopulateActiveDungeonListView(null);
         PopulateMasteryConditionListView(null);
         BeginPopulateAllDropsListView(null);
     }));
 }
Example #5
0
 internal void RaiseListDungeons(EventListDungeons dungeons)
 {
     if (this.OnListDungeons == null)
     {
         return;
     }
     this.OnListDungeons(dungeons);
 }
Example #6
0
 void FFRKProxy_OnListDungeons(EventListDungeons dungeons)
 {
     this.BeginInvoke((Action)(() =>
     {
         //PopulateActiveBattleListView(null);
         BeginPopulateAllDropsListView(null);
         PopulateDropInfoListView(null);
         PopulateEnemyInfoListView(null);
     }));
 }
Example #7
0
 void FFRKProxy_OnListDungeons(EventListDungeons dungeons)
 {
     this.BeginInvoke((Action)(() => { PopulateActiveBattleListView(null); }));
 }
 void FFRKProxy_OnListDungeons(EventListDungeons dungeons)
 {
     this.BeginInvoke((Action)(() =>
     {
         //PopulateActiveBattleListView(null);
         BeginPopulateAllDropsListView(null);
         PopulateDropInfoListView(null);
         PopulateEnemyInfoListView(null);
     }));
 }
 private void FFRKProxy_OnListDungeons(EventListDungeons dungeons) => this.BeginInvoke((Action)(() =>
 {
     this.PopulateActiveDungeonListView((EventListBattles)null);
     this.PopulateMasteryConditionListView((EventListBattles)null);
     this.BeginPopulateAllDropsListView((EventListBattles)null);
 }));
Example #10
0
 internal void RaiseListDungeons(EventListDungeons dungeons)
 {
     if (OnListDungeons != null) OnListDungeons(dungeons);
 }
Example #11
0
 public DbOpRecordDungeonList(EventListDungeons dungeons)
 {
     mDungeonList = dungeons;
 }
 public DbOpRecordDungeonList(EventListDungeons dungeons)
 {
     mDungeonList = dungeons;
 }
Example #13
0
 public DbOpRecordDungeonList(EventListDungeons dungeons) => this.mDungeonList = dungeons;
 private void FFRKProxy_OnListDungeons(EventListDungeons dungeons) => this.BeginInvoke((Action)(() =>
 {
     this.BeginPopulateAllDropsListView((EventBattleInitiated)null);
     this.PopulateDropInfoListView((EventBattleInitiated)null);
     this.PopulateEnemyInfoListView((EventBattleInitiated)null);
 }));
Example #15
0
 void FFRKProxy_OnListDungeons(EventListDungeons dungeons)
 {
     this.BeginInvoke((Action)(() => { PopulateActiveBattleListView(null); }));
 }
 void FFRKProxy_OnListDungeons(EventListDungeons dungeons)
 {
     this.BeginInvoke((Action)(() => {
         PopulateActiveDungeonListView(null);
         PopulateMasteryConditionListView(null);
         BeginPopulateAllDropsListView(null);
     }));
 }