Lesson 81 - Player Session Struct
This commit is contained in:
@@ -88,7 +88,7 @@ FString UPortalManager::GetUniquePlayerId() const
|
||||
return FString();
|
||||
}
|
||||
|
||||
void UPortalManager::HandleGameSessionStatus(const FString& Status, const FString& SessionId)
|
||||
void UPortalManager::HandleGameSessionStatus(const FString& SessionId, const FString& Status)
|
||||
{
|
||||
|
||||
if (Status.Equals(TEXT("ACTIVE")))
|
||||
@@ -133,15 +133,17 @@ void UPortalManager::TryCreatePlayerSession(const FString& PlayerId, const FStri
|
||||
Request->SetHeader("Content-Type", "application/json");
|
||||
|
||||
TMap<FString, FString> Params = {
|
||||
{TEXT("playerId"), PlayerId},
|
||||
{TEXT("sessionId"), GameSessionId}
|
||||
{TEXT("playerId"), PlayerId },
|
||||
{TEXT("gameSessionId"), GameSessionId }
|
||||
};
|
||||
|
||||
Request->SetContentAsString(SerializeJsonContent(Params));
|
||||
const FString Content = SerializeJsonContent(Params);
|
||||
|
||||
Request->SetContentAsString(Content);
|
||||
Request->ProcessRequest();
|
||||
}
|
||||
|
||||
void UPortalManager::FindPlayerSession_Response(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
|
||||
{
|
||||
|
||||
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Create Player Session Response Received..."));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user