@@ -389,7 +389,8 @@ public static void StartSteamSession(string steamId64, Action<LootLockerSessionR
389
389
390
390
CurrentPlatform . Set ( Platforms . Steam ) ;
391
391
LootLockerSessionRequest sessionRequest = new LootLockerSessionRequest ( steamId64 ) ;
392
- LootLockerAPIManager . Session ( sessionRequest , response => {
392
+ LootLockerAPIManager . Session ( sessionRequest , response =>
393
+ {
393
394
if ( ! response . success )
394
395
{
395
396
CurrentPlatform . Reset ( ) ;
@@ -793,7 +794,8 @@ public static void WhiteLabelLogin(string email, string password, bool remember,
793
794
remember = remember
794
795
} ;
795
796
796
- LootLockerAPIManager . WhiteLabelLogin ( input , response => {
797
+ LootLockerAPIManager . WhiteLabelLogin ( input , response =>
798
+ {
797
799
PlayerPrefs . SetString ( "LootLockerWhiteLabelSessionToken" , response . SessionToken ) ;
798
800
PlayerPrefs . SetString ( "LootLockerWhiteLabelSessionEmail" , email ) ;
799
801
PlayerPrefs . Save ( ) ;
@@ -1416,12 +1418,19 @@ public static void SetPlayerName(string name, Action<PlayerNameResponse> onCompl
1416
1418
return ;
1417
1419
}
1418
1420
1419
- if ( CurrentPlatform . Get ( ) == Platforms . Guest && name . ToLower ( ) . Contains ( PlayerPrefs . GetString ( "LootLockerGuestPlayerID" ) . ToLower ( ) ) )
1421
+ if ( CurrentPlatform . Get ( ) == Platforms . Guest )
1420
1422
{
1421
- onComplete ? . Invoke ( LootLockerResponseFactory . Error < PlayerNameResponse > ( "Setting the Player name to the Identifier is not allowed" ) ) ;
1422
- return ;
1423
- }
1423
+ if ( name . ToLower ( ) . Contains ( "player" ) )
1424
+ {
1425
+ onComplete ? . Invoke ( LootLockerResponseFactory . Error < PlayerNameResponse > ( "Setting the Player name to 'Player' is not allowed" ) ) ;
1426
+ return ;
1424
1427
1428
+ } else if ( name . ToLower ( ) . Contains ( PlayerPrefs . GetString ( "LootLockerGuestPlayerID" ) . ToLower ( ) ) )
1429
+ {
1430
+ onComplete ? . Invoke ( LootLockerResponseFactory . Error < PlayerNameResponse > ( "Setting the Player name to the Identifier is not allowed" ) ) ;
1431
+ return ;
1432
+ }
1433
+ }
1425
1434
1426
1435
PlayerNameRequest data = new PlayerNameRequest ( ) ;
1427
1436
data . name = name ;
@@ -1437,7 +1446,7 @@ public static void DeletePlayer(Action<LootLockerResponse> onComplete)
1437
1446
{
1438
1447
if ( ! CheckInitialized ( ) )
1439
1448
{
1440
- onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerResponse > ( ) ) ;
1449
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerResponse > ( ) ) ;
1441
1450
return ;
1442
1451
}
1443
1452
@@ -1543,7 +1552,7 @@ public static void UploadPlayerFile(string pathToFile, string filePurpose, bool
1543
1552
LootLockerResponse . Deserialize ( onComplete , serverResponse ) ;
1544
1553
} ) ;
1545
1554
}
1546
-
1555
+
1547
1556
/// <summary>
1548
1557
/// Upload a file with the provided name and content. The file will be owned by the player with the provided playerID.
1549
1558
/// It will not be viewable by other players.
@@ -1634,7 +1643,7 @@ public static void UploadPlayerFile(byte[] fileBytes, string fileName, string fi
1634
1643
LootLockerResponse . Deserialize ( onComplete , serverResponse ) ;
1635
1644
} ) ;
1636
1645
}
1637
-
1646
+
1638
1647
/// <summary>
1639
1648
/// Upload a file using a byte array. Can be useful if you want to upload without storing anything on disk. The file will be owned by the currently active player.
1640
1649
/// </summary>
@@ -1646,9 +1655,9 @@ public static void UploadPlayerFile(byte[] fileBytes, string fileName, string fi
1646
1655
{
1647
1656
UploadPlayerFile ( fileBytes , fileName , filePurpose , false , onComplete ) ;
1648
1657
}
1649
-
1658
+
1650
1659
///////////////////////////////////////////////////////////////////////////////
1651
-
1660
+
1652
1661
/// <summary>
1653
1662
/// Update an existing player file with a new file.
1654
1663
/// </summary>
@@ -1662,7 +1671,7 @@ public static void UpdatePlayerFile(int fileId, string pathToFile, Action<LootLo
1662
1671
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerPlayerFile > ( ) ) ;
1663
1672
return ;
1664
1673
}
1665
-
1674
+
1666
1675
var fileBytes = new byte [ ] { } ;
1667
1676
try
1668
1677
{
@@ -1673,10 +1682,10 @@ public static void UpdatePlayerFile(int fileId, string pathToFile, Action<LootLo
1673
1682
LootLockerLogger . GetForLogLevel ( LootLockerLogger . LogLevel . Error ) ( $ "File error: { e . Message } ") ;
1674
1683
return ;
1675
1684
}
1676
-
1685
+
1677
1686
var endpoint = string . Format ( LootLockerEndPoints . updatePlayerFile . endPoint , fileId ) ;
1678
1687
1679
- LootLockerServerRequest . UploadFile ( endpoint , LootLockerEndPoints . updatePlayerFile . httpMethod , fileBytes , Path . GetFileName ( pathToFile ) , "multipart/form-data" , new Dictionary < string , string > ( ) ,
1688
+ LootLockerServerRequest . UploadFile ( endpoint , LootLockerEndPoints . updatePlayerFile . httpMethod , fileBytes , Path . GetFileName ( pathToFile ) , "multipart/form-data" , new Dictionary < string , string > ( ) ,
1680
1689
onComplete : ( serverResponse ) =>
1681
1690
{
1682
1691
LootLockerResponse . Deserialize ( onComplete , serverResponse ) ;
@@ -1710,7 +1719,7 @@ public static void UpdatePlayerFile(int fileId, FileStream fileStream, Action<Lo
1710
1719
1711
1720
var endpoint = string . Format ( LootLockerEndPoints . updatePlayerFile . endPoint , fileId ) ;
1712
1721
1713
- LootLockerServerRequest . UploadFile ( endpoint , LootLockerEndPoints . updatePlayerFile . httpMethod , fileBytes , Path . GetFileName ( fileStream . Name ) , "multipart/form-data" , new Dictionary < string , string > ( ) ,
1722
+ LootLockerServerRequest . UploadFile ( endpoint , LootLockerEndPoints . updatePlayerFile . httpMethod , fileBytes , Path . GetFileName ( fileStream . Name ) , "multipart/form-data" , new Dictionary < string , string > ( ) ,
1714
1723
onComplete : ( serverResponse ) =>
1715
1724
{
1716
1725
LootLockerResponse . Deserialize ( onComplete , serverResponse ) ;
@@ -1733,7 +1742,7 @@ public static void UpdatePlayerFile(int fileId, byte[] fileBytes, Action<LootLoc
1733
1742
1734
1743
var endpoint = string . Format ( LootLockerEndPoints . updatePlayerFile . endPoint , fileId ) ;
1735
1744
1736
- LootLockerServerRequest . UploadFile ( endpoint , LootLockerEndPoints . updatePlayerFile . httpMethod , fileBytes , null , "multipart/form-data" , new Dictionary < string , string > ( ) ,
1745
+ LootLockerServerRequest . UploadFile ( endpoint , LootLockerEndPoints . updatePlayerFile . httpMethod , fileBytes , null , "multipart/form-data" , new Dictionary < string , string > ( ) ,
1737
1746
onComplete : ( serverResponse ) =>
1738
1747
{
1739
1748
LootLockerResponse . Deserialize ( onComplete , serverResponse ) ;
@@ -1786,7 +1795,7 @@ public static void GetPlayerProgressions(int count, string after, Action<LootLoc
1786
1795
1787
1796
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . GET , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
1788
1797
}
1789
-
1798
+
1790
1799
/// <summary>
1791
1800
/// Returns multiple progressions the player is currently on.
1792
1801
/// </summary>
@@ -1796,7 +1805,7 @@ public static void GetPlayerProgressions(int count, Action<LootLockerPaginatedPl
1796
1805
{
1797
1806
GetPlayerProgressions ( count , null , onComplete ) ;
1798
1807
}
1799
-
1808
+
1800
1809
/// <summary>
1801
1810
/// Returns multiple progressions the player is currently on.
1802
1811
/// </summary>
@@ -1805,7 +1814,7 @@ public static void GetPlayerProgressions(Action<LootLockerPaginatedPlayerProgres
1805
1814
{
1806
1815
GetPlayerProgressions ( - 1 , null , onComplete ) ;
1807
1816
}
1808
-
1817
+
1809
1818
/// <summary>
1810
1819
/// Returns a single progression the player is currently on.
1811
1820
/// </summary>
@@ -1823,7 +1832,7 @@ public static void GetPlayerProgression(string progressionKey, Action<LootLocker
1823
1832
1824
1833
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . GET , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
1825
1834
}
1826
-
1835
+
1827
1836
/// <summary>
1828
1837
/// Adds points to a player progression.
1829
1838
/// </summary>
@@ -1840,11 +1849,11 @@ public static void AddPointsToPlayerProgression(string progressionKey, ulong amo
1840
1849
1841
1850
var endpoint = string . Format ( LootLockerEndPoints . addPointsToPlayerProgression . endPoint , progressionKey ) ;
1842
1851
1843
- var body = LootLockerJson . SerializeObject ( new { amount } ) ;
1852
+ var body = LootLockerJson . SerializeObject ( new { amount } ) ;
1844
1853
1845
1854
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . POST , body , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
1846
1855
}
1847
-
1856
+
1848
1857
/// <summary>
1849
1858
/// Subtracts points from a player progression.
1850
1859
/// </summary>
@@ -1860,12 +1869,12 @@ public static void SubtractPointsFromPlayerProgression(string progressionKey, ul
1860
1869
}
1861
1870
1862
1871
var endpoint = string . Format ( LootLockerEndPoints . subtractPointsFromPlayerProgression . endPoint , progressionKey ) ;
1863
-
1872
+
1864
1873
var body = LootLockerJson . SerializeObject ( new { amount } ) ;
1865
1874
1866
1875
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . POST , body , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
1867
1876
}
1868
-
1877
+
1869
1878
/// <summary>
1870
1879
/// Resets a player progression.
1871
1880
/// </summary>
@@ -1883,7 +1892,7 @@ public static void ResetPlayerProgression(string progressionKey, Action<LootLock
1883
1892
1884
1893
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . POST , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
1885
1894
}
1886
-
1895
+
1887
1896
/// <summary>
1888
1897
/// Deletes a player progression.
1889
1898
/// </summary>
@@ -2309,7 +2318,7 @@ public static void AddPointsToCharacterProgression(int characterId, string progr
2309
2318
2310
2319
var endpoint = string . Format ( LootLockerEndPoints . addPointsToCharacterProgression . endPoint , characterId , progressionKey ) ;
2311
2320
2312
- var body = LootLockerJson . SerializeObject ( new { amount } ) ;
2321
+ var body = LootLockerJson . SerializeObject ( new { amount } ) ;
2313
2322
2314
2323
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . POST , body , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
2315
2324
}
@@ -2330,7 +2339,7 @@ public static void SubtractPointsFromCharacterProgression(int characterId, strin
2330
2339
}
2331
2340
2332
2341
var endpoint = string . Format ( LootLockerEndPoints . subtractPointsFromCharacterProgression . endPoint , characterId , progressionKey ) ;
2333
-
2342
+
2334
2343
var body = LootLockerJson . SerializeObject ( new { amount } ) ;
2335
2344
2336
2345
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . POST , body , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
@@ -2354,7 +2363,7 @@ public static void ResetCharacterProgression(int characterId, string progression
2354
2363
2355
2364
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . POST , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
2356
2365
}
2357
-
2366
+
2358
2367
/// <summary>
2359
2368
/// Deletes a character progression.
2360
2369
/// </summary>
@@ -2373,9 +2382,9 @@ public static void DeleteCharacterProgression(int characterId, string progressio
2373
2382
2374
2383
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . DELETE , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
2375
2384
}
2376
-
2385
+
2377
2386
#endregion
2378
-
2387
+
2379
2388
#region PlayerStorage
2380
2389
/// <summary>
2381
2390
/// Get the player storage for the currently active player (key/values).
@@ -2607,7 +2616,7 @@ public static void ResetAssetCalls()
2607
2616
{
2608
2617
LootLockerAssetRequest . lastId = 0 ;
2609
2618
}
2610
-
2619
+
2611
2620
[ Obsolete ( "This function will soon be removed. Use GetAssetInformation(int assetId, Action<LootLockerCommonAsset> onComplete) with int parameter instead" ) ]
2612
2621
public static void GetAssetInformation ( string assetId , Action < LootLockerCommonAsset > onComplete )
2613
2622
{
@@ -3305,7 +3314,7 @@ public static void RemovingFilesFromAssetCandidates(int assetCandidateID, int fi
3305
3314
LootLockerAPIManager . RemovingFilesFromAssetCandidates ( data , onComplete ) ;
3306
3315
}
3307
3316
#endregion
3308
-
3317
+
3309
3318
#region Progressions
3310
3319
3311
3320
/// <summary>
@@ -3333,7 +3342,7 @@ public static void GetProgressions(int count, string after, Action<LootLockerPag
3333
3342
3334
3343
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . GET , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
3335
3344
}
3336
-
3345
+
3337
3346
/// <summary>
3338
3347
/// Returns multiple progressions.
3339
3348
/// </summary>
@@ -3343,7 +3352,7 @@ public static void GetProgressions(int count, Action<LootLockerPaginatedProgress
3343
3352
{
3344
3353
GetProgressions ( count , null , onComplete ) ;
3345
3354
}
3346
-
3355
+
3347
3356
/// <summary>
3348
3357
/// Returns multiple progressions.
3349
3358
/// </summary>
@@ -3352,7 +3361,7 @@ public static void GetProgressions(Action<LootLockerPaginatedProgressionsRespons
3352
3361
{
3353
3362
GetProgressions ( - 1 , null , onComplete ) ;
3354
3363
}
3355
-
3364
+
3356
3365
/// <summary>
3357
3366
/// Returns a single progression.
3358
3367
/// </summary>
@@ -3367,7 +3376,7 @@ public static void GetProgression(string progressionKey, Action<LootLockerProgre
3367
3376
}
3368
3377
3369
3378
var endpoint = string . Format ( LootLockerEndPoints . getSingleProgression . endPoint , progressionKey ) ;
3370
-
3379
+
3371
3380
LootLockerServerRequest . CallAPI ( endpoint , LootLockerHTTPMethod . GET , onComplete : ( serverResponse ) => { LootLockerResponse . Deserialize ( onComplete , serverResponse ) ; } ) ;
3372
3381
}
3373
3382
@@ -3387,7 +3396,7 @@ public static void GetProgressionTiers(string progressionKey, int count, ulong?
3387
3396
}
3388
3397
3389
3398
var endpoint = string . Format ( LootLockerEndPoints . getProgressionTiers . endPoint , progressionKey ) ;
3390
-
3399
+
3391
3400
endpoint += "?" ;
3392
3401
if ( count > 0 )
3393
3402
endpoint += $ "count={ count } &";
@@ -3406,9 +3415,9 @@ public static void GetProgressionTiers(string progressionKey, int count, ulong?
3406
3415
/// <param name="onComplete">onComplete Action for handling the response of type LootLockerPaginatedProgressionTiers</param>
3407
3416
public static void GetProgressionTiers ( string progressionKey , int count , Action < LootLockerPaginatedProgressionTiersResponse > onComplete )
3408
3417
{
3409
- GetProgressionTiers ( progressionKey , count , null , onComplete ) ;
3418
+ GetProgressionTiers ( progressionKey , count , null , onComplete ) ;
3410
3419
}
3411
-
3420
+
3412
3421
/// <summary>
3413
3422
/// Returns multiple progression tiers for the specified progression.
3414
3423
/// </summary>
0 commit comments