@@ -765,6 +765,25 @@ public static void UpdateCharacter(string characterID, string newCharacterName,
765
765
LootLockerAPIManager . UpdateCharacter ( lootLockerGetRequest , data , onComplete ) ;
766
766
}
767
767
768
+ public static void SetDefaultCharacter ( string characterID , Action < LootLockerCharacterLoadoutResponse > onComplete )
769
+ {
770
+ if ( ! CheckInitialized ( ) )
771
+ {
772
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerCharacterLoadoutResponse > ( ) ) ;
773
+ return ;
774
+ }
775
+
776
+ LootLockerUpdateCharacterRequest data = new LootLockerUpdateCharacterRequest ( ) ;
777
+
778
+ data . is_default = true ;
779
+
780
+ LootLockerGetRequest lootLockerGetRequest = new LootLockerGetRequest ( ) ;
781
+
782
+ lootLockerGetRequest . getRequests . Add ( characterID ) ;
783
+
784
+ LootLockerAPIManager . UpdateCharacter ( lootLockerGetRequest , data , onComplete ) ;
785
+ }
786
+
768
787
public static void EquipIdAssetToDefaultCharacter ( string assetInstanceId , Action < EquipAssetToCharacterLoadoutResponse > onComplete )
769
788
{
770
789
if ( ! CheckInitialized ( ) )
@@ -1088,55 +1107,55 @@ public static void GetAllKeyValuePairsForAssetInstances(Action<LootLockerGetAllK
1088
1107
LootLockerAPIManager . GetAllKeyValuePairs ( onComplete ) ;
1089
1108
}
1090
1109
1091
- public static void GetAllKeyValuePairsToAnInstance ( int instanceId , Action < LootLockerAssetDefaultResponse > onComplete )
1110
+ public static void GetAllKeyValuePairsToAnInstance ( int assetInstanceID , Action < LootLockerAssetDefaultResponse > onComplete )
1092
1111
{
1093
1112
if ( ! CheckInitialized ( ) )
1094
1113
{
1095
1114
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1096
1115
return ;
1097
1116
}
1098
1117
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1099
- data . getRequests . Add ( instanceId . ToString ( ) ) ;
1118
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1100
1119
LootLockerAPIManager . GetAllKeyValuePairsToAnInstance ( data , onComplete ) ;
1101
1120
}
1102
1121
1103
- public static void GetAKeyValuePairByIdForAssetInstances ( int assetId , int instanceId , Action < LootLockerGetSingleKeyValuePairsResponse > onComplete )
1122
+ public static void GetAKeyValuePairByIdForAssetInstances ( int assetInstanceID , int keyValueID , Action < LootLockerGetSingleKeyValuePairsResponse > onComplete )
1104
1123
{
1105
1124
if ( ! CheckInitialized ( ) )
1106
1125
{
1107
1126
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerGetSingleKeyValuePairsResponse > ( ) ) ;
1108
1127
return ;
1109
1128
}
1110
1129
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1111
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1112
- data . getRequests . Add ( instanceId . ToString ( ) ) ;
1130
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1131
+ data . getRequests . Add ( keyValueID . ToString ( ) ) ;
1113
1132
LootLockerAPIManager . GetAKeyValuePairById ( data , onComplete ) ;
1114
1133
}
1115
1134
1116
- public static void CreateKeyValuePairForAssetInstances ( int assetId , string key , string value , Action < LootLockerAssetDefaultResponse > onComplete )
1135
+ public static void CreateKeyValuePairForAssetInstances ( int assetInstanceID , string key , string value , Action < LootLockerAssetDefaultResponse > onComplete )
1117
1136
{
1118
1137
if ( ! CheckInitialized ( ) )
1119
1138
{
1120
1139
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1121
1140
return ;
1122
1141
}
1123
1142
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1124
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1143
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1125
1144
LootLockerCreateKeyValuePairRequest createKeyValuePairRequest = new LootLockerCreateKeyValuePairRequest ( ) ;
1126
1145
createKeyValuePairRequest . key = key ;
1127
1146
createKeyValuePairRequest . value = value ;
1128
1147
LootLockerAPIManager . CreateKeyValuePair ( data , createKeyValuePairRequest , onComplete ) ;
1129
1148
}
1130
1149
1131
- public static void UpdateOneOrMoreKeyValuePairForAssetInstances ( int assetId , Dictionary < string , string > data , Action < LootLockerAssetDefaultResponse > onComplete )
1150
+ public static void UpdateOneOrMoreKeyValuePairForAssetInstances ( int assetInstanceID , Dictionary < string , string > data , Action < LootLockerAssetDefaultResponse > onComplete )
1132
1151
{
1133
1152
if ( ! CheckInitialized ( ) )
1134
1153
{
1135
1154
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1136
1155
return ;
1137
1156
}
1138
1157
LootLockerGetRequest request = new LootLockerGetRequest ( ) ;
1139
- request . getRequests . Add ( assetId . ToString ( ) ) ;
1158
+ request . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1140
1159
LootLockerUpdateOneOrMoreKeyValuePairRequest createKeyValuePairRequest = new LootLockerUpdateOneOrMoreKeyValuePairRequest ( ) ;
1141
1160
List < LootLockerCreateKeyValuePairRequest > temp = new List < LootLockerCreateKeyValuePairRequest > ( ) ;
1142
1161
foreach ( var d in data )
@@ -1146,7 +1165,22 @@ public static void UpdateOneOrMoreKeyValuePairForAssetInstances(int assetId, Dic
1146
1165
createKeyValuePairRequest . storage = temp . ToArray ( ) ;
1147
1166
LootLockerAPIManager . UpdateOneOrMoreKeyValuePair ( request , createKeyValuePairRequest , onComplete ) ;
1148
1167
}
1149
-
1168
+ public static void UpdateKeyValuePairForAssetInstances ( int assetInstanceID , string key , string value , Action < LootLockerAssetDefaultResponse > onComplete )
1169
+ {
1170
+ if ( ! CheckInitialized ( ) )
1171
+ {
1172
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1173
+ return ;
1174
+ }
1175
+ LootLockerGetRequest request = new LootLockerGetRequest ( ) ;
1176
+ request . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1177
+ LootLockerUpdateOneOrMoreKeyValuePairRequest createKeyValuePairRequest = new LootLockerUpdateOneOrMoreKeyValuePairRequest ( ) ;
1178
+ List < LootLockerCreateKeyValuePairRequest > temp = new List < LootLockerCreateKeyValuePairRequest > ( ) ;
1179
+ temp . Add ( new LootLockerCreateKeyValuePairRequest { key = key , value = value } ) ;
1180
+ createKeyValuePairRequest . storage = temp . ToArray ( ) ;
1181
+ LootLockerAPIManager . UpdateOneOrMoreKeyValuePair ( request , createKeyValuePairRequest , onComplete ) ;
1182
+ }
1183
+ [ 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)" ) ]
1150
1184
public static void UpdateKeyValuePairByIdForAssetInstances ( int assetId , string key , string value , Action < LootLockerAssetDefaultResponse > onComplete )
1151
1185
{
1152
1186
if ( ! CheckInitialized ( ) )
@@ -1161,41 +1195,62 @@ public static void UpdateKeyValuePairByIdForAssetInstances(int assetId, string k
1161
1195
createKeyValuePairRequest . value = value ;
1162
1196
LootLockerAPIManager . UpdateKeyValuePairById ( data , createKeyValuePairRequest , onComplete ) ;
1163
1197
}
1198
+ public static void UpdateKeyValuePairByIdForAssetInstances ( int assetInstanceID , int keyValueID , string value , string key , Action < LootLockerAssetDefaultResponse > onComplete )
1199
+ {
1200
+ if ( ! CheckInitialized ( ) )
1201
+ {
1202
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1203
+ return ;
1204
+ }
1205
+ LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1206
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1207
+ data . getRequests . Add ( keyValueID . ToString ( ) ) ;
1208
+ LootLockerCreateKeyValuePairRequest createKeyValuePairRequest = new LootLockerCreateKeyValuePairRequest ( ) ;
1209
+ if ( key != null )
1210
+ {
1211
+ createKeyValuePairRequest . key = key ;
1212
+ }
1213
+ if ( value != null )
1214
+ {
1215
+ createKeyValuePairRequest . value = value ;
1216
+ }
1217
+ LootLockerAPIManager . UpdateKeyValuePairById ( data , createKeyValuePairRequest , onComplete ) ;
1218
+ }
1164
1219
1165
- public static void DeleteKeyValuePairForAssetInstances ( int assetId , int instanceId , Action < LootLockerAssetDefaultResponse > onComplete )
1220
+ public static void DeleteKeyValuePairForAssetInstances ( int assetInstanceID , int keyValueID , Action < LootLockerAssetDefaultResponse > onComplete )
1166
1221
{
1167
1222
if ( ! CheckInitialized ( ) )
1168
1223
{
1169
1224
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerAssetDefaultResponse > ( ) ) ;
1170
1225
return ;
1171
1226
}
1172
1227
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1173
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1174
- data . getRequests . Add ( instanceId . ToString ( ) ) ;
1228
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1229
+ data . getRequests . Add ( keyValueID . ToString ( ) ) ;
1175
1230
LootLockerAPIManager . DeleteKeyValuePair ( data , onComplete ) ;
1176
1231
}
1177
1232
1178
- public static void InspectALootBoxForAssetInstances ( int assetId , Action < LootLockerInspectALootBoxResponse > onComplete )
1233
+ public static void InspectALootBoxForAssetInstances ( int assetInstanceID , Action < LootLockerInspectALootBoxResponse > onComplete )
1179
1234
{
1180
1235
if ( ! CheckInitialized ( ) )
1181
1236
{
1182
1237
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerInspectALootBoxResponse > ( ) ) ;
1183
1238
return ;
1184
1239
}
1185
1240
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1186
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1241
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1187
1242
LootLockerAPIManager . InspectALootBox ( data , onComplete ) ;
1188
1243
}
1189
1244
1190
- public static void OpenALootBoxForAssetInstances ( int assetId , Action < LootLockerOpenLootBoxResponse > onComplete )
1245
+ public static void OpenALootBoxForAssetInstances ( int assetInstanceID , Action < LootLockerOpenLootBoxResponse > onComplete )
1191
1246
{
1192
1247
if ( ! CheckInitialized ( ) )
1193
1248
{
1194
1249
onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerOpenLootBoxResponse > ( ) ) ;
1195
1250
return ;
1196
1251
}
1197
1252
LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
1198
- data . getRequests . Add ( assetId . ToString ( ) ) ;
1253
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
1199
1254
LootLockerAPIManager . OpenALootBox ( data , onComplete ) ;
1200
1255
}
1201
1256
#endregion
0 commit comments