@@ -255,37 +255,50 @@ public class LootLockerListCatalogsResponse : LootLockerResponse
255255 }
256256
257257 /// <summary>
258- /// </summary>
258+ /// </summary>
259259 public class LootLockerListCatalogPricesResponse : LootLockerResponse
260260 {
261261 /// <summary>
262- /// Details about the catalog that the prices is in
263- /// </summary>
262+ /// Details about the catalog that the prices is in
263+ /// </summary>
264264 public LootLockerCatalog catalog { get ; set ; }
265265
266266 /// <summary>
267- /// A list of entries available in this catalog
268- /// </summary>
267+ /// A list of entries available in this catalog
268+ /// </summary>
269269 public LootLockerCatalogEntry [ ] entries { get ; set ; }
270+
270271 /// <summary>
271- /// Lookup map for details about entities of entity type assets
272- /// </summary>
272+ /// Lookup map for details about entities of entity type assets
273+ /// </summary>
273274 public Dictionary < string /*grouping_key*/ , LootLockerAssetDetails > asset_details { get ; set ; }
275+
274276 /// <summary>
275- /// Lookup map for details about entities of entity type progression_points
276- /// </summary>
277- public Dictionary < string /*grouping_key*/ , LootLockerProgressionPointDetails > progression_points_details { get ; set ; }
277+ /// Lookup map for details about entities of entity type progression_points
278+ /// </summary>
279+ public Dictionary < string /*grouping_key*/ , LootLockerProgressionPointDetails > progression_points_details
280+ {
281+ get ;
282+ set ;
283+ }
284+
278285 /// <summary>
279- /// Lookup map for details about entities of entity type progression_reset
280- /// </summary>
281- public Dictionary < string /*grouping_key*/ , LootLockerProgressionResetDetails > progression_resets_details { get ; set ; }
286+ /// Lookup map for details about entities of entity type progression_reset
287+ /// </summary>
288+ public Dictionary < string /*grouping_key*/ , LootLockerProgressionResetDetails > progression_resets_details
289+ {
290+ get ;
291+ set ;
292+ }
293+
282294 /// <summary>
283- /// Lookup map for details about entities of entity type currency
284- /// </summary>
295+ /// Lookup map for details about entities of entity type currency
296+ /// </summary>
285297 public Dictionary < string /*grouping_key*/ , LootLockerCurrencyDetails > currency_details { get ; set ; }
298+
286299 /// <summary>
287- /// Pagination data to use for subsequent requests
288- /// </summary>
300+ /// Pagination data to use for subsequent requests
301+ /// </summary>
289302 public LootLockerCatalogPagination pagination { get ; set ; }
290303
291304 public void AppendCatalogItems ( LootLockerListCatalogPricesResponse catalogPrices )
@@ -298,32 +311,33 @@ public void AppendCatalogItems(LootLockerListCatalogPricesResponse catalogPrices
298311
299312 foreach ( var assetDetail in catalogPrices . asset_details )
300313 {
301- asset_details . Add ( assetDetail . Key , assetDetail . Value ) ;
314+ asset_details . Add ( assetDetail . Key , assetDetail . Value ) ;
302315 }
316+
303317 foreach ( var progressionPointDetail in catalogPrices . progression_points_details )
304318 {
305319 progression_points_details . Add ( progressionPointDetail . Key , progressionPointDetail . Value ) ;
306320 }
321+
307322 foreach ( var progressionResetDetail in catalogPrices . progression_resets_details )
308323 {
309324 progression_resets_details . Add ( progressionResetDetail . Key , progressionResetDetail . Value ) ;
310325 }
326+
311327 foreach ( var currencyDetail in catalogPrices . currency_details )
312328 {
313329 currency_details . Add ( currencyDetail . Key , currencyDetail . Value ) ;
314330 }
315331 }
316332
317- public LootLockerListCatalogPricesResponse ( )
318- {
319- }
333+ public LootLockerListCatalogPricesResponse ( ) { }
320334
321- /// This is the way that the response actually looks, but we don't want to expose it, hence the conversion
335+ /// This is the way that the response actually looks, but we don't want to expose it, hence the conversion
322336 private class LootLockerListCatalogItemsWithArraysResponse : LootLockerResponse
323337 {
324338 public LootLockerCatalog catalog { get ; set ; }
325339 public LootLockerCatalogEntry [ ] entries { get ; set ; }
326- public LootLockerAssetDetails [ ] asset_details { get ; set ; }
340+ public LootLockerAssetDetails [ ] assets_details { get ; set ; }
327341 public LootLockerProgressionPointDetails [ ] progression_points_details { get ; set ; }
328342 public LootLockerProgressionResetDetails [ ] progression_resets_details { get ; set ; }
329343 public LootLockerCurrencyDetails [ ] currency_details { get ; set ; }
@@ -332,34 +346,47 @@ private class LootLockerListCatalogItemsWithArraysResponse : LootLockerResponse
332346
333347 public LootLockerListCatalogPricesResponse ( LootLockerResponse serverResponse )
334348 {
335- LootLockerListCatalogItemsWithArraysResponse parsedResponse = Deserialize < LootLockerListCatalogItemsWithArraysResponse > ( serverResponse ) ;
349+ LootLockerListCatalogItemsWithArraysResponse parsedResponse =
350+ Deserialize < LootLockerListCatalogItemsWithArraysResponse > ( serverResponse ) ;
351+ success = parsedResponse . success ;
352+ statusCode = parsedResponse . statusCode ;
353+ text = parsedResponse . text ;
354+ errorData = parsedResponse . errorData ;
355+ if ( ! success )
356+ {
357+ return ;
358+ }
359+
336360 catalog = parsedResponse . catalog ;
337361 entries = parsedResponse . entries ;
362+ pagination = parsedResponse . pagination ;
338363
339- if ( parsedResponse . asset_details != null && parsedResponse . asset_details . Length > 0 )
364+ if ( parsedResponse . assets_details != null && parsedResponse . assets_details . Length > 0 )
340365 {
341366 asset_details = new Dictionary < string , LootLockerAssetDetails > ( ) ;
342- foreach ( var assetDetail in parsedResponse . asset_details )
367+ foreach ( var assetDetail in parsedResponse . assets_details )
343368 {
344- asset_details . Add ( assetDetail . id , assetDetail ) ;
369+ asset_details [ assetDetail . grouping_key ] = assetDetail ;
345370 }
346371 }
347372
348- if ( parsedResponse . progression_points_details != null && parsedResponse . progression_points_details . Length > 0 )
373+ if ( parsedResponse . progression_points_details != null &&
374+ parsedResponse . progression_points_details . Length > 0 )
349375 {
350376 progression_points_details = new Dictionary < string , LootLockerProgressionPointDetails > ( ) ;
351377 foreach ( var detail in parsedResponse . progression_points_details )
352378 {
353- progression_points_details . Add ( detail . id , detail ) ;
379+ progression_points_details [ detail . grouping_key ] = detail ;
354380 }
355381 }
356382
357- if ( parsedResponse . progression_resets_details != null && parsedResponse . progression_resets_details . Length > 0 )
383+ if ( parsedResponse . progression_resets_details != null &&
384+ parsedResponse . progression_resets_details . Length > 0 )
358385 {
359386 progression_resets_details = new Dictionary < string , LootLockerProgressionResetDetails > ( ) ;
360387 foreach ( var detail in parsedResponse . progression_resets_details )
361388 {
362- progression_resets_details . Add ( detail . id , detail ) ;
389+ progression_resets_details [ detail . grouping_key ] = detail ;
363390 }
364391 }
365392
@@ -368,31 +395,31 @@ public LootLockerListCatalogPricesResponse(LootLockerResponse serverResponse)
368395 currency_details = new Dictionary < string , LootLockerCurrencyDetails > ( ) ;
369396 foreach ( var detail in parsedResponse . currency_details )
370397 {
371- currency_details . Add ( detail . id , detail ) ;
398+ currency_details [ detail . grouping_key ] = detail ;
372399 }
373400 }
374401 }
375402
376403#if UNITY_2020_2_OR_NEWER
377404 /// <summary>
378- /// </summary>
405+ /// </summary>
379406 public class LootLockerInlinedCatalogEntry : LootLockerCatalogEntry
380407 {
381408 /// <summary>
382- /// Asset details inlined for this catalog entry, will be null if the entity_kind is not asset
383- /// </summary>
409+ /// Asset details inlined for this catalog entry, will be null if the entity_kind is not asset
410+ /// </summary>
384411 public LootLockerAssetDetails ? asset_details { get ; set ; }
385412 /// <summary>
386- /// Progression point details inlined for this catalog entry, will be null if the entity_kind is not progression_points
387- /// </summary>
413+ /// Progression point details inlined for this catalog entry, will be null if the entity_kind is not progression_points
414+ /// </summary>
388415 public LootLockerProgressionPointDetails ? progression_point_details { get ; set ; }
389416 /// <summary>
390- /// Progression reset details inlined for this catalog entry, will be null if the entity_kind is not progression_reset
391- /// </summary>
417+ /// Progression reset details inlined for this catalog entry, will be null if the entity_kind is not progression_reset
418+ /// </summary>
392419 public LootLockerProgressionResetDetails ? progression_reset_details { get ; set ; }
393420 /// <summary>
394- /// Currency details inlined for this catalog entry, will be null if the entity_kind is not currency
395- /// </summary>
421+ /// Currency details inlined for this catalog entry, will be null if the entity_kind is not currency
422+ /// </summary>
396423 public LootLockerCurrencyDetails ? currency_details { get ; set ; }
397424
398425 public LootLockerInlinedCatalogEntry ( LootLockerCatalogEntry entry , [ CanBeNull ] LootLockerAssetDetails assetDetails , [ CanBeNull ] LootLockerProgressionPointDetails progressionPointDetails , [ CanBeNull ] LootLockerProgressionResetDetails progressionResetDetails , [ CanBeNull ] LootLockerCurrencyDetails currencyDetails )
@@ -412,8 +439,8 @@ public LootLockerInlinedCatalogEntry(LootLockerCatalogEntry entry, [CanBeNull] L
412439 }
413440
414441 /// <summary>
415- /// Get all the entries with details inlined into the entries themselves
416- /// </summary>
442+ /// Get all the entries with details inlined into the entries themselves
443+ /// </summary>
417444 public LootLockerInlinedCatalogEntry [ ] GetLootLockerInlinedCatalogEntries ( )
418445 {
419446 List < LootLockerInlinedCatalogEntry > inlinedEntries = new List < LootLockerInlinedCatalogEntry > ( ) ;
0 commit comments