Modified UDTFluxDataStorage::GetStageRanking Error On Stage
This commit is contained in:
@ -289,16 +289,17 @@ void UDTFluxDataStorage::GetParticipant(const int ContestID, const int Participa
|
|||||||
|
|
||||||
TArray<FDTFluxStageRanking> UDTFluxDataStorage::GetStageRanking(const int ContestId, const int StageId)
|
TArray<FDTFluxStageRanking> UDTFluxDataStorage::GetStageRanking(const int ContestId, const int StageId)
|
||||||
{
|
{
|
||||||
if(Contests.Num() > (ContestId -1))
|
TArray<FDTFluxStageRanking> StageRanking;
|
||||||
|
FDTFluxStage Stage;
|
||||||
|
if(GetStage(ContestId, StageId, Stage))
|
||||||
{
|
{
|
||||||
FDTFluxContest Contest = Contests[ContestId - 1];
|
Stage.StageRanking.Sort([](FDTFluxStageRanking A, FDTFluxStageRanking B)
|
||||||
if(Contest.Stages.Num() > (StageId -1))
|
|
||||||
{
|
{
|
||||||
FDTFluxStage Stage = Contest.Stages[StageId - 1];
|
return A.Rank > B.Rank;
|
||||||
|
});
|
||||||
return Stage.StageRanking;
|
return Stage.StageRanking;
|
||||||
}
|
}
|
||||||
}
|
return StageRanking;
|
||||||
return TArray<FDTFluxStageRanking>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDTFluxDataStorage::AddOrUpdateContest(const FDTFluxContestResponse& ContestResponse)
|
void UDTFluxDataStorage::AddOrUpdateContest(const FDTFluxContestResponse& ContestResponse)
|
||||||
|
|||||||
Reference in New Issue
Block a user