General Blueprint utilities Functions + First Implementation of Pursuit Logic
This commit is contained in:
@ -207,6 +207,16 @@ void UDTFluxCoreSubsystem::RequestAllSplitRankingOfContest(int InContestId, int
|
||||
// TODO Implement this
|
||||
}
|
||||
|
||||
FDTFluxStageRankings UDTFluxCoreSubsystem::GetStageRankings(FDTFluxStageKey StageKey)
|
||||
{
|
||||
if(DataStorage->StageRankings.Contains(StageKey))
|
||||
{
|
||||
return DataStorage->StageRankings[StageKey];
|
||||
}
|
||||
UE_LOG(logDTFluxCoreSubsystem, Warning, TEXT("Cannot find StageRankings for key [%s]"), *StageKey.GetDisplayName());
|
||||
return FDTFluxStageRankings();
|
||||
}
|
||||
|
||||
void UDTFluxCoreSubsystem::RequestAllSplitRankingOfStage(int InContestId, int InStageId, int InSplitId)
|
||||
{
|
||||
// TODO Implement this
|
||||
@ -216,3 +226,42 @@ void UDTFluxCoreSubsystem::RefreshStorage()
|
||||
{
|
||||
// TODO Implement this
|
||||
}
|
||||
|
||||
TArray<int> UDTFluxCoreSubsystem::GetCurrentContestsId()
|
||||
{
|
||||
return GetContestsIdForTime(FDateTime::Now());
|
||||
}
|
||||
|
||||
TArray<FDTFluxContest> UDTFluxCoreSubsystem::GetCurrentContests()
|
||||
{
|
||||
return GetContestsForTime(FDateTime::Now());
|
||||
}
|
||||
|
||||
TArray<int> UDTFluxCoreSubsystem::GetContestsIdForTime(const FDateTime Time)
|
||||
{
|
||||
TArray<int> Contests;
|
||||
for(const auto& Pair : DataStorage->Contests)
|
||||
{
|
||||
FDTFluxContest Contest = Pair.Value;
|
||||
int ContestId = Contest.ContestId;
|
||||
if(Contest.Date < Time && Contest.EndTime > Time)
|
||||
{
|
||||
Contests.Add(ContestId);
|
||||
}
|
||||
}
|
||||
return Contests;
|
||||
}
|
||||
TArray<FDTFluxContest> UDTFluxCoreSubsystem::GetContestsForTime(const FDateTime Time)
|
||||
{
|
||||
TArray<FDTFluxContest> Contests;
|
||||
for(const auto& Pair : DataStorage->Contests)
|
||||
{
|
||||
FDTFluxContest Contest = Pair.Value;
|
||||
int ContestId = Contest.ContestId;
|
||||
if(Contest.Date < Time && Contest.EndTime > Time)
|
||||
{
|
||||
Contests.Add(Contest);
|
||||
}
|
||||
}
|
||||
return Contests;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user