Added Getter Stage/Contest/Split + Bug Fix PursuitManager Extract Passed Started Pursuit.

This commit is contained in:
2025-07-13 04:13:02 +02:00
parent 76a199e95e
commit c2733a2b97
4 changed files with 106 additions and 26 deletions

View File

@ -1,6 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DTFluxDatesUtilities.h"
#include "DTFluxUtilitiesModule.h"
@ -16,18 +15,20 @@ DTFluxDatesUtilities::~DTFluxDatesUtilities()
bool DTFluxDatesUtilities::CompileDateAndTime(const FString& Time, const FString& Date, FDateTime& OutDateTime)
{
if(Time.Len() < 8 && Date.Len() < 10)
if (Time.Len() < 8 && Date.Len() < 10)
{
TArray<FString> ExplodedTime;
Time.ParseIntoArray(ExplodedTime, TEXT(":"));
if(ExplodedTime.Num() != 3 && !ExplodedTime[0].IsNumeric() && !ExplodedTime[1].IsNumeric() & !ExplodedTime[2].IsNumeric())
if (ExplodedTime.Num() != 3 && !ExplodedTime[0].IsNumeric() && !ExplodedTime[1].IsNumeric() & !ExplodedTime[2].
IsNumeric())
{
UE_LOG(logDTFluxUtilities, Error, TEXT("Bad Time Format [%s]. Unable to parse"), *Time);
return false;
}
TArray<FString> ExplodedDate;
Date.ParseIntoArray(ExplodedDate, TEXT("-"));
if(ExplodedDate.Num() != 3 && !ExplodedDate[0].IsNumeric() && !ExplodedDate[1].IsNumeric() && !ExplodedDate[2].IsNumeric() )
if (ExplodedDate.Num() != 3 && !ExplodedDate[0].IsNumeric() && !ExplodedDate[1].IsNumeric() && !ExplodedDate[2].
IsNumeric())
{
UE_LOG(logDTFluxUtilities, Error, TEXT("Bad Date Format [%s]. Unable to parse"), *Date);
return false;
@ -38,7 +39,7 @@ bool DTFluxDatesUtilities::CompileDateAndTime(const FString& Time, const FString
int32 Day = FCString::Atoi(*ExplodedDate[2]);
int32 Month = FCString::Atoi(*ExplodedDate[1]);
int32 Year = FCString::Atoi(*ExplodedDate[0]);
if(FDateTime::Validate(Year, Month, Day, Hours, Minutes, Seconds, 0))
if (FDateTime::Validate(Year, Month, Day, Hours, Minutes, Seconds, 0))
{
OutDateTime = FDateTime(Year, Month, Day, Hours, Minutes, Seconds);
return true;