X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=KancolleSniffer%2FLogger.cs;h=6d199bbbe0f9abfa5e0dce1a0f44db5846ca5582;hb=23e525706297a6be74e027bbdb268038163c4fa8;hp=ba4ac4af24812856ea84d20abdcc1c5dece167bf;hpb=9a0615347484405605432aa27106276ae1a0d845;p=kancollesniffer%2FKancolleSniffer.git diff --git a/KancolleSniffer/Logger.cs b/KancolleSniffer/Logger.cs index ba4ac4a..6d199bb 100644 --- a/KancolleSniffer/Logger.cs +++ b/KancolleSniffer/Logger.cs @@ -58,12 +58,12 @@ namespace KancolleSniffer public int MaterialLogInterval { - set { _materialLogInterval = value; } + set => _materialLogInterval = value; } public string OutputDir { - set { _writer = new LogWriter(value).Write; } + set => _writer = new LogWriter(value).Write; } public Logger(ShipInfo ship, ItemInfo item, BattleInfo battle) @@ -132,9 +132,33 @@ namespace KancolleSniffer public void InspectMapNext(dynamic json) { + if ((_logType & LogType.Achivement) != 0 && json.api_get_eo_rate() && (int)json.api_get_eo_rate != 0) + { + _writer("戦果", + _nowFunc().ToString(DateTimeFormat) + "," + _lastExp + "," + (int)json.api_get_eo_rate, + "日付,経験値,EO"); + } _map = json; } + public void InspectClearItemGet(dynamic json) + { + if ((_logType & LogType.Achivement) == 0) + return; + if (json.api_bounus_count == 0) + return; + foreach (var entry in json.api_bounus) + { + if (entry.api_type != 18) + continue; + _writer("戦果", + _nowFunc().ToString(DateTimeFormat) + "," + _lastExp + "," + (int)entry.api_count, + "日付,経験値,EO"); + break; + } + + } + public void InspectBattle(dynamic json) { if (_battle != null) // 通常の夜戦は無視する @@ -198,7 +222,7 @@ namespace KancolleSniffer dropType, dropName, string.Join(",", fships), string.Join(",", eships), - fpower, _battleInfo.EnemyFighterPower, + fpower, _battleInfo.EnemyFighterPower.AirCombat + _battleInfo.EnemyFighterPower.UnknownMark, AirControlLevelName(_battle)), "日付,海域,マス,ボス,ランク,艦隊行動,味方陣形,敵陣形,敵艦隊,ドロップ艦種,ドロップ艦娘," + "味方艦1,味方艦1HP,味方艦2,味方艦2HP,味方艦3,味方艦3HP,味方艦4,味方艦4HP,味方艦5,味方艦5HP,味方艦6,味方艦6HP," + @@ -378,8 +402,8 @@ namespace KancolleSniffer _endOfMonth = _endOfMonth.AddDays(days); } } - _nextDate = new DateTime(now.Year, now.Month, now.Day, 5, 0, 0); - if (now.Hour >= 5) + _nextDate = new DateTime(now.Year, now.Month, now.Day, 2, 0, 0); + if (now.Hour >= 2) _nextDate = _nextDate.AddDays(1); if (_nextDate.Day == 1) _nextDate = _nextDate.AddDays(1);