示例#1
0
        public static TrackerTime CalculateCurrentRunWorldRecordRunCheckPointTimeDifference(FightData fightData, CheckPointDataTable checkPointDataTable, int currentPhase)
        {
            TrackerTime currentRunTrackerTime     = new TrackerTime(TimeFormatter.Format(fightData.Duration), false);
            TrackerTime worldRecordRunTrackerTime = (TrackerTime)checkPointDataTable.CheckPointDatas[currentPhase];

            return(currentRunTrackerTime.Difference(worldRecordRunTrackerTime));
        }
示例#2
0
        /*
         * TODO: 시간 차이 확인
         */
        public static TrackerTime CalculateCurrentRunWorldRecordRunClearTimeDifference(FightData fightData, CheckPointDataTable checkPointDataTable)
        {
            TrackerTime currentRunClearTime  = new TrackerTime(TimeFormatter.Format(fightData.Duration), false);
            TrackerTime worldRecordClearTime = checkPointDataTable.WorldRecordClearTime;

            return(currentRunClearTime.Difference(worldRecordClearTime));
        }
示例#3
0
        private TrackerTime CalculateCurrentRunWorldRecordRunTimeDifference()
        {
            TrackerTime currentRunTrackerTime     = new TrackerTime(TimeFormatter.Format(duration));
            TrackerTime worldRecordRunTrackerTime = new TrackerTime(checkPointDataTable.WorldRecordCheckPointTimes[currentPhase]);

            return(currentRunTrackerTime.TimeDifference(worldRecordRunTrackerTime));
        }
示例#4
0
 public void UpdateCurrentRunWorldRecordDifference(int currentPhase, TrackerTime currentRunWorldRecordRunTimeDifference)
 {
     Rows[currentPhase].Cells[TIME_DIFFERENCE_COLUMN].Style = new DataGridViewCellStyle {
         ForeColor = currentRunWorldRecordRunTimeDifference.TextColor
     };
     Rows[currentPhase].Cells[TIME_DIFFERENCE_COLUMN].Value = currentRunWorldRecordRunTimeDifference.ToString();
 }
        public CheckPointDataTable(StreamReader dataFileReader)
        {
            _worldRecordClearTime = FindWorldRecordClearTime(dataFileReader);
            _bossTotalHP          = FindBossTotalHP(dataFileReader);
            _phaseCount           = FindPhaseCount(dataFileReader);

            _checkPointDatas = new List <TrackerData>();
            _checkPointTypes = new List <DataType>();

            SetCheckPointDatas(dataFileReader);
        }
        private void UpdateCurrentRunWorldRecordRunDifferenceToTracker()
        {
            TrackerData checkPointData = checkPointDataTable.CheckPointDatas[currentPhase];

            if (checkPointDataTable.CheckPointTypes[currentPhase] == DataType.kDataTypeTime)
            {
                TrackerTime currentRunWorldRecordRunCheckPointTimeDifference = DifferenceCalculator.CalculateCurrentRunWorldRecordRunCheckPointTimeDifference(fightData, checkPointDataTable, currentPhase);
                speedRunTrackerTable.UpdateCurrentRunWorldRecordDifference(currentPhase, currentRunWorldRecordRunCheckPointTimeDifference);
            }
            else
            {
                TrackerHP currentRunWorldRecordRunCheckPointHPDifference = DifferenceCalculator.CalculateCurrentRunWorldRecordRunCheckPointHPDifference(fightData, checkPointDataTable, currentPhase);
                speedRunTrackerTable.UpdateCurrentRunWorldRecordDifference(currentPhase, currentRunWorldRecordRunCheckPointHPDifference);
            }
        }
        private void SpeedKillTrackerOnCombatEndEventHandler(bool isImport, CombatToggleEventArgs encounterInfo)
        {
            try
            {
                if (IsCleared())
                {
                    TrackerTime currentRunWorldRecordRunClearTimeDifference = DifferenceCalculator.CalculateCurrentRunWorldRecordRunClearTimeDifference(fightData, checkPointDataTable);
                    speedRunTrackerTable.UpdateCurrentRunWorldRecordDifference(currentPhase, currentRunWorldRecordRunClearTimeDifference);
                }
            }
            catch (Exception e)
            {
                System.Console.WriteLine("check");
            }

            currentFightData = null;
            currentPhase     = 0;

            fightDataFactory = null;
            fightData        = null;
        }
示例#8
0
        public void UpdateCheckPointDataCells(CheckPointDataTable checkPointDataTable)
        {
            for (int i = 0; i < checkPointDataTable.PhaseCount - 1; i++)
            {
                if (checkPointDataTable.CheckPointTypes[i] == DataType.kDataTypeTime)
                {
                    TrackerTime checkPointData = (TrackerTime)checkPointDataTable.CheckPointDatas[i];

                    Rows[i].Cells[CHECKPOINT_NAME_COLUMN].Value = checkPointData.CheckPointName;
                    Rows[i].Cells[WORLD_RECORD_COLUMN].Value    = checkPointData.ToString();
                }
                else
                {
                    TrackerHP checkPointData = (TrackerHP)checkPointDataTable.CheckPointDatas[i];

                    Rows[i].Cells[CHECKPOINT_NAME_COLUMN].Value = checkPointData.CheckPointName;
                    Rows[i].Cells[WORLD_RECORD_COLUMN].Value    = checkPointData.ToString();
                }
            }

            Rows[checkPointDataTable.PhaseCount - 1].Cells[CHECKPOINT_NAME_COLUMN].Value = "Clear";
            Rows[checkPointDataTable.PhaseCount - 1].Cells[WORLD_RECORD_COLUMN].Value    = checkPointDataTable.WorldRecordClearTime.ToString();
        }
示例#9
0
 public TrackerTime Difference(TrackerTime comparingLogTime)
 {
     return(new TrackerTime(this.Value - comparingLogTime.Value, true));
 }