Esempio n. 1
0
 private BattleCounter()
 {
     Staff.API("api_req_sortie/battleresult")
     .Subscribe((Session x) => Increase());
     Staff.API("api_req_combined_battle/battleresult")
     .Subscribe((Session x) => Increase());
 }
Esempio n. 2
0
        public BattleDetailLogger()
        {
            Directory.CreateDirectory(@"logs\battlelog");
            Staff.API("api_req_map/start").Subscribe(x => AddApi("startnext", x));
            Staff.API("api_req_map/next").Subscribe(x => AddApi("startnext", x));
            Staff.API("api_req_sortie/battleresult").Subscribe(x => AddApi("battleresult", x));
            Staff.API("api_req_combined_battle/battleresult").Subscribe(x => AddApi("battleresult", x));
            Staff.API("api_req_sortie/battle").Subscribe(x => AddApi("battle", x));
            Staff.API("api_req_battle_midnight/battle").Subscribe(x => AddApi("nightbattle", x));
            Staff.API("api_req_battle_midnight/sp_midnight").Subscribe(x => AddApi("battle", x));
            //Staff.API("api_req_practice/battle").Subscribe(x => AddApi("battle", x));
            //Staff.API("api_req_practice/midnight_battle").Subscribe(x => AddApi("nightbattle", x));
            Staff.API("api_req_sortie/airbattle").Subscribe(x => AddApi("battle", x));
            Staff.API("api_req_sortie/ld_airbattle").Subscribe(x => AddApi("battle", x));
            Staff.API("api_req_combined_battle/airbattle").Subscribe(x => AddApi("battle", x));
            Staff.API("api_req_combined_battle/battle").Subscribe(x => AddApi("battle", x));
            Staff.API("api_req_combined_battle/midnight_battle").Subscribe(x => AddApi("nightbattle", x));
            Staff.API("api_req_combined_battle/sp_midnight").Subscribe(x => AddApi("battle", x));
            Staff.API("api_req_combined_battle/battle_water").Subscribe(x => AddApi("battle", x));
            Staff.API("api_req_combined_battle/ld_airbattle").Subscribe(x => AddApi("battle", x));
            var dir = new DirectoryInfo(@"logs\battlelog");

            foreach (var file in dir.GetFiles("*.log"))
            {
                date = DateTime.Parse(Path.GetFileNameWithoutExtension(file.Name));
                if (date != DateTime.UtcNow.Date)
                {
                    CompressFile();
                }
            }
            date = DateTime.UtcNow.Date;
        }
Esempio n. 3
0
 private BattleSRankCounter()
 {
     Staff.API("api_req_sortie/battleresult")
     .Where <sortie_battleresult>(x => x.api_win_rank == "S")
     .Subscribe((x) => Increase());
     Staff.API("api_req_combined_battle/battleresult")
     .Where <sortie_battleresult>(x => x.api_win_rank == "S")
     .Subscribe((x) => Increase());
 }
Esempio n. 4
0
 private BattleWinCounter()
 {
     Staff.API("api_req_sortie/battleresult")
     .Where <sortie_battleresult>(x => ConstData.RanksWin.Contains(x.api_win_rank))
     .Subscribe((x) => Increase());
     Staff.API("api_req_combined_battle/battleresult")
     .Where <sortie_battleresult>(x => ConstData.RanksWin.Contains(x.api_win_rank))
     .Subscribe((x) => Increase());
 }
Esempio n. 5
0
 private RawApiViewModel()
 {
     Staff.API("").Subscribe(AddSession);
 }
Esempio n. 6
0
 private RankingViewModel()
 {
     Load();
     Staff.API("api_req_ranking/").Subscribe <ranking_getlist>(RankingListHandler);
     Staff.Current.Admiral.PropertyChanged += OnExpChanged;
 }
Esempio n. 7
0
 public BattleManager()
 {
     Staff.API("api_port/port").Subscribe((Fiddler.Session x) =>
     {
         InSortie    = false;
         CurrentMap  = null;
         CurrentNode = null;
         if (SortieFleet1 != null)
         {
             SortieFleet1.InSortie = false;
             foreach (var ship in SortieFleet1.Ships)
             {
                 ship.IsEscaped = false;
             }
         }
         if (SortieFleet2 != null)
         {
             SortieFleet2.InSortie = false;
             foreach (var ship in SortieFleet2.Ships)
             {
                 ship.IsEscaped = false;
             }
         }
         SortieFleet1     = null;
         SortieFleet2     = null;
         CurrentBattle    = null;
         GetShipEquip     = null;
         CurrentFleetType = null;
         lastescapeinfo   = null;
     });
     Staff.API("api_req_map/next").Subscribe <map_start_next>(StartNextHandler);
     Staff.API("api_req_sortie/battleresult").Subscribe <sortie_battleresult>(BattleResultHandler);
     Staff.API("api_req_combined_battle/battleresult").Subscribe <sortie_battleresult>(BattleResultHandler);
     Staff.API("api_req_map/start").Subscribe <map_start_next>((req, api) =>
     {
         InSortie              = true;
         SortieFleet1          = Staff.Current.Homeport.Fleets[req.GetInt("api_deck_id")];
         SortieFleet1.InSortie = true;
         CurrentFleetType      = Staff.Current.Homeport.CombinedFleet;
         if (SortieFleet1.Id == 1 && Staff.Current.Homeport.CombinedFleet != CombinedFleetType.None)
         {
             SortieFleet2          = Staff.Current.Homeport.Fleets[2];
             SortieFleet2.InSortie = true;
         }
         Logger.Loggers.MaterialLogger.ForceLog = true;
         StartNextHandler(api);
     });
     Staff.API("api_req_sortie/battle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_battle_midnight/battle").Subscribe <sortie_battle>(NightBattle);
     Staff.API("api_req_battle_midnight/sp_midnight").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_practice/battle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_practice/midnight_battle").Subscribe <sortie_battle>(NightBattle);
     Staff.API("api_req_sortie/airbattle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_sortie/ld_airbattle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_combined_battle/airbattle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_combined_battle/battle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_combined_battle/midnight_battle").Subscribe <sortie_battle>(NightBattle);
     Staff.API("api_req_combined_battle/sp_midnight").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_combined_battle/battle_water").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_combined_battle/ld_airbattle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_combined_battle/goback_port").Subscribe((Fiddler.Session x) =>
     {
         if (lastescapeinfo != null)
         {
             FindShip(lastescapeinfo.api_escape_idx[0]).IsEscaped = true;
             FindShip(lastescapeinfo.api_tow_idx[0]).IsEscaped    = true;
         }
     });
     Staff.API("api_req_combined_battle/ec_battle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_combined_battle/ec_midnight_battle").Subscribe <sortie_battle>(NightBattle);
     Staff.API("api_req_combined_battle/each_battle").Subscribe <sortie_battle>(StartBattle);
     Staff.API("api_req_combined_battle/each_battle_water").Subscribe <sortie_battle>(StartBattle);
 }
Esempio n. 8
0
 private PracticeCounter()
 {
     Staff.API("api_req_practice/battle_result")
     .Subscribe((Session x) => Increase());
 }
Esempio n. 9
0
 private ChargeCounter()
 {
     Staff.API("api_req_hokyu/charge")
     .Subscribe((Session x) => Increase());
 }
Esempio n. 10
0
 private RepairCounter()
 {
     Staff.API("api_req_nyukyo/start")
     .Subscribe((Session x) => Increase());
 }
Esempio n. 11
0
 private SortieCounter()
 {
     Staff.API("api_req_map/start")
     .Subscribe((Session x) => Increase());
 }
Esempio n. 12
0
 private PowerUpCounter()
 {
     Staff.API("api_req_kaisou/powerup")
     .Where <kaisou_powerup>(x => x.api_powerup_flag == 1)
     .Subscribe((x) => Increase());
 }
Esempio n. 13
0
 private ExpeditionTokyoCounter()
 {
     Staff.API("api_req_mission/result")
     .Where <mission_result>(x => x.api_quest_name.Contains("東京急行"))
     .Subscribe((x) => Increase());
 }
Esempio n. 14
0
 private ExpeditionCounter()
 {
     Staff.API("api_req_mission/result")
     .Where <mission_result>(x => x.api_clear_result > 0)
     .Subscribe((x) => Increase());
 }
Esempio n. 15
0
 private ItemDestroyCounter()
 {
     Staff.API("api_req_kousyou/destroyitem2")
     .Subscribe((Session x) => Increase());
 }
Esempio n. 16
0
 private PracticeWinCounter()
 {
     Staff.API("api_req_practice/battle_result")
     .Where <sortie_battleresult>(x => ConstData.RanksWin.Contains(x.api_win_rank))
     .Subscribe((x) => Increase());
 }