Skip to content

Commit 60f4b21

Browse files
Updated from pipeline, Version : 18.0.0
1 parent b1eaefc commit 60f4b21

34 files changed

+595
-172
lines changed

.variables

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
export DO_UPDATE=true
12
export LEVEL=CRITICAL
23
export REPO_NAME=justice-unreal-sdk-plugin
3-
export WORKDIR=/tmp/pipelines/3121776487/657457776/
4-
export COMMIT_HASH=413076fbe80fa7de5a91e878f8c7f9bc244396c1
5-
export GIT_HASH=413076fbe80fa7de5a91e878f8c7f9bc244396c1
6-
export VERSION=17.0.2
7-
export REVISION_ID=17.0.2
4+
export WORKDIR=/tmp/pipelines/3148225272/662361682/
5+
export COMMIT_HASH=f4d29093cafe70fd6e678753d8363323b1d9f260
6+
export GIT_HASH=f4d29093cafe70fd6e678753d8363323b1d9f260
7+
export VERSION=18.0.0
8+
export REVISION_ID=18.0.0
89
9-
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDE3LjAuMiAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='
10+
export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDE4LjAuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo='

AccelByteUe4Sdk.uplugin

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
3-
"Version": 2,
4-
"VersionName": "17.0.2",
3+
"Version": 3,
4+
"VersionName": "18.0.0",
55
"FriendlyName": "AccelByte Unreal Engine SDK",
66
"Description": "Official AccelByte SDK for Unreal Engine 4",
77
"Category": "Online Platform",

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [18.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/18.0.0%0D17.0.2) (2022-10-10)
6+
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
* Renamed some variables in item info model
11+
* renamed FPresenceStatus to FAccelBytePresenceStatus to resolve conflict
12+
13+
### Features
14+
15+
* adjustment for improve entitlement track log ([e496799](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/e496799a9f6dccd39d4f470f7bba2581802cc411))
16+
* banning by device ID (PS, XBOX) ([270b46a](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/270b46a010cb3385499b7ff8b4901d51658650cf))
17+
* Bruteforce protection upon game login ([676e9dc](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/676e9dcb8142d594e29c271650ce33429632e504))
18+
* expose Get and Update PrivateCustomAttributes ([d05434a](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/d05434ab03fce0a70d397973d24a29d40efa6b3e))
19+
* **HTTP:** adding custom metadata header to HTTP request ([7189399](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/71893991bd024b0db1600fac656c0c8367ae5461))
20+
* **lobby:** add send party notif ([9a685cd](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/9a685cd08a27bb19113725a94b94d35e9c650891))
21+
* **lobby:** support for role based matchmaking ([64e1c66](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/64e1c669492c4f76a83c19b59c7ea892e365a0a8))
22+
* **lobby:** support rejected status on role based matchmaking ([41d704c](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/41d704c35f48faa21d71a912bb30ef80f3af4062))
23+
* update to cover isse When invoke Credentials::GetUserEmailAddress() in AccelByte SDK for UE4 after sign-in, it returns username instead of email address. ([719591d](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/719591d6ee0ec6ee4abc6b80fe8d4df810023960))
24+
25+
26+
### Bug Fixes
27+
28+
* conflicting FPresenceStatus used in both AccelByte SDK and Vivox SDK ([8683789](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/86837896e2071d4258197309007bffdc2856e76e))
29+
* **login:** wrong implementation on get user data on successful login ([50ddfd5](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/50ddfd526066d31f7f7e4a0c1f8b8a2c65ddabf0))
30+
* support get wallet info old workflow ([5a9b40e](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/5a9b40ee40da7a4e96ab6d2cc95d91b133350c11))
31+
* update current user from register and unregister player to session browser ([a1e14b6](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/a1e14b618c98f1b34f587d0484bd87283d7b8bf8))
32+
33+
34+
### Refactors
35+
36+
* change LobbyErrorMessage to static ([6051dc0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/6051dc0903f2253307b6d2b7b126fce7e46fe4e2))
37+
38+
39+
* Merge remote-tracking branch 'remotes/origin/hotfix/17.0.0' into hotfix/resolve-conflict-17.0.0-release-candidate ([8d2e154](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/8d2e154c778c4aebf0ea2ffd66a823cb1af006b0))
40+
541
### [17.0.2](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/17.0.2%0D17.0.1) (2022-10-04)
642

743

Content/CompatibilityMap.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"iam": {
3-
"minVersion": "5.18.0",
4-
"maxVersion": "5.18.0"
3+
"minVersion": "5.19.0",
4+
"maxVersion": "5.19.0"
55
},
66
"agreement": {
7-
"minVersion": "1.23.0",
8-
"maxVersion": "1.23.0"
7+
"minVersion": "1.24.0",
8+
"maxVersion": "1.24.0"
99
},
1010
"basic": {
11-
"minVersion": "2.1.3",
12-
"maxVersion": "2.1.3"
11+
"minVersion": "2.2.0",
12+
"maxVersion": "2.2.0"
1313
},
1414
"platform": {
15-
"minVersion": "4.15.0",
16-
"maxVersion": "4.15.0"
15+
"minVersion": "4.16.0",
16+
"maxVersion": "4.16.0"
1717
},
1818
"social": {
19-
"minVersion": "1.29.6",
20-
"maxVersion": "1.29.6"
19+
"minVersion": "1.30.0",
20+
"maxVersion": "1.30.0"
2121
},
2222
"leaderboard": {
2323
"minVersion": "2.15.8",
@@ -36,23 +36,23 @@
3636
"maxVersion": "2.5.4"
3737
},
3838
"lobby": {
39-
"minVersion": "3.11.9",
40-
"maxVersion": "3.11.9"
39+
"minVersion": "3.11.10",
40+
"maxVersion": "3.11.10"
4141
},
4242
"group": {
43-
"minVersion": "2.11.7",
44-
"maxVersion": "2.11.7"
43+
"minVersion": "2.11.8",
44+
"maxVersion": "2.11.8"
4545
},
4646
"qosm": {
47-
"minVersion": "1.14.7",
48-
"maxVersion": "1.14.7"
47+
"minVersion": "1.14.8",
48+
"maxVersion": "1.14.8"
4949
},
5050
"dsmcontroller": {
51-
"minVersion": "3.8.0",
52-
"maxVersion": "3.8.0"
51+
"minVersion": "3.9.0",
52+
"maxVersion": "3.9.0"
5353
},
5454
"game-telemetry": {
55-
"minVersion": "1.10.0",
56-
"maxVersion": "1.10.0"
55+
"minVersion": "1.11.0",
56+
"maxVersion": "1.11.0"
5757
}
5858
}

Source/AccelByteUe4Sdk/Private/AccelByteUe4SdkModule.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class FAccelByteUe4SdkModule : public IAccelByteUe4SdkModuleInterface
5252
static FVersion GetPluginVersion();
5353
void GetVersionInfo(FString const& Url, TFunction<void(FVersionInfo)> Callback) const;
5454
void CheckServicesCompatibility() const;
55+
void SetDefaultHttpCustomHeader(FString const& Namespace);
5556
};
5657

5758
void FAccelByteUe4SdkModule::StartupModule()
@@ -177,6 +178,7 @@ bool FAccelByteUe4SdkModule::LoadClientSettings(ESettingsEnvironment const Envir
177178

178179
FRegistry::Settings.Reset(Environment);
179180
FRegistry::Credentials.SetClientCredentials(Environment);
181+
SetDefaultHttpCustomHeader(ClientSettings.Namespace);
180182

181183
return bResult;
182184
}
@@ -198,6 +200,7 @@ bool FAccelByteUe4SdkModule::LoadServerSettings(ESettingsEnvironment const Envir
198200

199201
FRegistry::ServerSettings.Reset(Environment);
200202
FRegistry::ServerCredentials.SetClientCredentials(Environment);
203+
SetDefaultHttpCustomHeader(ServerSettings.Namespace);
201204

202205
return bResult;
203206
}
@@ -333,4 +336,14 @@ IAccelByteDataStorage * FAccelByteUe4SdkModule::GetLocalDataStorage()
333336
}
334337
}
335338

339+
void FAccelByteUe4SdkModule::SetDefaultHttpCustomHeader(FString const& Namespace)
340+
{
341+
AccelByte::FHttpRetryScheduler::SetHeaderNamespace(Namespace);
342+
AccelByte::FHttpRetryScheduler::SetHeaderSDKVersion(GetPluginVersion().ToString());
343+
FString ProjectVersion;
344+
GConfig->GetString(TEXT("/Script/EngineSettings.GeneralProjectSettings"), TEXT("ProjectVersion"), ProjectVersion, GGameIni);
345+
AccelByte::FHttpRetryScheduler::SetHeaderGameClientVersion(ProjectVersion);
346+
}
347+
348+
336349
IMPLEMENT_MODULE(FAccelByteUe4SdkModule, AccelByteUe4Sdk)

Source/AccelByteUe4Sdk/Private/Api/AccelByteEntitlementApi.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,18 +237,23 @@ void Entitlement::GetUserEntitlementOwnershipTokenOnly(const TArray<FString>& It
237237
}
238238

239239
void Entitlement::ConsumeUserEntitlement(FString const& EntitlementId, int32 const& UseCount, THandler<FAccelByteModelsEntitlementInfo> const& OnSuccess, FErrorHandler const& OnError,
240-
TArray<FString> Options)
240+
TArray<FString> Options, FString const& RequestId )
241241
{
242242
FReport::Log(FString(__FUNCTION__));
243243

244244
FAccelByteModelsConsumeUserEntitlementRequest ConsumeUserEntitlementRequest;
245245
ConsumeUserEntitlementRequest.UseCount = UseCount;
246246
ConsumeUserEntitlementRequest.Options = Options;
247+
ConsumeUserEntitlementRequest.RequestId = RequestId;
247248

248249
FString Url = FString::Printf(TEXT("%s/public/namespaces/%s/users/%s/entitlements/%s/decrement"), *SettingsRef.PlatformServerUrl, *CredentialsRef.GetNamespace(), *CredentialsRef.GetUserId(), *EntitlementId);
249250

250251
FString Content;
251-
FJsonObjectConverter::UStructToJsonObjectString(ConsumeUserEntitlementRequest, Content);
252+
TSharedPtr<FJsonObject> Json = FJsonObjectConverter::UStructToJsonObject(ConsumeUserEntitlementRequest);
253+
FAccelByteUtilities::RemoveEmptyStrings(Json);
254+
TSharedRef<TJsonWriter<>> const Writer = TJsonWriterFactory<>::Create(&Content);
255+
FJsonSerializer::Serialize(Json.ToSharedRef(), Writer);
256+
252257

253258
HttpClient.ApiRequest("PUT", Url, {}, Content, OnSuccess, OnError);
254259
}

Source/AccelByteUe4Sdk/Private/Api/AccelByteLobbyApi.cpp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ namespace Api
4040
const FString PartyDeleteCode = TEXT("partyDeleteCodeRequest");
4141
const FString PartyJoinViaCode = TEXT("partyJoinViaCodeRequest");
4242
const FString PartyPromoteLeader = TEXT("partyPromoteLeaderRequest");
43+
const FString PartySendNotif = TEXT("partySendNotifRequest");
4344

4445
// Chat
4546
const FString PersonalChat = TEXT("personalChatRequest");
@@ -118,6 +119,8 @@ namespace Api
118119
const FString PartyDeleteCode = TEXT("partyDeleteCodeResponse");
119120
const FString PartyJoinViaCode = TEXT("partyJoinViaCodeResponse");
120121
const FString PartyPromoteLeader = TEXT("partyPromoteLeaderResponse");
122+
const FString PartySendNotif = TEXT("partySendNotifResponse");
123+
const FString PartyNotif = TEXT("partyNotif");
121124

122125
// Chat
123126
const FString PersonalChat = TEXT("personalChatResponse");
@@ -233,6 +236,7 @@ namespace Api
233236
PartyDeleteCode,
234237
PartyJoinViaCode,
235238
PartyPromoteLeader,
239+
PartySendNotif,
236240

237241
// Chat
238242
PersonalChat,
@@ -298,6 +302,7 @@ namespace Api
298302
PartyDataUpdateNotif,
299303
PartyMemberConnectNotif,
300304
PartyMemberDisconnectNotif,
305+
PartyNotif,
301306

302307
// Chat
303308
PersonalChatNotif,
@@ -358,6 +363,7 @@ namespace Api
358363
FORM_STRING_ENUM_PAIR(Response,PartyDeleteCode),
359364
FORM_STRING_ENUM_PAIR(Response,PartyJoinViaCode),
360365
FORM_STRING_ENUM_PAIR(Response,PartyPromoteLeader),
366+
FORM_STRING_ENUM_PAIR(Response,PartySendNotif),
361367
FORM_STRING_ENUM_PAIR(Response,PersonalChat),
362368
FORM_STRING_ENUM_PAIR(Response,PartyChat),
363369
FORM_STRING_ENUM_PAIR(Response,JoinChannelChat),
@@ -397,6 +403,7 @@ namespace Api
397403
FORM_STRING_ENUM_PAIR(Notif,PartyRejectNotif),
398404
FORM_STRING_ENUM_PAIR(Notif,PartyKickNotif),
399405
FORM_STRING_ENUM_PAIR(Notif,PartyDataUpdateNotif),
406+
FORM_STRING_ENUM_PAIR(Notif,PartyNotif),
400407
FORM_STRING_ENUM_PAIR(Notif,PartyMemberConnectNotif),
401408
FORM_STRING_ENUM_PAIR(Notif,PartyMemberDisconnectNotif),
402409
FORM_STRING_ENUM_PAIR(Notif,PersonalChatNotif),
@@ -661,6 +668,14 @@ FString Lobby::SendPartyPromoteLeaderRequest(const FString& UserId)
661668
, FString::Printf(TEXT("newLeaderUserId: %s\n"), *UserId))
662669
}
663670

671+
FString Lobby::SendNotificationToPartyMember(const FString& Topic, const FString& Payload)
672+
{
673+
FReport::Log(FString(__FUNCTION__));
674+
675+
SEND_RAW_REQUEST_CACHED_RESPONSE_RETURNED(PartySendNotif, Party,
676+
FString::Printf(TEXT("topic: %s\npayload: %s"), *Topic, *Payload));
677+
}
678+
664679
void Lobby::SetPartySizeLimit(const FString& PartyId, const int32 Limit, const FVoidHandler& OnSuccess, const FErrorHandler& OnError) const
665680
{
666681
if(Limit <= 0)
@@ -1380,6 +1395,7 @@ void Lobby::UnbindPartyNotifEvents()
13801395
PartyJoinNotif.Unbind();
13811396
PartyRejectNotif.Unbind();
13821397
PartyKickNotif.Unbind();
1398+
PartyNotif.Unbind();
13831399
PartyMemberConnectNotif.Unbind();
13841400
PartyMemberDisconnectNotif.Unbind();
13851401
}
@@ -1828,6 +1844,7 @@ void Lobby::HandleMessageResponse(const FString& ReceivedMessageType, const FStr
18281844
CASE_RESPONSE_MESSAGE_ID(PartyDeleteCode , FAccelByteModelsPartyDeleteCodeResponse);
18291845
CASE_RESPONSE_MESSAGE_ID(PartyJoinViaCode , FAccelByteModelsPartyJoinResponse);
18301846
CASE_RESPONSE_MESSAGE_ID(PartyPromoteLeader , FAccelByteModelsPartyPromoteLeaderResponse);
1847+
CASE_RESPONSE_MESSAGE_ID(PartySendNotif , FAccelByteModelsPartySendNotifResponse);
18311848
// Chat
18321849
CASE_RESPONSE_MESSAGE_ID(PersonalChat , FAccelByteModelsPersonalMessageResponse);
18331850
CASE_RESPONSE_MESSAGE_ID(PartyChat , FAccelByteModelsPartyMessageResponse);
@@ -2108,6 +2125,31 @@ void Lobby::HandleMessageNotif(const FString& ReceivedMessageType, const FString
21082125
CASE_NOTIF(PartyJoinNotif, FAccelByteModelsPartyJoinNotice);
21092126
CASE_NOTIF(PartyRejectNotif, FAccelByteModelsPartyRejectNotice);
21102127
CASE_NOTIF(PartyKickNotif, FAccelByteModelsGotKickedFromPartyNotice);
2128+
case Notif::PartyNotif:
2129+
{
2130+
const FString PayloadKey(TEXT("payload"));
2131+
const TSharedPtr<FJsonObject>* ObjectValue;
2132+
if (ParsedJsonObj->TryGetObjectField(PayloadKey, ObjectValue))
2133+
{
2134+
FString StringValue;
2135+
TSharedRef<TJsonWriter<TCHAR, TCondensedJsonPrintPolicy<TCHAR>>> JsonWriter = TJsonWriterFactory<TCHAR, TCondensedJsonPrintPolicy<TCHAR>>::Create(&StringValue, /*Indent=*/0);
2136+
if (!FJsonSerializer::Serialize(ObjectValue->ToSharedRef(), JsonWriter))
2137+
{
2138+
UE_LOG(LogAccelByteLobby, Log, TEXT("PartyNotif: unable to serialize payload as string: %s"), *ParsedJsonString);
2139+
return;
2140+
}
2141+
ParsedJsonObj->SetStringField(PayloadKey, StringValue);
2142+
}
2143+
2144+
FAccelByteModelsPartyNotif Notification;
2145+
if (!FJsonObjectConverter::JsonObjectToUStruct(ParsedJsonObj.ToSharedRef(), &Notification, 0, 0))
2146+
{
2147+
UE_LOG(LogAccelByteLobby, Log, TEXT("PartyNotif: unable to deserialize to struct: %s"), *ParsedJsonString);
2148+
return;
2149+
}
2150+
PartyNotif.ExecuteIfBound(Notification);
2151+
break;
2152+
}
21112153
CASE_NOTIF(PartyDataUpdateNotif, FAccelByteModelsPartyDataNotif);
21122154
CASE_NOTIF(PartyMemberConnectNotif, FAccelByteModelsPartyMemberConnectionNotice);
21132155
CASE_NOTIF(PartyMemberDisconnectNotif, FAccelByteModelsPartyMemberConnectionNotice);
@@ -2528,5 +2570,7 @@ Lobby::~Lobby()
25282570
}
25292571
}
25302572

2573+
TMap<FString, FString> Lobby::LobbyErrorMessages{};
2574+
25312575
} // Namespace Api
25322576
} // Namespace AccelByte

0 commit comments

Comments
 (0)