forked from nlgxzef/NFSMWUnlimiter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FEShoppingCartItem.h
666 lines (662 loc) · 27.1 KB
/
FEShoppingCartItem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
#include "stdio.h"
#include "InGameFunctions.h"
int __fastcall FEShoppingCartItem_GetCarPartCatHash(DWORD* _this, int EDX_Unused, int CarSlotID)
{
int result;
switch (CarSlotID)
{
case 0:
result = bStringHash("CO_ROOF");
break;
case 23:
result = bStringHash("CO_BODY_KITS");
break;
case 24:
result = bStringHash("CO_BRAKES");
break;
case 28:
result = bStringHash("CO_INTERIOR");
break;
case 29:
result = bStringHash("CO_TAILLIGHTS");
break;
case 31:
result = bStringHash("CO_HEADLIGHTS");
break;
case 33:
result = bStringHash("CO_SIDE_MIRROR");
break;
case 43:
result = bStringHash("CO_DRIVER");
break;
case 44:
result = bStringHash("CO_SPOILERS");
break;
case 52:
result = bStringHash("CO_ATTACHMENT_1");
break;
case 53:
result = bStringHash("CO_ATTACHMENT_2");
break;
case 54:
result = bStringHash("CO_ATTACHMENT_3");
break;
case 55:
result = bStringHash("CO_ATTACHMENT_4");
break;
case 56:
result = bStringHash("CO_ATTACHMENT_5");
break;
case 57:
result = bStringHash("CO_ATTACHMENT_6");
break;
case 58:
result = bStringHash("CO_ATTACHMENT_7");
break;
case 59:
result = bStringHash("CO_ATTACHMENT_8");
break;
case 60:
result = bStringHash("CO_ATTACHMENT_9");
break;
case 61:
result = bStringHash("CO_ATTACHMENT_10");
break;
case 62:
result = bStringHash("CO_ROOF_SCOOPS");
break;
case 63:
result = bStringHash("CO_HOODS");
break;
case 64: // HEADLIGHT
result = bStringHash("CO_TIRES");
break;
case 66:
result = bStringHash("CO_RIMS");
break;
case 69:
result = bStringHash("CO_LICENSE_PLATE");
break;
case 76:
result = bStringHash("CO_PAINT");
break;
case 77:
result = bStringHash("CO_VINYLS");
break;
case 78:
result = bStringHash("CO_RIM_PAINT");
break;
case 83:
case 84:
case 85:
case 86:
case 87:
case 88:
case 89:
case 90:
result = bStringHash("CO_DECAL_WINDSHIELD");
break;
case 91:
case 92:
case 93:
case 94:
case 95:
case 96:
case 97:
case 98:
result = bStringHash("CO_DECAL_REAR_WINDOW");
break;
case 99:
case 100:
case 101:
case 102:
case 103:
case 104:
result = bStringHash("CO_DECAL_LEFT_DOOR");
break;
case 107:
case 108:
case 109:
case 110:
case 111:
case 112:
result = bStringHash("CO_DECAL_RIGHT_DOOR");
break;
case 113:
result = bStringHash("CO_NUMBERS");
break;
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
case 121:
case 122:
result = bStringHash("CO_DECAL_LEFT_QUARTER");
break;
case 123:
case 124:
case 125:
case 126:
case 127:
case 128:
case 129:
case 130:
result = bStringHash("CO_DECAL_RIGHT_QUARTER");
break;
case 131:
result = bStringHash("CO_WINDOW_TINT");
break;
case 132:
result = bStringHash("CO_CUSTOM_HUD");
break;
default:
result = 0;
break;
}
return result;
}
void __fastcall FEShoppingCartItem_DrawPartName(DWORD* FEShoppingCartItem)
{
int SelectablePart; // esi
int PerformancePartType; // ebx
int PerformancePartMaxLevel; // esi
int PerformancePartLevel; // esi
const char* PartMaterialName; // eax MAPDST
DWORD PaintTypeNameHash; // ebp
DWORD PaintBrandNameHash; // eax
DWORD SpeechColourNameHash; // eax MAPDST
int RightDoorNumberLeft; // ebx
int RightDoorNumberRight; // eax
DWORD* RightDoorNumberLeftPart; // ebp
DWORD* RightDoorNumberRightPart; // ebx
DWORD DecalSlotNameHash; // ebx
const char* Decals; // eax MAPDST
int PartNameBufLen; // eax
DWORD* CartItemName; // ebx MAPDST
DWORD CarSlotID; // esi MAPDST
DWORD PartCategoryNameHash; // eax MAPDST
const char* PartCategoryName; // eax MAPDST
DWORD* ThePartInCart; // ebx MAPDST
int CurrLanguage; // eax MAPDST
DWORD PartNameHash; // eax MAPDST
const char* PaintTypeName; // [esp-8h] [ebp-5Ch] MAPDST
const char* LeftNumberName; // [esp-8h] [ebp-5Ch] MAPDST
const char* DecalSlotName; // [esp-8h] [ebp-5Ch] MAPDST
const char* Junkman; // [esp-4h] [ebp-58h] MAPDST
const char* PartName; // [esp-4h] [ebp-58h] MAPDST
const char* SpeechColourName; // [esp-4h] [ebp-58h] MAPDST
const char* RightNumberName; // [esp-4h] [ebp-58h] MAPDST
DWORD StockHash; // [esp-4h] [ebp-58h]
const char* RemoveDecal; // [esp-4h] [ebp-58h] MAPDST
int InnerRadius; // [esp-4h] [ebp-58h] MAPDST
char PartNameBuf[64]; // [esp+14h] [ebp-40h] BYREF
SelectablePart = *(DWORD*)(*((DWORD*)FEShoppingCartItem + 21) + 12);
if (!*(BYTE*)(SelectablePart + 28))
{
switch (*(DWORD*)(SelectablePart + 16))
{
case 44:
case 62:
case 63:
ThePartInCart = *(DWORD**)(SelectablePart + 12);
if (!CarPart_HasAppliedAttribute(ThePartInCart, bStringHash("CARBONFIBRE")))
goto LABEL_68;
ThePartInCart = *(DWORD**)(SelectablePart + 12);
if (!CarPart_GetAppliedAttributeIParam(ThePartInCart, bStringHash("CARBONFIBRE"), 0))
goto LABEL_68;
CurrLanguage = GetCurrentLanguage();
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
if (CurrLanguage == 1)
{
PartNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("LANGUAGEHASH"), 0);
PartName = GetLocalizedString(PartNameHash);
PartMaterialName = GetLocalizedString(0x5415B874);// CARBON
goto LABEL_62;
}
PartNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("LANGUAGEHASH"), 0);
PartName = GetLocalizedString(PartNameHash);
PartMaterialName = GetLocalizedString(0x5415B874);// CARBON
goto LABEL_64;
case 66: // FRONT_WHEEL
ThePartInCart = *(DWORD**)(SelectablePart + 12);
if (ThePartInCart == CarCustomizeManager_GetStockCarPart((DWORD*)_gCarCustomizeManager, 66))
goto LABEL_66;
PartNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("LANGUAGEHASH"), 0);
if (PartNameHash) PartName = GetLocalizedString(PartNameHash);
else PartName = CarPart_GetName(*(DWORD**)(SelectablePart + 12));
bSNPrintf(PartNameBuf, 64, "%s", PartName);
PartNameBufLen = strlen(PartNameBuf);
if (PartNameBufLen > 0)
{
/*v84 = PartNameBufLen - 6;
if (!__OFSUB__(PartNameBufLen, PartNameBufLen - 6))// Cut last 6 chars
{
do
PartNameBuf[PartNameBufLen--] = 0;
while (PartNameBufLen >= v84);
}*/
CurrLanguage = GetCurrentLanguage();
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
if (CurrLanguage == 1)
{
InnerRadius = (char)CarPart_GetAppliedAttributeIParam(ThePartInCart, 0xEB0101E2, 0);// INNER_RADIUS
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s : %s %$d\"", PartCategoryName, PartNameBuf, InnerRadius);
}
else
{
InnerRadius = (char)CarPart_GetAppliedAttributeIParam(ThePartInCart, 0xEB0101E2, 0);// INNER_RADIUS
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s: %s %$d\"", PartCategoryName, PartNameBuf, InnerRadius);
}
}
return;
case 76: // BASE_PAINT
PaintTypeNameHash = 0x452B5481; // CP_FILTER_METALLIC
PaintBrandNameHash = CarPart_GetAppliedAttributeUParam(*(DWORD**)(SelectablePart + 12), 0xEBB03E66, 0);// BRAND_NAME
if (PaintBrandNameHash > 0x3437A52)
{
if (PaintBrandNameHash == 0x3797533)
PaintTypeNameHash = 0xB715070A;
}
else
{
switch (PaintBrandNameHash)
{
case 0x3437A52:
PaintTypeNameHash = 0x452B5481;
break;
case 0xDA27:
PaintTypeNameHash = 0xB3100A3E;
break;
case 0x2DAAB07:
PaintTypeNameHash = 0xB6763CDE;
break;
}
}
CurrLanguage = GetCurrentLanguage();
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CarSlotID = *(DWORD*)(SelectablePart + 16);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
if (CurrLanguage == 1)
{
SpeechColourNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("SPEECHCOLOUR"), 0);
SpeechColourName = GetLocalizedString(SpeechColourNameHash);
PaintTypeName = GetLocalizedString(PaintTypeNameHash);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s : %s %s", PartCategoryName, PaintTypeName, SpeechColourName);
}
else
{
SpeechColourNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("SPEECHCOLOUR"), 0);
SpeechColourName = GetLocalizedString(SpeechColourNameHash);
PaintTypeName = GetLocalizedString(PaintTypeNameHash);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s: %s %s", PartCategoryName, PaintTypeName, SpeechColourName);
}
return;
case 77: // VINYL_LAYER0
ThePartInCart = *(DWORD**)(SelectablePart + 12);
if (ThePartInCart)
goto LABEL_69;
LABEL_66:
CurrLanguage = GetCurrentLanguage();
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
StockHash = 0x60A662F5; // CO_RETURN_TO_STOCK
if (CurrLanguage != 1)
goto LABEL_67;
goto LABEL_33;
case 78: // PAINT_RIM
CurrLanguage = GetCurrentLanguage();
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
if (CurrLanguage == 1)
{
SpeechColourNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("SPEECHCOLOUR"), 0);
PartName = GetLocalizedString(SpeechColourNameHash);
PartMaterialName = GetLocalizedString(0xB3100A3E);// CP_FILTER_RIM
LABEL_62:
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s : %s %s", PartCategoryName, PartMaterialName, PartName);
}
else
{
SpeechColourNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("SPEECHCOLOUR"), 0);
PartName = GetLocalizedString(SpeechColourNameHash);
PartMaterialName = GetLocalizedString(0xB3100A3E);
LABEL_64:
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s: %s %s", PartCategoryName, PartMaterialName, PartName);
}
return;
case 83: // DECALS (83-130)
case 84:
case 85:
case 86:
case 87:
case 88:
case 89:
case 90:
case 91:
case 92:
case 93:
case 94:
case 95:
case 96:
case 97:
case 98:
case 99:
case 100:
case 101:
case 102:
case 103:
case 104:
case 107:
case 108:
case 109:
case 110:
case 111:
case 112:
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
case 121:
case 122:
case 123:
case 124:
case 125:
case 126:
case 127:
case 128:
case 129:
case 130:
ThePartInCart = *(DWORD**)(SelectablePart + 12);
if (ThePartInCart)
{
CarPart_GetAppliedAttributeUParam(ThePartInCart, 0xEBB03E66, 0);// BRAND_NAME
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("NAME"), 0);
switch (*(DWORD*)(SelectablePart + 16))
{
case 83:
case 91:
case 99:
case 107:
case 115:
case 123:
DecalSlotNameHash = bStringHash("CO_DECAL_SLOT_1");
goto LABEL_45;
case 84:
case 92:
case 100:
case 108:
case 116:
case 124:
DecalSlotNameHash = bStringHash("CO_DECAL_SLOT_2");
goto LABEL_45;
case 85:
case 93:
case 101:
case 109:
case 117:
case 125:
DecalSlotNameHash = bStringHash("CO_DECAL_SLOT_3");
goto LABEL_45;
case 86:
case 94:
case 102:
case 110:
case 118:
case 126:
DecalSlotNameHash = bStringHash("CO_DECAL_SLOT_4");
goto LABEL_45;
case 87:
case 95:
case 103:
case 111:
case 119:
case 127:
DecalSlotNameHash = bStringHash("CO_DECAL_SLOT_5");
goto LABEL_45;
case 88:
case 96:
case 104:
case 112:
case 120:
case 128:
DecalSlotNameHash = bStringHash("CO_DECAL_SLOT_6");
goto LABEL_45;
case 89:
case 97:
case 121:
case 129:
DecalSlotNameHash = bStringHash("CO_DECAL_SLOT_7");
goto LABEL_45;
case 90:
case 98:
case 122:
case 130:
DecalSlotNameHash = bStringHash("CO_DECAL_SLOT_8");
//goto LABEL_45;
LABEL_45:
CurrLanguage = GetCurrentLanguage();
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
if (CurrLanguage == 1)
{
PartName = CarPart_GetName(ThePartInCart);
DecalSlotName = GetLocalizedString(DecalSlotNameHash);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
Decals = GetLocalizedString(0x955980BC);// CO_DECALS
FEPrintf_obj(CartItemName, "%s : %s %s %s", Decals, PartCategoryName, DecalSlotName, PartName);
}
else
{
PartName = CarPart_GetName(ThePartInCart);
DecalSlotName = GetLocalizedString(DecalSlotNameHash);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
Decals = GetLocalizedString(0x955980BC);
FEPrintf_obj(CartItemName, "%s: %s %s %s", Decals, PartCategoryName, DecalSlotName, PartName);
}
break;
default:
CurrLanguage = GetCurrentLanguage();
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
if (CurrLanguage == 1)
{
PartName = CarPart_GetName(ThePartInCart);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
Decals = GetLocalizedString(0x955980BC);
FEPrintf_obj(CartItemName, "%s : %s %s", Decals, PartCategoryName, PartName);
}
else
{
PartName = CarPart_GetName(ThePartInCart);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
Decals = GetLocalizedString(0x955980BC);
FEPrintf_obj(CartItemName, "%s: %s %s", Decals, PartCategoryName, PartName);
}
break;
}
}
else
{
CurrLanguage = GetCurrentLanguage();
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
if (CurrLanguage == 1)
{
RemoveDecal = GetLocalizedString(0x7177DC17);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
Decals = GetLocalizedString(0x955980BC);
FEPrintf_obj(CartItemName, "%s : %s - %s", Decals, PartCategoryName, RemoveDecal);
}
else
{
RemoveDecal = GetLocalizedString(0x7177DC17);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
Decals = GetLocalizedString(0x955980BC);
FEPrintf_obj(CartItemName, "%s: %s - %s", Decals, PartCategoryName, RemoveDecal);
}
}
return;
case 113:
RightDoorNumberLeft = CarCustomizeManager_IsPartTypeInCart_ID((DWORD*)_gCarCustomizeManager, 113);
RightDoorNumberRight = CarCustomizeManager_IsPartTypeInCart_ID((DWORD*)_gCarCustomizeManager, 114);
if (!RightDoorNumberLeft || !RightDoorNumberRight)
return;
RightDoorNumberLeftPart = *(DWORD**)(*(DWORD*)(RightDoorNumberLeft + 12) + 12);
RightDoorNumberRightPart = *(DWORD**)(*(DWORD*)(RightDoorNumberRight + 12) + 12);
if (RightDoorNumberLeftPart && RightDoorNumberRightPart)
{
CurrLanguage = GetCurrentLanguage();
CarSlotID = *(DWORD*)(SelectablePart + 16);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
if (CurrLanguage == 1)
{
RightNumberName = CarPart_GetName(RightDoorNumberRightPart);
LeftNumberName = CarPart_GetName(RightDoorNumberLeftPart);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s : %s%s", PartCategoryName, LeftNumberName, RightNumberName);
}
else
{
RightNumberName = CarPart_GetName(RightDoorNumberRightPart);
LeftNumberName = CarPart_GetName(RightDoorNumberLeftPart);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s: %s%s", PartCategoryName, LeftNumberName, RightNumberName);
}
return;
}
CurrLanguage = GetCurrentLanguage();
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
StockHash = 0xBE434A38; // CN_REMOVE_NUMBERS
if (CurrLanguage == 1)
{
LABEL_33:
PartName = GetLocalizedString(StockHash);
goto LABEL_76;
}
LABEL_67:
PartName = GetLocalizedString(StockHash);
goto LABEL_78;
default:
LABEL_68:
ThePartInCart = *(DWORD**)(SelectablePart + 12);
LABEL_69:
if (!CarPart_HasAppliedAttribute(ThePartInCart, bStringHash("LANGUAGEHASH")))
{
CurrLanguage = GetCurrentLanguage();
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
if (CurrLanguage == 1)
{
PartName = CarPart_GetName(ThePartInCart);
LABEL_76:
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s : %s", PartCategoryName, PartName);
}
else
{
PartName = CarPart_GetName(ThePartInCart);
LABEL_78:
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s: %s", PartCategoryName, PartName);
}
return;
}
CurrLanguage = GetCurrentLanguage();
ThePartInCart = *(DWORD**)(SelectablePart + 12);
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
CarSlotID = *(DWORD*)(SelectablePart + 16);
if (CurrLanguage == 1)
{
PartNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("LANGUAGEHASH"), 0);
PartName = GetLocalizedString(PartNameHash);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s : %s", PartCategoryName, PartName);
return;
}
PartNameHash = CarPart_GetAppliedAttributeUParam(ThePartInCart, bStringHash("LANGUAGEHASH"), 0);
PartName = GetLocalizedString(PartNameHash);
PartCategoryNameHash = FEShoppingCartItem_GetCarPartCatHash(FEShoppingCartItem, 0, CarSlotID);
break;
}
PrintPartName:
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s: %s", PartCategoryName, PartName);
return;
}
PerformancePartType = *(DWORD*)(SelectablePart + 24);
PerformancePartMaxLevel = *(DWORD*)(SelectablePart + 20);
if (PerformancePartMaxLevel != 7)
{
PerformancePartLevel = PerformancePartMaxLevel
- Physics_Upgrades_GetMaxLevel((DWORD*)(_FECarRecord + 4), PerformancePartType)
+ 6;
CurrLanguage = GetCurrentLanguage();
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
if (CurrLanguage == 1)
{
PartNameHash = FEShoppingCartItem_GetPerfPkgLevelHash(FEShoppingCartItem, PerformancePartLevel);
PartName = GetLocalizedString(PartNameHash);
PartCategoryNameHash = FEShoppingCartItem_GetPerfPkgCatHash(FEShoppingCartItem, PerformancePartType);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s : %s", PartCategoryName, PartName);
return;
}
PartNameHash = FEShoppingCartItem_GetPerfPkgLevelHash(FEShoppingCartItem, PerformancePartLevel);
PartName = GetLocalizedString(PartNameHash);
PartCategoryNameHash = FEShoppingCartItem_GetPerfPkgCatHash(FEShoppingCartItem, PerformancePartType);
goto PrintPartName;
}
CurrLanguage = GetCurrentLanguage();
CartItemName = *((DWORD**)FEShoppingCartItem + 11);
if (CurrLanguage == 1)
{
Junkman = GetLocalizedString(0xEDD14807); // PN_LEVEL_JUNKMAN
PartCategoryNameHash = FEShoppingCartItem_GetPerfPkgCatHash(FEShoppingCartItem, PerformancePartType);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s : %s", PartCategoryName, Junkman);
}
else
{
Junkman = GetLocalizedString(0xEDD14807); // PN_LEVEL_JUNKMAN
PartCategoryNameHash = FEShoppingCartItem_GetPerfPkgCatHash(FEShoppingCartItem, PerformancePartType);
PartCategoryName = GetLocalizedString(PartCategoryNameHash);
FEPrintf_obj(CartItemName, "%s: %s", PartCategoryName, Junkman);
}
}