Inheritance: NotificationObject
Beispiel #1
0
        private void StartNextHandler(map_start_next api)
        {
            CurrentMap  = Staff.Current.MasterData.MapAreas[api.api_maparea_id][api.api_mapinfo_no];
            CurrentNode = new MapNode(api);
            SortieFleet1?.Ships.ForEach(y => y.IgnoreNextCondition());
            SortieFleet2?.Ships.ForEach(y => y.IgnoreNextCondition());
            CurrentBattle = new BattleBase(this);
            if (GetShipEquip != null)
            {
                Staff.Current.Admiral.ShipCount++;
                Staff.Current.Admiral.EquipCount += GetShipEquip.Value;
            }
            GetShipEquip = null;

            var heavydamage = SortieFleet1.Ships.Skip(1).ConcatNotNull(SortieFleet2?.Ships.Skip(1))
                              .Where(x => !x.IsEscaped && x.HP.Current * 4 <= x.HP.Max);

            if (heavydamage.Any())
            {
                NotifierFactories.Current.Show(StringTable.Notification_HeavyDamage_Title,
                                               heavydamage.Aggregate(StringTable.Notification_HeavyDamage_Text, (text, ship) => text += "\n" + ship));
            }
        }
        private void StartNextHandler(map_start_next api)
        {
            CurrentMap = Staff.Current.MasterData.MapAreas[api.api_maparea_id][api.api_mapinfo_no];
            CurrentNode = new MapNode(api);
            SortieFleet1?.Ships.ForEach(y => y.IgnoreNextCondition());
            SortieFleet2?.Ships.ForEach(y => y.IgnoreNextCondition());
            CurrentBattle = new BattleBase(this);
            if (GetShipEquip != null)
            {
                Staff.Current.Admiral.ShipCount++;
                Staff.Current.Admiral.EquipCount += GetShipEquip.Value;
            }
            GetShipEquip = null;

            var heavydamage = SortieFleet1.Ships.Skip(1).ConcatNotNull(SortieFleet2?.Ships.Skip(1))
                .Where(x => !x.IsEscaped && x.HP.Current * 4 <= x.HP.Max);
            if (heavydamage.Any())
                NotifierFactories.Current.Show(StringTable.Notification_HeavyDamage_Title,
                    heavydamage.Aggregate(StringTable.Notification_HeavyDamage_Text, (text, ship) => text += "\n" + ship));
        }