Skip to content

Commit

Permalink
Merge pull request #68 from PlayFab/yuehanlin/2.3.5
Browse files Browse the repository at this point in the history
Release OSS PlayFab 2.3.5
  • Loading branch information
yuehanlin authored Jun 14, 2024
2 parents 3a65b08 + d141fc9 commit 68060ab
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
4 changes: 2 additions & 2 deletions OnlineSubsystemPlayFab.uplugin
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"FileVersion" : 3,
"FriendlyName": "Online Subsystem PlayFab Party & Multiplayer",
"Version": 2.34,
"VersionName": "2.3.4",
"Version": 2.35,
"VersionName": "2.3.5",
"Description": "Support for the PlayFab Party and Multiplayer platform",
"Category": "Networking",
"CreatedBy": "Microsoft Corporation",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The quickstart guide for OnlineSubsystemPlayFab can be found at:

|OSS Version|Release Note|
|-|-|
Latest Version |2.3.4|
Latest Version |2.3.5|
Deprecated Version |2.2.6 and 2.27 may potentially crash the game. **Please upgrade to the latest version to ensure the bug fix is included.**|

## Compatibility
Expand Down
4 changes: 4 additions & 0 deletions Source/Private/OnlineSubsystemPlayFabPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#define SETTING_PLATFORM_MODEL FString(TEXT("PlatformModel"))
#define SETTING_HOST_NICKNAME FName(TEXT("OWNERNICKNAME"))

// Lobby related errors
#define XBOX_E_LOBBY_NOT_JOINABLE 0x89236227
#define XBOX_E_LOBBY_DOES_NOT_EXIST 0x89236226

#define PLATFORM_MODEL_WINGDK FString(TEXT("WINGDK"))
#define PLATFORM_MODEL_XSX FString(TEXT("XSX"))
#define PLATFORM_MODEL_XB1 FString(TEXT("XB1"))
Expand Down
18 changes: 17 additions & 1 deletion Source/Private/PlayFabLobby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,7 @@ void FPlayFabLobby::HandleJoinLobbyCompleted(const PFLobbyJoinLobbyCompletedStat
if (FAILED(StateChange.result))
{
UE_LOG_ONLINE(Error, TEXT("Failed to join lobby. ErrorCode=[0x%08x]"), StateChange.result);
JoinResult = ConvertMultiplayerErrorToJoinSessionResult(StateChange.result);
}
else
{
Expand Down Expand Up @@ -1327,7 +1328,7 @@ void FPlayFabLobby::HandleOnAddMemberCompleted(const PFLobbyAddMemberCompletedSt
}
else
{
Result = EOnJoinSessionCompleteResult::UnknownError;
Result = ConvertMultiplayerErrorToJoinSessionResult(StateChange.result);
UE_LOG_ONLINE(Error, TEXT("FPlayFabLobby::HandleOnAddMemberCompleted failed with ErrorCode=[0x%08x], Error message:%s"), StateChange.result, *GetMultiplayerErrorMessage(StateChange.result));
}
AddLocalPlayerData.RegisterLocalPlayerCompleteDelegate.ExecuteIfBound(*FUniqueNetIdPlayFab::Create(AddLocalPlayerData.PlayerPlatformId), Result);
Expand Down Expand Up @@ -1907,3 +1908,18 @@ const TPair<FString, EOnlineKeyValuePairDataType::Type>* FPlayFabLobby::FindSear
{
return SearchKeyMappingTable.Find(SearchKey);
}

EOnJoinSessionCompleteResult::Type FPlayFabLobby::ConvertMultiplayerErrorToJoinSessionResult(
HRESULT result
)
{
switch (result)
{
case XBOX_E_LOBBY_NOT_JOINABLE:
return EOnJoinSessionCompleteResult::SessionIsFull;
case XBOX_E_LOBBY_DOES_NOT_EXIST:
return EOnJoinSessionCompleteResult::SessionDoesNotExist;
default:
return EOnJoinSessionCompleteResult::UnknownError;
}
}
1 change: 1 addition & 0 deletions Source/Private/PlayFabLobby.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class FPlayFabLobby
FString ComposeLobbySearchQueryFilter(const FSearchParams& SearchParams);
void BuildSearchKeyMappingTable();
bool GetSearchKeyFromSettingMappingTable(const FString& SettingKey, FString& SearchKey, EOnlineKeyValuePairDataType::Type& Type) const;
EOnJoinSessionCompleteResult::Type ConvertMultiplayerErrorToJoinSessionResult(HRESULT result);

// we can eliminate this map if we pass SessionName as asyncIdentifier to lobby calls
TMap<PFLobbyHandle, FName> LobbySessionMap;
Expand Down

0 comments on commit 68060ab

Please sign in to comment.