Skip to content

Commit 7a06034

Browse files
committed
Fix wrong response type in GetAKeyValuePairByIdForAssetInstances
1 parent 98a633a commit 7a06034

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,11 +996,11 @@ public static void GetAllKeyValuePairsToAnInstance(int instanceId, Action<LootLo
996996
LootLockerAPIManager.GetAllKeyValuePairsToAnInstance(data, onComplete);
997997
}
998998

999-
public static void GetAKeyValuePairByIdForAssetInstances(int assetId, int instanceId, Action<LootLockerAssetDefaultResponse> onComplete)
999+
public static void GetAKeyValuePairByIdForAssetInstances(int assetId, int instanceId, Action<LootLockerGetSingleKeyValuePairsResponse> onComplete)
10001000
{
10011001
if (!CheckInitialized())
10021002
{
1003-
LootLockerAssetDefaultResponse response = new LootLockerAssetDefaultResponse();
1003+
LootLockerGetSingleKeyValuePairsResponse response = new LootLockerGetSingleKeyValuePairsResponse();
10041004
response.success = false;
10051005
response.success = false;
10061006
response.hasError = true;

Runtime/Game/Requests/AssetInstanceRequest.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ public class LootLockerGetAllKeyValuePairsResponse : LootLockerResponse
1616
public LootLockerInstanceStoragePair[] keypairs;
1717
}
1818

19+
public class LootLockerGetSingleKeyValuePairsResponse : LootLockerResponse
20+
{
21+
public bool success { get; set; }
22+
public int streamedObjectCount = 0;
23+
public LootLockerInstanceStoragePair keypair;
24+
}
25+
1926
public class LootLockerInstanceStoragePair
2027
{
2128
public int instance_id { get; set; }
@@ -116,7 +123,7 @@ public static void GetAllKeyValuePairsToAnInstance(LootLockerGetRequest data, Ac
116123
}, true);
117124
}
118125

119-
public static void GetAKeyValuePairById(LootLockerGetRequest data, Action<LootLockerAssetDefaultResponse> onComplete)
126+
public static void GetAKeyValuePairById(LootLockerGetRequest data, Action<LootLockerGetSingleKeyValuePairsResponse> onComplete)
120127
{
121128
EndPointClass endPoint = LootLockerEndPoints.getAKeyValuePairById;
122129
string json = "";
@@ -127,9 +134,9 @@ public static void GetAKeyValuePairById(LootLockerGetRequest data, Action<LootLo
127134

128135
LootLockerServerRequest.CallAPI(getVariable, endPoint.httpMethod, json, onComplete: (serverResponse) =>
129136
{
130-
LootLockerAssetDefaultResponse response = new LootLockerAssetDefaultResponse();
137+
LootLockerGetSingleKeyValuePairsResponse response = new LootLockerGetSingleKeyValuePairsResponse();
131138
if (string.IsNullOrEmpty(serverResponse.Error))
132-
response = JsonConvert.DeserializeObject<LootLockerAssetDefaultResponse>(serverResponse.text);
139+
response = JsonConvert.DeserializeObject<LootLockerGetSingleKeyValuePairsResponse>(serverResponse.text);
133140

134141
// LootLockerSDKManager.DebugMessage(serverResponse.text, !string.IsNullOrEmpty(serverResponse.Error));
135142
response.text = serverResponse.text;

0 commit comments

Comments
 (0)