comparison Player.cpp @ 1690:95118ff8cc22

Player::_48DCF6 label removal
author Grumpy7
date Sun, 22 Sep 2013 07:57:16 +0200
parents 133a5f62bc8c
children 1c880907575f
comparison
equal deleted inserted replaced
1689:133a5f62bc8c 1690:95118ff8cc22
2270 //----- (0048DCF6) -------------------------------------------------------- 2270 //----- (0048DCF6) --------------------------------------------------------
2271 int Player::_48DCF6(int a2, Actor *pActor) //TODO check this with IDA to see what the uninitialized vars are supposed to contain 2271 int Player::_48DCF6(int a2, Actor *pActor) //TODO check this with IDA to see what the uninitialized vars are supposed to contain
2272 { 2272 {
2273 signed int v3; // edi@1 2273 signed int v3; // edi@1
2274 signed int v4; // ebx@1 2274 signed int v4; // ebx@1
2275 Player *v5; // esi@1
2276 int v6; // eax@2 2275 int v6; // eax@2
2277 int v7; // eax@5 2276 int v7; // eax@5
2278 int v8; // eax@8 2277 int v8; // eax@8
2279 int v9; // ebx@8 2278 int v9; // ebx@8
2280 int v10; // eax@8 2279 int v10; // eax@8
2316 unsigned int v47; // [sp+98h] [bp-8h]@1 2315 unsigned int v47; // [sp+98h] [bp-8h]@1
2317 int v48; // [sp+9Ch] [bp-4h]@1 2316 int v48; // [sp+9Ch] [bp-4h]@1
2318 2317
2319 v3 = 0; 2318 v3 = 0;
2320 v4 = 0; 2319 v4 = 0;
2321 v5 = this;
2322 v47 = 0; 2320 v47 = 0;
2323 v48 = 0; 2321 v48 = 0;
2324 switch ( a2 ) 2322 switch ( a2 )
2325 { 2323 {
2326 case 1: 2324 case 1:
2327 v6 = GetActualWillpower(); 2325 v6 = GetActualWillpower();
2328 goto LABEL_46; 2326 v7 = GetParameterBonus(v6);
2327 v11 = v7;
2328 break;
2329 case 2: 2329 case 2:
2330 case 3: 2330 case 3:
2331 case 4: 2331 case 4:
2332 case 9: 2332 case 9:
2333 case 10: 2333 case 10:
2334 case 11: 2334 case 11:
2335 case 13: 2335 case 13:
2336 case 21: 2336 case 21:
2337 v6 = GetActualEndurance(); 2337 v6 = GetActualEndurance();
2338 goto LABEL_46; 2338 v7 = GetParameterBonus(v6);
2339 v11 = v7;
2340 break;
2339 case 5: 2341 case 5:
2340 case 12: 2342 case 12:
2341 case 23: 2343 case 23:
2342 v40 = (CHARACTER_ATTRIBUTE_TYPE)14; 2344 v40 = (CHARACTER_ATTRIBUTE_TYPE)14;
2343 goto LABEL_5; 2345 v7 = GetActualResistance(v40);
2346 v11 = v7;
2347 break;
2344 case 15: 2348 case 15:
2345 v40 = (CHARACTER_ATTRIBUTE_TYPE)13; 2349 v40 = (CHARACTER_ATTRIBUTE_TYPE)13;
2346 goto LABEL_5; 2350 v7 = GetActualResistance(v40);
2351 v11 = v7;
2352 break;
2347 case 6: 2353 case 6:
2348 case 7: 2354 case 7:
2349 case 8: 2355 case 8:
2350 case 14: 2356 case 14:
2351 case 16: 2357 case 16:
2352 v40 = (CHARACTER_ATTRIBUTE_TYPE)15; 2358 v40 = (CHARACTER_ATTRIBUTE_TYPE)15;
2353 LABEL_5:
2354 v7 = GetActualResistance(v40); 2359 v7 = GetActualResistance(v40);
2355 goto LABEL_47; 2360 v11 = v7;
2361 break;
2356 case 22: 2362 case 22:
2357 v8 = GetActualWillpower(); 2363 v8 = GetActualWillpower();
2358 v9 = GetParameterBonus(v8); 2364 v9 = GetParameterBonus(v8);
2359 v10 = GetActualIntelligence(); 2365 v10 = GetActualIntelligence();
2360 v11 = (GetParameterBonus(v10) + v9) >> 1; 2366 v11 = (GetParameterBonus(v10) + v9) >> 1;
2368 v46[v4++] = v12; 2374 v46[v4++] = v12;
2369 ++v12; 2375 ++v12;
2370 ++v13; 2376 ++v13;
2371 } 2377 }
2372 while ( v12 < 138 ); 2378 while ( v12 < 138 );
2373 goto LABEL_36; 2379 if ( !v4 )
2380 return 0;
2381 v48 = (int)&this->pInventoryItemList[(unsigned __int8)v46[rand() % v4]];
2382 v11 = 3 * (pItemsTable->pItems[*(int *)v48].uMaterial + pItemsTable->pItems[*(int *)v48].uDamageMod);
2383 break;
2374 case 18: 2384 case 18:
2375 v14 = 0; 2385 v14 = 0;
2376 do 2386 do
2377 { 2387 {
2378 if ( HasItemEquipped((ITEM_EQUIP_TYPE)v14) ) 2388 if ( HasItemEquipped((ITEM_EQUIP_TYPE)v14) )
2379 { 2389 {
2380 if ( v14 == EQUIP_ARMOUR ) 2390 if ( v14 == EQUIP_ARMOUR )
2381 v46[v4++] = LOBYTE(v5->pEquipment.uArmor) - 1; 2391 v46[v4++] = LOBYTE(this->pEquipment.uArmor) - 1;
2382 if ( (!v14 || v14 == 1) && GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v14) == 4 ) 2392 if ( (!v14 || v14 == 1) && GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v14) == 4 )
2383 v46[v4++] = *((char *)&v5->pEquipment.uShield + 4 * v14) - 1; 2393 v46[v4++] = *((char *)&this->pEquipment.uShield + 4 * v14) - 1;
2384 } 2394 }
2385 v14++; 2395 v14++;
2386 } 2396 }
2387 while ( v14 < 16 ); 2397 while ( v14 < 16 );
2388 goto LABEL_36; 2398 if ( !v4 )
2399 return 0;
2400 v48 = (int)&this->pInventoryItemList[(unsigned __int8)v46[rand() % v4]];
2401 v11 = 3 * (pItemsTable->pItems[*(int *)v48].uMaterial + pItemsTable->pItems[*(int *)v48].uDamageMod);
2402 break;
2389 case 19: 2403 case 19:
2390 v16 = 0; 2404 v16 = 0;
2391 do 2405 do
2392 { 2406 {
2393 if ( HasItemEquipped((ITEM_EQUIP_TYPE)v16) ) 2407 if ( HasItemEquipped((ITEM_EQUIP_TYPE)v16) )
2394 { 2408 {
2395 if ( v16 == 2 ) 2409 if ( v16 == 2 )
2396 v46[v4++] = LOBYTE(v5->pEquipment.uBow) - 1; 2410 v46[v4++] = LOBYTE(this->pEquipment.uBow) - 1;
2397 if ( (!v16 || v16 == 1) 2411 if ( (!v16 || v16 == 1)
2398 && (!GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v16) || GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v16) == 1) ) 2412 && (!GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v16) || GetEquippedItemEquipType((ITEM_EQUIP_TYPE)v16) == 1) )
2399 v46[v4++] = *((char *)&v5->pEquipment.uShield + 4 * v16) - 1; 2413 v46[v4++] = *((char *)&this->pEquipment.uShield + 4 * v16) - 1;
2400 } 2414 }
2401 v16++; 2415 v16++;
2402 } 2416 }
2403 while ( v16 < 16 ); 2417 while ( v16 < 16 );
2404 LABEL_36:
2405 if ( !v4 ) 2418 if ( !v4 )
2406 goto LABEL_87; 2419 return 0;
2407 v48 = (int)&v5->pInventoryItemList[(unsigned __int8)v46[rand() % v4]]; 2420 v48 = (int)&this->pInventoryItemList[(unsigned __int8)v46[rand() % v4]];
2408 v11 = 3 * (pItemsTable->pItems[*(int *)v48].uMaterial + pItemsTable->pItems[*(int *)v48].uDamageMod); 2421 v11 = 3 * (pItemsTable->pItems[*(int *)v48].uMaterial + pItemsTable->pItems[*(int *)v48].uDamageMod);
2409 break; 2422 break;
2410 case 20: 2423 case 20:
2411 v19 = 0; 2424 v19 = 0;
2412 v20 = this->pInventoryMatrix; 2425 v20 = this->pInventoryMatrix;
2413 do 2426 do
2414 { 2427 {
2415 if ( *v20 > 0 ) 2428 if ( *v20 > 0 )
2416 { 2429 {
2417 v21 = *(int *)&v5->pInventoryItemList[*v20-1]; 2430 v21 = *(int *)&this->pInventoryItemList[*v20-1];
2418 if ( v21 > 0 ) 2431 if ( v21 > 0 )
2419 { 2432 {
2420 if ( v21 <= 134 ) 2433 if ( v21 <= 134 )
2421 v46[v4++] = v19; 2434 v46[v4++] = v19;
2422 } 2435 }
2424 ++v19; 2437 ++v19;
2425 ++v20; 2438 ++v20;
2426 } 2439 }
2427 while ( v19 < 126 ); 2440 while ( v19 < 126 );
2428 if ( !v4 ) 2441 if ( !v4 )
2429 goto LABEL_87; 2442 return 0;
2430 v47 = (unsigned __int8)v46[rand() % v4]; 2443 v47 = (unsigned __int8)v46[rand() % v4];
2431 v6 = GetActualAccuracy(); 2444 v6 = GetActualAccuracy();
2432 LABEL_46:
2433 v7 = GetParameterBonus(v6); 2445 v7 = GetParameterBonus(v6);
2434 LABEL_47:
2435 v11 = v7; 2446 v11 = v7;
2436 break; 2447 break;
2437 default: 2448 default:
2438 v11 = 0; 2449 v11 = 0;
2439 break; 2450 break;
2440 } 2451 }
2441 v22 = GetActualLuck(); 2452 v22 = GetActualLuck();
2442 v23 = GetParameterBonus(v22) + v11 + 30; 2453 v23 = GetParameterBonus(v22) + v11 + 30;
2443 if ( rand() % v23 >= 30 ) 2454 if ( rand() % v23 >= 30 )
2444 { 2455 {
2445 LABEL_87: 2456 return 0;
2446 result = 0;
2447 } 2457 }
2448 else 2458 else
2449 { 2459 {
2450 switch ( a2 ) 2460 switch ( a2 )
2451 { 2461 {
2452 case 1: 2462 case 1:
2453 v41 = 1; 2463 v41 = 1;
2454 v36 = 0; 2464 v36 = 0;
2455 goto LABEL_56;
2456 case 2:
2457 v41 = 1;
2458 v36 = 1;
2459 goto LABEL_56;
2460 case 3:
2461 v41 = 1;
2462 v36 = 2;
2463 goto LABEL_56;
2464 case 23:
2465 v41 = 1;
2466 v36 = 3;
2467 goto LABEL_56;
2468 case 4:
2469 v41 = 1;
2470 v36 = 4;
2471 LABEL_56:
2472 SetCondition(v36, v41); 2465 SetCondition(v36, v41);
2473 v42 = 0; 2466 v42 = 0;
2474 v37 = 0; 2467 v37 = 0;
2475 v35 = 0; 2468 v35 = 0;
2476 v34 = 0; 2469 v34 = 0;
2477 v33 = -1; 2470 v33 = -1;
2478 v32 = 0; 2471 v32 = 0;
2479 v31 = 0; 2472 v31 = 0;
2480 v30 = (SoundID)221; 2473 v30 = (SoundID)221;
2481 goto LABEL_83; 2474 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2475 do
2476 {
2477 if ( this == pPlayers[v3 + 1] )
2478 break;
2479 ++v3;
2480 }
2481 while ( v3 < 4 );
2482 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2483 return 1;
2484 break;
2485 case 2:
2486 v41 = 1;
2487 v36 = 1;
2488 SetCondition(v36, v41);
2489 v42 = 0;
2490 v37 = 0;
2491 v35 = 0;
2492 v34 = 0;
2493 v33 = -1;
2494 v32 = 0;
2495 v31 = 0;
2496 v30 = (SoundID)221;
2497 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2498 do
2499 {
2500 if ( this == pPlayers[v3 + 1] )
2501 break;
2502 ++v3;
2503 }
2504 while ( v3 < 4 );
2505 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2506 return 1;
2507 break;
2508 case 3:
2509 v41 = 1;
2510 v36 = 2;
2511 SetCondition(v36, v41);
2512 v42 = 0;
2513 v37 = 0;
2514 v35 = 0;
2515 v34 = 0;
2516 v33 = -1;
2517 v32 = 0;
2518 v31 = 0;
2519 v30 = (SoundID)221;
2520 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2521 do
2522 {
2523 if ( this == pPlayers[v3 + 1] )
2524 break;
2525 ++v3;
2526 }
2527 while ( v3 < 4 );
2528 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2529 return 1;
2530 break;
2531 case 23:
2532 v41 = 1;
2533 v36 = 3;
2534 SetCondition(v36, v41);
2535 v42 = 0;
2536 v37 = 0;
2537 v35 = 0;
2538 v34 = 0;
2539 v33 = -1;
2540 v32 = 0;
2541 v31 = 0;
2542 v30 = (SoundID)221;
2543 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2544 do
2545 {
2546 if ( this == pPlayers[v3 + 1] )
2547 break;
2548 ++v3;
2549 }
2550 while ( v3 < 4 );
2551 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2552 return 1;
2553 break;
2554 case 4:
2555 v41 = 1;
2556 v36 = 4;
2557 SetCondition(v36, v41);
2558 v42 = 0;
2559 v37 = 0;
2560 v35 = 0;
2561 v34 = 0;
2562 v33 = -1;
2563 v32 = 0;
2564 v31 = 0;
2565 v30 = (SoundID)221;
2566 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2567 do
2568 {
2569 if ( this == pPlayers[v3 + 1] )
2570 break;
2571 ++v3;
2572 }
2573 while ( v3 < 4 );
2574 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2575 return 1;
2576 break;
2482 case 5: 2577 case 5:
2483 v43 = 1; 2578 v43 = 1;
2484 v38 = 5; 2579 v38 = 5;
2485 goto LABEL_70; 2580 SetCondition(v38, v43);
2581 v42 = 0;
2582 v37 = 0;
2583 v35 = 0;
2584 v34 = 0;
2585 v33 = -1;
2586 v32 = 0;
2587 v31 = 0;
2588 v30 = (SoundID)224;
2589 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2590 do
2591 {
2592 if ( this == pPlayers[v3 + 1] )
2593 break;
2594 ++v3;
2595 }
2596 while ( v3 < 4 );
2597 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2598 return 1;
2599 break;
2486 case 6: 2600 case 6:
2487 case 7: 2601 case 7:
2488 case 8: 2602 case 8:
2489 if ( a2 == 6 ) 2603 if ( a2 == 6 )
2490 { 2604 {
2491 v44 = 6; 2605 v44 = 6;
2492 goto LABEL_60; 2606 v24 = v44;
2607 SetCondition(v24, 1);
2608 v42 = 0;
2609 v37 = 0;
2610 v35 = 0;
2611 v34 = 0;
2612 v33 = -1;
2613 v32 = 0;
2614 v31 = 0;
2615 v30 = (SoundID)222;
2616 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2617 do
2618 {
2619 if ( this == pPlayers[v3 + 1] )
2620 break;
2621 ++v3;
2622 }
2623 while ( v3 < 4 );
2624 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2625 return 1;
2626 break;
2493 } 2627 }
2494 v25 = 2 * (a2 != 8) + 8; 2628 v25 = 2 * (a2 != 8) + 8;
2495 goto LABEL_65; 2629 v24 = v25;
2630 SetCondition(v24, 1);
2631 v42 = 0;
2632 v37 = 0;
2633 v35 = 0;
2634 v34 = 0;
2635 v33 = -1;
2636 v32 = 0;
2637 v31 = 0;
2638 v30 = (SoundID)222;
2639 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2640 do
2641 {
2642 if ( this == pPlayers[v3 + 1] )
2643 break;
2644 ++v3;
2645 }
2646 while ( v3 < 4 );
2647 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2648 return 1;
2649 break;
2496 case 9: 2650 case 9:
2497 if ( a2 == 6 ) 2651 if ( a2 == 6 )
2498 { 2652 {
2499 v44 = 7; 2653 v44 = 7;
2500 LABEL_60:
2501 v24 = v44; 2654 v24 = v44;
2502 } 2655 }
2503 else 2656 else
2504 { 2657 {
2505 v25 = 2 * (a2 != 8) + 9; 2658 v25 = 2 * (a2 != 8) + 9;
2506 LABEL_65:
2507 v24 = v25; 2659 v24 = v25;
2508 } 2660 }
2509 SetCondition(v24, 1); 2661 SetCondition(v24, 1);
2510 v42 = 0; 2662 v42 = 0;
2511 v37 = 0; 2663 v37 = 0;
2513 v34 = 0; 2665 v34 = 0;
2514 v33 = -1; 2666 v33 = -1;
2515 v32 = 0; 2667 v32 = 0;
2516 v31 = 0; 2668 v31 = 0;
2517 v30 = (SoundID)222; 2669 v30 = (SoundID)222;
2518 LABEL_83:
2519 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42); 2670 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2520 do 2671 do
2521 { 2672 {
2522 LABEL_84: 2673 if ( this == pPlayers[v3 + 1] )
2523 if ( v5 == pPlayers[v3 + 1] )
2524 break; 2674 break;
2525 ++v3; 2675 ++v3;
2526 } 2676 }
2527 while ( v3 < 4 ); 2677 while ( v3 < 4 );
2528 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3); 2678 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2529 result = 1; 2679 return 1;
2530 break; 2680 break;
2531 case 12: 2681 case 12:
2532 v43 = 1; 2682 v43 = 1;
2533 v38 = 12; 2683 v38 = 12;
2534 goto LABEL_70;
2535 case 15:
2536 v45 = 1;
2537 v39 = 15;
2538 goto LABEL_73;
2539 case 13:
2540 v43 = 1;
2541 v38 = 13;
2542 LABEL_70:
2543 SetCondition(v38, v43); 2684 SetCondition(v38, v43);
2544 v42 = 0; 2685 v42 = 0;
2545 v37 = 0; 2686 v37 = 0;
2546 v35 = 0; 2687 v35 = 0;
2547 v34 = 0; 2688 v34 = 0;
2548 v33 = -1; 2689 v33 = -1;
2549 v32 = 0; 2690 v32 = 0;
2550 v31 = 0; 2691 v31 = 0;
2551 v30 = (SoundID)224; 2692 v30 = (SoundID)224;
2552 goto LABEL_83; 2693 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2553 case 14: 2694 do
2695 {
2696 if ( this == pPlayers[v3 + 1] )
2697 break;
2698 ++v3;
2699 }
2700 while ( v3 < 4 );
2701 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2702 return 1;
2703 break;
2704 case 15:
2554 v45 = 1; 2705 v45 = 1;
2555 v39 = 14; 2706 v39 = 15;
2556 goto LABEL_73;
2557 case 16:
2558 v45 = 1;
2559 v39 = 16;
2560 LABEL_73:
2561 SetCondition(v39, v45); 2707 SetCondition(v39, v45);
2562 v42 = 0; 2708 v42 = 0;
2563 v37 = 0; 2709 v37 = 0;
2564 v35 = 0; 2710 v35 = 0;
2565 v34 = 0; 2711 v34 = 0;
2566 v33 = -1; 2712 v33 = -1;
2567 v32 = 0; 2713 v32 = 0;
2568 v31 = 0; 2714 v31 = 0;
2569 v30 = (SoundID)225; 2715 v30 = (SoundID)225;
2570 goto LABEL_83; 2716 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2717 do
2718 {
2719 if ( this == pPlayers[v3 + 1] )
2720 break;
2721 ++v3;
2722 }
2723 while ( v3 < 4 );
2724 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2725 return 1;
2726 break;
2727 case 13:
2728 v43 = 1;
2729 v38 = 13;
2730 SetCondition(v38, v43);
2731 v42 = 0;
2732 v37 = 0;
2733 v35 = 0;
2734 v34 = 0;
2735 v33 = -1;
2736 v32 = 0;
2737 v31 = 0;
2738 v30 = (SoundID)224;
2739 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2740 do
2741 {
2742 if ( this == pPlayers[v3 + 1] )
2743 break;
2744 ++v3;
2745 }
2746 while ( v3 < 4 );
2747 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2748 return 1;
2749 break;
2750 case 14:
2751 v45 = 1;
2752 v39 = 14;
2753 SetCondition(v39, v45);
2754 v42 = 0;
2755 v37 = 0;
2756 v35 = 0;
2757 v34 = 0;
2758 v33 = -1;
2759 v32 = 0;
2760 v31 = 0;
2761 v30 = (SoundID)225;
2762 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2763 do
2764 {
2765 if ( this == pPlayers[v3 + 1] )
2766 break;
2767 ++v3;
2768 }
2769 while ( v3 < 4 );
2770 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2771 return 1;
2772 break;
2773 case 16:
2774 v45 = 1;
2775 v39 = 16;
2776 SetCondition(v39, v45);
2777 v42 = 0;
2778 v37 = 0;
2779 v35 = 0;
2780 v34 = 0;
2781 v33 = -1;
2782 v32 = 0;
2783 v31 = 0;
2784 v30 = (SoundID)225;
2785 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2786 do
2787 {
2788 if ( this == pPlayers[v3 + 1] )
2789 break;
2790 ++v3;
2791 }
2792 while ( v3 < 4 );
2793 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2794 return 1;
2795 break;
2571 case 17: 2796 case 17:
2572 case 18: 2797 case 18:
2573 case 19: 2798 case 19:
2574 v26 = v48; 2799 v26 = v48;
2575 if ( *(char *)(v48 + 21) & 2 ) 2800 if ( *(char *)(v48 + 21) & 2 )
2576 goto LABEL_84; 2801 {
2802 do
2803 {
2804 if ( this == pPlayers[v3 + 1] )
2805 break;
2806 ++v3;
2807 }
2808 while ( v3 < 4 );
2809 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2810 return 1;
2811 }
2577 PlaySound(SPEECH_40, 0); 2812 PlaySound(SPEECH_40, 0);
2578 *(int *)(v26 + 20) |= 2u; 2813 *(int *)(v26 + 20) |= 2u;
2579 goto LABEL_79;
2580 case 20:
2581 PlaySound(SPEECH_40, 0);
2582 v27 = pActor->array_000234;
2583 if ( pActor->array_000234[0].uItemID )
2584 {
2585 v27 = &pActor->array_000234[1];
2586 if ( pActor->array_000234[1].uItemID )
2587 goto LABEL_84;
2588 }
2589 v28 = v47;
2590 memcpy(v27, &v5->pInventoryItemList[v5->pInventoryMatrix[v47]-1], 0x24u);
2591 RemoveItemAtInventoryIndex(v28);
2592 LABEL_79:
2593 v42 = 0; 2814 v42 = 0;
2594 v37 = 0; 2815 v37 = 0;
2595 v35 = 0; 2816 v35 = 0;
2596 v34 = 0; 2817 v34 = 0;
2597 v33 = -1; 2818 v33 = -1;
2598 v32 = 0; 2819 v32 = 0;
2599 v31 = 0; 2820 v31 = 0;
2600 v30 = (SoundID)47; 2821 v30 = (SoundID)47;
2601 goto LABEL_83; 2822 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2823 do
2824 {
2825 if ( this == pPlayers[v3 + 1] )
2826 break;
2827 ++v3;
2828 }
2829 while ( v3 < 4 );
2830 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2831 return 1;
2832 break;
2833 case 20:
2834 PlaySound(SPEECH_40, 0);
2835 v27 = pActor->array_000234;
2836 if ( pActor->array_000234[0].uItemID )
2837 {
2838 v27 = &pActor->array_000234[1];
2839 if ( pActor->array_000234[1].uItemID )
2840 {
2841 do
2842 {
2843 if ( this == pPlayers[v3 + 1] )
2844 break;
2845 ++v3;
2846 }
2847 while ( v3 < 4 );
2848 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2849 return 1;
2850 }
2851 }
2852 v28 = v47;
2853 memcpy(v27, &this->pInventoryItemList[this->pInventoryMatrix[v47]-1], 0x24u);
2854 RemoveItemAtInventoryIndex(v28);
2855 v42 = 0;
2856 v37 = 0;
2857 v35 = 0;
2858 v34 = 0;
2859 v33 = -1;
2860 v32 = 0;
2861 v31 = 0;
2862 v30 = (SoundID)47;
2863 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2864 do
2865 {
2866 if ( this == pPlayers[v3 + 1] )
2867 break;
2868 ++v3;
2869 }
2870 while ( v3 < 4 );
2871 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2872 return 1;
2873 break;
2602 case 21: 2874 case 21:
2603 PlaySound(SPEECH_42, 0); 2875 PlaySound(SPEECH_42, 0);
2604 ++v5->sAgeModifier; 2876 ++this->sAgeModifier;
2605 goto LABEL_82;
2606 case 22:
2607 PlaySound(SPEECH_41, 0);
2608 v5->sMana = 0;
2609 LABEL_82:
2610 v42 = 0; 2877 v42 = 0;
2611 v37 = 0; 2878 v37 = 0;
2612 v35 = 0; 2879 v35 = 0;
2613 v34 = 0; 2880 v34 = 0;
2614 v33 = -1; 2881 v33 = -1;
2615 v32 = 0; 2882 v32 = 0;
2616 v31 = 0; 2883 v31 = 0;
2617 v30 = (SoundID)226; 2884 v30 = (SoundID)226;
2618 goto LABEL_83; 2885 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2886 do
2887 {
2888 if ( this == pPlayers[v3 + 1] )
2889 break;
2890 ++v3;
2891 }
2892 while ( v3 < 4 );
2893 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2894 return 1;
2895 break;
2896 case 22:
2897 PlaySound(SPEECH_41, 0);
2898 this->sMana = 0;
2899 v42 = 0;
2900 v37 = 0;
2901 v35 = 0;
2902 v34 = 0;
2903 v33 = -1;
2904 v32 = 0;
2905 v31 = 0;
2906 v30 = (SoundID)226;
2907 pAudioPlayer->PlaySound(v30, v31, v32, v33, v34, v35, v37, v42);
2908 do
2909 {
2910 if ( this == pPlayers[v3 + 1] )
2911 break;
2912 ++v3;
2913 }
2914 while ( v3 < 4 );
2915 pGame->pStru6Instance->SetPlayerBuffAnim(0x99u, v3);
2916 return 1;
2917 break;
2619 default: 2918 default:
2620 goto LABEL_87; 2919 return 0;
2621 } 2920 }
2622 } 2921 }
2623 return result; 2922 return result;
2624 } 2923 }
2625 2924