@@ -863,6 +863,25 @@ public static void UpdateCharacter(string characterID, string newCharacterName,
863
863
LootLockerAPIManager . UpdateCharacter ( lootLockerGetRequest , data , onComplete ) ;
864
864
}
865
865
866
+ public static void SetDefaultCharacter ( string characterID , Action < LootLockerCharacterLoadoutResponse > onComplete )
867
+ {
868
+ if ( ! CheckInitialized ( ) )
869
+ {
870
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerCharacterLoadoutResponse > ( ) ) ;
871
+ return ;
872
+ }
873
+
874
+ LootLockerUpdateCharacterRequest data = new LootLockerUpdateCharacterRequest ( ) ;
875
+
876
+ data . is_default = true ;
877
+
878
+ LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest ( ) ;
879
+
880
+ lootLockerGetRequest . getRequests . Add ( characterID ) ;
881
+
882
+ LootLockerAPIManager . UpdateCharacter ( lootLockerGetRequest , data , onComplete ) ;
883
+ }
884
+
866
885
public static void EquipIdAssetToDefaultCharacter ( string assetInstanceId , Action < EquipAssetToCharacterLoadoutResponse > onComplete )
867
886
{
868
887
if ( ! CheckInitialized ( ) )
@@ -1186,55 +1205,55 @@ public static void GetAllKeyValuePairsForAssetInstances(Action<LootLockerGetAllK
1186
1205
LootLockerAPIManager . GetAllKeyValuePairs ( onComplete ) ;
1187
1206
}
1188
1207
1189
- public static void GetAllKeyValuePairsToAnInstance ( int instanceId , Action < LootLockerAssetDefaultResponse > onComplete )
1208
+ public static void GetAllKeyValuePairsToAnInstance ( int assetInstanceID , Action < LootLockerAssetDefaultResponse > onComplete )
1190
1209
{
1191
1210
if ( ! CheckInitialized ( ) )
1192
1211
{
1193
1212
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1194
1213
return ;
1195
1214
}
1196
1215
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1197
- data . getRequests . Add ( instanceId . ToString ( ) ) ;
1216
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1198
1217
LootLockerAPIManager . GetAllKeyValuePairsToAnInstance ( data , onComplete ) ;
1199
1218
}
1200
1219
1201
- public static void GetAKeyValuePairByIdForAssetInstances ( int assetId , int instanceId , Action < LootLockerGetSingleKeyValuePairsResponse > onComplete )
1220
+ public static void GetAKeyValuePairByIdForAssetInstances ( int assetInstanceID , int keyValueID , Action < LootLockerGetSingleKeyValuePairsResponse > onComplete )
1202
1221
{
1203
1222
if ( ! CheckInitialized ( ) )
1204
1223
{
1205
1224
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerGetSingleKeyValuePairsResponse > ( ) ) ;
1206
1225
return ;
1207
1226
}
1208
1227
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1209
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1210
- data . getRequests . Add ( instanceId . ToString ( ) ) ;
1228
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1229
+ data . getRequests . Add ( keyValueID . ToString ( ) ) ;
1211
1230
LootLockerAPIManager . GetAKeyValuePairById ( data , onComplete ) ;
1212
1231
}
1213
1232
1214
- public static void CreateKeyValuePairForAssetInstances ( int assetId , string key , string value , Action < LootLockerAssetDefaultResponse > onComplete )
1233
+ public static void CreateKeyValuePairForAssetInstances ( int assetInstanceID , string key , string value , Action < LootLockerAssetDefaultResponse > onComplete )
1215
1234
{
1216
1235
if ( ! CheckInitialized ( ) )
1217
1236
{
1218
1237
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1219
1238
return ;
1220
1239
}
1221
1240
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1222
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1241
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1223
1242
LootLockerCreateKeyValuePairRequest createKeyValuePairRequest = new LootLockerCreateKeyValuePairRequest ( ) ;
1224
1243
createKeyValuePairRequest . key = key ;
1225
1244
createKeyValuePairRequest . value = value ;
1226
1245
LootLockerAPIManager . CreateKeyValuePair ( data , createKeyValuePairRequest , onComplete ) ;
1227
1246
}
1228
1247
1229
- public static void UpdateOneOrMoreKeyValuePairForAssetInstances ( int assetId , Dictionary < string , string > data , Action < LootLockerAssetDefaultResponse > onComplete )
1248
+ public static void UpdateOneOrMoreKeyValuePairForAssetInstances ( int assetInstanceID , Dictionary < string , string > data , Action < LootLockerAssetDefaultResponse > onComplete )
1230
1249
{
1231
1250
if ( ! CheckInitialized ( ) )
1232
1251
{
1233
1252
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1234
1253
return ;
1235
1254
}
1236
1255
LootLockerGetRequest request = new LootLockerGetRequest ( ) ;
1237
- request . getRequests . Add ( assetId . ToString ( ) ) ;
1256
+ request . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1238
1257
LootLockerUpdateOneOrMoreKeyValuePairRequest createKeyValuePairRequest = new LootLockerUpdateOneOrMoreKeyValuePairRequest ( ) ;
1239
1258
List < LootLockerCreateKeyValuePairRequest > temp = new List < LootLockerCreateKeyValuePairRequest > ( ) ;
1240
1259
foreach ( var d in data )
@@ -1244,7 +1263,22 @@ public static void UpdateOneOrMoreKeyValuePairForAssetInstances(int assetId, Dic
1244
1263
createKeyValuePairRequest . storage = temp . ToArray ( ) ;
1245
1264
LootLockerAPIManager . UpdateOneOrMoreKeyValuePair ( request , createKeyValuePairRequest , onComplete ) ;
1246
1265
}
1247
-
1266
+ public static void UpdateKeyValuePairForAssetInstances ( int assetInstanceID , string key , string value , Action < LootLockerAssetDefaultResponse > onComplete )
1267
+ {
1268
+ if ( ! CheckInitialized ( ) )
1269
+ {
1270
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1271
+ return ;
1272
+ }
1273
+ LootLockerGetRequest request = new LootLockerGetRequest ( ) ;
1274
+ request . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1275
+ LootLockerUpdateOneOrMoreKeyValuePairRequest createKeyValuePairRequest = new LootLockerUpdateOneOrMoreKeyValuePairRequest ( ) ;
1276
+ List < LootLockerCreateKeyValuePairRequest > temp = new List < LootLockerCreateKeyValuePairRequest > ( ) ;
1277
+ temp . Add ( new LootLockerCreateKeyValuePairRequest { key = key , value = value } ) ;
1278
+ createKeyValuePairRequest . storage = temp . ToArray ( ) ;
1279
+ LootLockerAPIManager . UpdateOneOrMoreKeyValuePair ( request , createKeyValuePairRequest , onComplete ) ;
1280
+ }
1281
+ [ ObsoleteAttribute ( "This function with 3 parameters is deprecated, use this function with 4 parameters instead:\n (int assetInstanceID, int keyValueID, string value, string key, Action<LootLockerAssetDefaultResponse> onComplete)" ) ]
1248
1282
public static void UpdateKeyValuePairByIdForAssetInstances ( int assetId , string key , string value , Action < LootLockerAssetDefaultResponse > onComplete )
1249
1283
{
1250
1284
if ( ! CheckInitialized ( ) )
@@ -1259,41 +1293,62 @@ public static void UpdateKeyValuePairByIdForAssetInstances(int assetId, string k
1259
1293
createKeyValuePairRequest . value = value ;
1260
1294
LootLockerAPIManager . UpdateKeyValuePairById ( data , createKeyValuePairRequest , onComplete ) ;
1261
1295
}
1296
+ public static void UpdateKeyValuePairByIdForAssetInstances ( int assetInstanceID , int keyValueID , string value , string key , Action < LootLockerAssetDefaultResponse > onComplete )
1297
+ {
1298
+ if ( ! CheckInitialized ( ) )
1299
+ {
1300
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1301
+ return ;
1302
+ }
1303
+ LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1304
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1305
+ data . getRequests . Add ( keyValueID . ToString ( ) ) ;
1306
+ LootLockerCreateKeyValuePairRequest createKeyValuePairRequest = new LootLockerCreateKeyValuePairRequest ( ) ;
1307
+ if ( key != null )
1308
+ {
1309
+ createKeyValuePairRequest . key = key ;
1310
+ }
1311
+ if ( value != null )
1312
+ {
1313
+ createKeyValuePairRequest . value = value ;
1314
+ }
1315
+ LootLockerAPIManager . UpdateKeyValuePairById ( data , createKeyValuePairRequest , onComplete ) ;
1316
+ }
1262
1317
1263
- public static void DeleteKeyValuePairForAssetInstances ( int assetId , int instanceId , Action < LootLockerAssetDefaultResponse > onComplete )
1318
+ public static void DeleteKeyValuePairForAssetInstances ( int assetInstanceID , int keyValueID , Action < LootLockerAssetDefaultResponse > onComplete )
1264
1319
{
1265
1320
if ( ! CheckInitialized ( ) )
1266
1321
{
1267
1322
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1268
1323
return ;
1269
1324
}
1270
1325
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1271
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1272
- data . getRequests . Add ( instanceId . ToString ( ) ) ;
1326
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1327
+ data . getRequests . Add ( keyValueID . ToString ( ) ) ;
1273
1328
LootLockerAPIManager . DeleteKeyValuePair ( data , onComplete ) ;
1274
1329
}
1275
1330
1276
- public static void InspectALootBoxForAssetInstances ( int assetId , Action < LootLockerInspectALootBoxResponse > onComplete )
1331
+ public static void InspectALootBoxForAssetInstances ( int assetInstanceID , Action < LootLockerInspectALootBoxResponse > onComplete )
1277
1332
{
1278
1333
if ( ! CheckInitialized ( ) )
1279
1334
{
1280
1335
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerInspectALootBoxResponse > ( ) ) ;
1281
1336
return ;
1282
1337
}
1283
1338
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1284
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1339
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1285
1340
LootLockerAPIManager . InspectALootBox ( data , onComplete ) ;
1286
1341
}
1287
1342
1288
- public static void OpenALootBoxForAssetInstances ( int assetId , Action < LootLockerOpenLootBoxResponse > onComplete )
1343
+ public static void OpenALootBoxForAssetInstances ( int assetInstanceID , Action < LootLockerOpenLootBoxResponse > onComplete )
1289
1344
{
1290
1345
if ( ! CheckInitialized ( ) )
1291
1346
{
1292
1347
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerOpenLootBoxResponse > ( ) ) ;
1293
1348
return ;
1294
1349
}
1295
1350
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1296
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1351
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1297
1352
LootLockerAPIManager . OpenALootBox ( data , onComplete ) ;
1298
1353
}
1299
1354
#endregion
0 commit comments