commit error compile John

This commit is contained in:
2025-07-08 20:16:36 +02:00
parent 9bb5e760f2
commit 8f884f6224
2 changed files with 28 additions and 0 deletions

View File

@ -263,6 +263,15 @@ void UDTFluxCoreSubsystem::RequestAllSplitRankingOfStage(int InContestId, int In
// TODO Implement this // TODO Implement this
} }
const FDTFluxParticipant UDTFluxCoreSubsystem::GetParticipant(int InBib)
{
if (DataStorage->Participants.Contains(InBib))
{
return DataStorage->Participants[InBib];
}
return FDTFluxParticipant();
}
void UDTFluxCoreSubsystem::RefreshStorage() void UDTFluxCoreSubsystem::RefreshStorage()
{ {
// TODO Implement this // TODO Implement this
@ -293,6 +302,20 @@ TArray<int> UDTFluxCoreSubsystem::GetContestsIdForTime(const FDateTime Time)
return Contests; return Contests;
} }
bool UDTFluxCoreSubsystem::GetContestForId(const int Id, FDTFluxContest& OutContest)
{
for (auto KeyPair : DataStorage->Contests)
{
if (KeyPair.Value.ContestId == Id)
{
OutContest = KeyPair.Value;
return true;
}
}
UE_LOG(logDTFluxCoreSubsystem, Warning, TEXT("Cannot find Contest for Id [%i]"), Id);
return false;
}
TArray<FDTFluxContest> UDTFluxCoreSubsystem::GetContestsForTime(const FDateTime Time) TArray<FDTFluxContest> UDTFluxCoreSubsystem::GetContestsForTime(const FDateTime Time)
{ {
TArray<FDTFluxContest> Contests; TArray<FDTFluxContest> Contests;

View File

@ -85,6 +85,9 @@ public:
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem") UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")
void RequestAllSplitRankingOfStage(int InContestId, int InStageId, int InSplitId); void RequestAllSplitRankingOfStage(int InContestId, int InStageId, int InSplitId);
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")
const FDTFluxParticipant GetParticipant(int InBib);
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem") UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")
void RefreshStorage(); void RefreshStorage();
@ -95,6 +98,8 @@ public:
UFUNCTION() UFUNCTION()
TArray<int> GetContestsIdForTime(const FDateTime Time); TArray<int> GetContestsIdForTime(const FDateTime Time);
UFUNCTION() UFUNCTION()
bool GetContestForId(const int Id, FDTFluxContest& OutContest);
UFUNCTION()
TArray<FDTFluxContest> GetContestsForTime(const FDateTime Time); TArray<FDTFluxContest> GetContestsForTime(const FDateTime Time);
UFUNCTION() UFUNCTION()