public static void Info(long memberNo, long userNo, long characterNo, HistoryLogAction action, byte reason, int param1, int param2, string param3, string param4) { using (var context = new Lobby.Models.LogContext(memberNo)) { try { context.history_log.Add(new Lobby.Models.HistoryLog() { user_no = userNo, character_no = characterNo, action = (byte)action, reason = reason, param1 = param1, param2 = param2, param3 = param3, param4 = param4, submit_time = DateTime.UtcNow, }); context.SaveChangesAsync().ConfigureAwait(false); } catch (Exception e) { Log.Error($"{e.ToString()}"); } } }
public static void Info(ServerCommon.GameResult result, int win_medal, int lose_medal, int draw_medal, int mvp_medal, int rankup_medal) { using (var context = new Lobby.Models.LogContext(0)) { try { context.match_log.Add(new Lobby.Models.MatchLog() { match_id = result.match_id, map_id = result.statistics.map_id, leave_player = result.statistics.leave_player, result = result.is_draw?1:0, clear = result.statistics.clear, fall_death = result.statistics.fall_death, attacked_death = result.statistics.attacked_death, train_death = result.statistics.train_death, other_death = result.statistics.other_death, normal_item = result.statistics.normal_item, tactic_item = result.statistics.tactic_item, play_time = result.statistics.play_time, win_medal = win_medal, lose_medal = lose_medal, draw_medal = draw_medal, mvp_medal = mvp_medal, rankup_medal = rankup_medal, submit_time = DateTime.UtcNow, }); context.SaveChangesAsync().ConfigureAwait(false); } catch (Exception e) { Log.Error($"{e.ToString()}"); } } }