@@ -203,11 +203,9 @@ static void SetClothes(const v8::FunctionCallbackInfo<v8::Value>& info)
203
203
V8_CHECK_ARGS_LEN_MIN_MAX (3 , 4 );
204
204
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
205
205
206
- V8_ARG_TO_INT (1 , component);
207
- V8_ARG_TO_INT (2 , drawable);
208
- V8_ARG_TO_INT (3 , texture);
209
-
210
- V8_CHECK (component >= 0 && drawable >= 0 && texture >= 0 , " setClothes args have to be positive, -1 won't reset" );
206
+ V8_ARG_TO_UINT32 (1 , component);
207
+ V8_ARG_TO_UINT32 (2 , drawable);
208
+ V8_ARG_TO_UINT32 (3 , texture);
211
209
212
210
if (info.Length () == 3 )
213
211
{
@@ -227,11 +225,9 @@ static void SetDlcClothes(const v8::FunctionCallbackInfo<v8::Value>& info)
227
225
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
228
226
229
227
V8_ARG_TO_UINT32 (1 , dlc);
230
- V8_ARG_TO_INT (2 , component);
231
- V8_ARG_TO_INT (3 , drawable);
232
- V8_ARG_TO_INT (4 , texture);
233
-
234
- V8_CHECK (component >= 0 && drawable >= 0 && texture >= 0 , " setDlcClothes args have to be positive, -1 won't reset" );
228
+ V8_ARG_TO_UINT32 (2 , component);
229
+ V8_ARG_TO_UINT32 (3 , drawable);
230
+ V8_ARG_TO_UINT32 (4 , texture);
235
231
236
232
if (info.Length () == 4 )
237
233
{
@@ -250,7 +246,7 @@ static void GetClothes(const v8::FunctionCallbackInfo<v8::Value>& info)
250
246
V8_CHECK_ARGS_LEN (1 );
251
247
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
252
248
253
- V8_ARG_TO_INT (1 , component);
249
+ V8_ARG_TO_UINT32 (1 , component);
254
250
255
251
V8_NEW_OBJECT (clothes);
256
252
@@ -268,7 +264,7 @@ static void GetDlcClothes(const v8::FunctionCallbackInfo<v8::Value>& info)
268
264
V8_CHECK_ARGS_LEN (1 );
269
265
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
270
266
271
- V8_ARG_TO_INT (1 , component);
267
+ V8_ARG_TO_UINT32 (1 , component);
272
268
273
269
V8_NEW_OBJECT (clothes);
274
270
@@ -287,11 +283,9 @@ static void SetProps(const v8::FunctionCallbackInfo<v8::Value>& info)
287
283
V8_CHECK_ARGS_LEN (3 );
288
284
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
289
285
290
- V8_ARG_TO_INT (1 , component);
291
- V8_ARG_TO_INT (2 , drawable);
292
- V8_ARG_TO_INT (3 , texture);
293
-
294
- V8_CHECK (component >= 0 && drawable >= 0 && texture >= 0 , " setProp args have to be positive, -1 won't reset use clearProp" );
286
+ V8_ARG_TO_UINT32 (1 , component);
287
+ V8_ARG_TO_UINT32 (2 , drawable);
288
+ V8_ARG_TO_UINT32 (3 , texture);
295
289
296
290
player->SetProps (component, drawable, texture);
297
291
}
@@ -303,12 +297,10 @@ static void SetDlcProps(const v8::FunctionCallbackInfo<v8::Value>& info)
303
297
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
304
298
305
299
V8_ARG_TO_UINT32 (1 , dlc);
306
- V8_ARG_TO_INT (2 , component);
307
- V8_ARG_TO_INT (3 , drawable);
308
- V8_ARG_TO_INT (4 , texture);
300
+ V8_ARG_TO_UINT32 (2 , component);
301
+ V8_ARG_TO_UINT32 (3 , drawable);
302
+ V8_ARG_TO_UINT32 (4 , texture);
309
303
310
- V8_CHECK (component >= 0 && drawable >= 0 && texture >= 0 , " setDlcProp args have to be positive, -1 won't reset use clearProp" );
311
-
312
304
player->SetDlcProps (component, drawable, texture, dlc);
313
305
}
314
306
@@ -318,7 +310,7 @@ static void ClearProps(const v8::FunctionCallbackInfo<v8::Value>& info)
318
310
V8_CHECK_ARGS_LEN (1 );
319
311
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
320
312
321
- V8_ARG_TO_INT (1 , component);
313
+ V8_ARG_TO_UINT32 (1 , component);
322
314
323
315
player->ClearProps (component);
324
316
}
@@ -329,7 +321,7 @@ static void GetProps(const v8::FunctionCallbackInfo<v8::Value>& info)
329
321
V8_CHECK_ARGS_LEN (1 );
330
322
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
331
323
332
- V8_ARG_TO_INT (1 , component);
324
+ V8_ARG_TO_UINT32 (1 , component);
333
325
334
326
V8_NEW_OBJECT (prop);
335
327
@@ -346,7 +338,7 @@ static void GetDlcProps(const v8::FunctionCallbackInfo<v8::Value>& info)
346
338
V8_CHECK_ARGS_LEN (1 );
347
339
V8_GET_THIS_BASE_OBJECT (player, IPlayer);
348
340
349
- V8_ARG_TO_INT (1 , component);
341
+ V8_ARG_TO_UINT32 (1 , component);
350
342
351
343
V8_NEW_OBJECT (prop);
352
344
0 commit comments