private void StartNewMission(string logFilePath) { //Check if MissionEnd is sent if (missionHistory != null && missionHistory.Count > 0) { var existing = missionHistory.FirstOrDefault(data => data is MissionLogEventMissionEnd); if (existing == null) { var endMission = new MissionLogEventMissionEnd(new MissionLogEventHeader(String.Format("T:{0} AType:7", lastTick), lastEventTime)); AddHistory(endMission); actionManager.ProcessAction(endMission); } } Log.WriteInfo("New mission started {0}", logFilePath); missionDateTimePrefix = Re.GetSubString(logFilePath, @"missionReport\((.*)?\)\[0\]\.txt"); if (String.IsNullOrWhiteSpace(missionDateTimePrefix)) { return; } server.ResetMission(); server.CurrentMissionId = GuidUtility.Create(GuidUtility.IsoOidNamespace, String.Concat(server.ServerId, "_", missionDateTimePrefix)).ToString(); MissionStartDateTime = Util.ParseDate(missionDateTimePrefix).ToUniversalTime(); }
/// <summary> /// Mission end. For live events only. Doesn't run on history events /// </summary> /// <param name="data"></param> virtual public void OnMissionEnd(MissionLogEventMissionEnd data) { }