private void UpdateFleetsByStartNext(map_start_next startNext, string api_deck_id = null)
        {
            this.UpdatedTime = DateTimeOffset.Now;
            this.Name = "次マス情報";

            this.BattleSituation = BattleSituation.なし;
            this.FriendAirSupremacy = AirSupremacy.航空戦なし;
            if (this.FirstFleet != null) this.FirstFleet.Formation = Formation.なし;
            this.Enemies = this.provider.GetNextEnemyFleet(startNext);

            if (api_deck_id != null) this.CurrentDeckId = int.Parse(api_deck_id);
            if (this.CurrentDeckId < 1) return;

            this.UpdateFriendFleets(this.CurrentDeckId);
        }
 private void Update(map_start_next startNext)
 {
     this.provider.UpdateMapData(startNext);
 }
        internal MapCellInfo(map_start_next data)
        {
            this.MapId = new MapId(data.api_maparea_id, data.api_mapinfo_no);
            this.Id = data.api_no;
            this.Type = data.GetCellType();

            var getLostItems = new List<GetLostItem>();
            if (data.api_itemget != null)
            {
                getLostItems.AddRange(data.api_itemget.Select(item => new GetLostItem(item)));
            }
            if (data.api_itemget_eo_comment != null)
            {
                getLostItems.Add(data.api_itemget_eo_comment);
            }
            if (data.api_itemget_eo_result != null)
            {
                getLostItems.Add(data.api_itemget_eo_result);
            }
            if (data.api_happening != null)
            {
                getLostItems.Add(data.api_happening);
            }

            this.GetLostItems = getLostItems;

            var info = Master.Current.MapAreas[data.api_maparea_id][data.api_mapinfo_no];
            var cell = info[data.api_no];

            if (cell != null)
            {
                var rank = info.Rank;
                this.KnownEnemies = EnemyDataProvider.Current
                    .GetMapEnemiesNew()
                    .GetOrAddNew(info)
                    .GetOrAddNew(cell).Values
                    .Where(f => f.Rank?.Contains(rank) ?? false)
                    .ToArray();
            }
            else
            {
                this.KnownEnemies = new BattleFleet[0];
            }

            if (this.KnownEnemies.Length > 0)
            {
                this.EnemyName = this.KnownEnemies[0].Name;
            }
        }
Example #4
0
        private void UpdateFleetsByStartNext(map_start_next startNext, string api_deck_id = null)
        {
            this.Clear();

            if (api_deck_id != null) this.CurrentDeckId = int.Parse(api_deck_id);
            if (this.CurrentDeckId < 1) return;

            this.UpdateFriendFleets(this.CurrentDeckId);
        }