comparison Party.cpp @ 146:1b7ca63e472e

Слияние
author Ritor1
date Mon, 19 Nov 2012 09:41:32 +0600
parents dac041fc74e8 4e1e3fe8502f
children 96ab6bba8408
comparison
equal deleted inserted replaced
145:dac041fc74e8 146:1b7ca63e472e
288 int v7; // eax@5 288 int v7; // eax@5
289 int uSkillIdx; // eax@11 289 int uSkillIdx; // eax@11
290 unsigned __int8 v9; // zf@37 290 unsigned __int8 v9; // zf@37
291 char v10; // sf@37 291 char v10; // sf@37
292 unsigned __int8 v11; // of@37 292 unsigned __int8 v11; // of@37
293 char *v12; // eax@38 293 char *pAttributes; // eax@38
294 signed int v13; // ecx@38 294 signed int v13; // ecx@38
295 int uMaxSP; // eax@42 295 int uMaxSP; // eax@42
296 unsigned int v15; // [sp-4h] [bp-44h]@14 296 unsigned int v15; // [sp-4h] [bp-44h]@14
297 unsigned int v16; // [sp-4h] [bp-44h]@26 297 unsigned int v16; // [sp-4h] [bp-44h]@26
298 int v17; // [sp+10h] [bp-30h]@1 298 int v17; // [sp+10h] [bp-30h]@1
370 pCharacter = &pParty->pPlayers[0]; 370 pCharacter = &pParty->pPlayers[0];
371 uNumPlayers = 4; 371 uNumPlayers = 4;
372 while ( 1 ) 372 while ( 1 )
373 { 373 {
374 if ( !pCharacter->uClass ) 374 if ( !pCharacter->uClass )
375 *(short *)pResMagicBase = v3; 375 *(short *)pResMagicBase = v3; //player[i].pResMagicBase
376 uSpellBookPageCount = 0; 376 uSpellBookPageCount = 0;
377 v7 = pResMagicBase - 5726;// pSpellBookPageFlags 377 v7 = pResMagicBase - 5726;// Skills
378 while ( !*(short *)v7 ) 378 while ( !*(short *)v7 ) //player[i].skillFire or
379 //player[i].pActiveSkills[12]
379 { 380 {
380 ++uSpellBookPageCount; 381 ++uSpellBookPageCount;
381 v7 += 2; 382 v7 += 2;
382 if ( uSpellBookPageCount >= 9 ) 383 if ( uSpellBookPageCount >= 9 )
383 goto LABEL_10; 384 goto LABEL_10;
400 { 401 {
401 case PLAYER_SKILL_STAFF: 402 case PLAYER_SKILL_STAFF:
402 v15 = ITEM_STAFF_1; 403 v15 = ITEM_STAFF_1;
403 goto wear_item; 404 goto wear_item;
404 case PLAYER_SKILL_SWORD: 405 case PLAYER_SKILL_SWORD:
405 v15 = 1; 406 v15 = ITEM_LONGSWORD_1;
406 goto wear_item; 407 goto wear_item;
407 case PLAYER_SKILL_DAGGER: 408 case PLAYER_SKILL_DAGGER:
408 v15 = ITEM_DAGGER_1; 409 v15 = ITEM_DAGGER_1;
409 goto wear_item; 410 goto wear_item;
410 case PLAYER_SKILL_AXE: 411 case PLAYER_SKILL_AXE:
460 case PLAYER_SKILL_PERCEPTION: 461 case PLAYER_SKILL_PERCEPTION:
461 case PLAYER_SKILL_DIPLOMACY: 462 case PLAYER_SKILL_DIPLOMACY:
462 case PLAYER_SKILL_TRAP_DISARM: 463 case PLAYER_SKILL_TRAP_DISARM:
463 case PLAYER_SKILL_LEARNING: 464 case PLAYER_SKILL_LEARNING:
464 pCharacter->AddItem(-1, ITEM_POTION_BOTTLE); 465 pCharacter->AddItem(-1, ITEM_POTION_BOTTLE);
465 v16 = 5 * ((rand() % 3) + 40); // simple reagent 466 v16 = 5 * (rand() % 3 + 40); // simple reagent
466 goto add_item; 467 goto add_item;
467 case PLAYER_SKILL_DODGE: 468 case PLAYER_SKILL_DODGE:
468 v16 = ITEM_BOOTS_1; 469 v16 = ITEM_BOOTS_1;
469 goto add_item; 470 goto add_item;
470 case PLAYER_SKILL_UNARMED: 471 case PLAYER_SKILL_UNARMED:
480 v11 = uSkillIdx > 36; 481 v11 = uSkillIdx > 36;
481 v9 = v18 == 35; 482 v9 = v18 == 35;
482 v10 = uSkillIdx - 35 < 0; 483 v10 = uSkillIdx - 35 < 0;
483 } 484 }
484 while ( (unsigned __int8)(v10 ^ v11) | v9 ); 485 while ( (unsigned __int8)(v10 ^ v11) | v9 );
485 v12 = (char *)&pCharacter->pInventoryItems[0].uAttributes; 486 pAttributes = (char *)&pCharacter->pInventoryItems[0].uAttributes;
486 //v13 = 138; 487 //v13 = 138;
487 for (v13 = 138; v13 > 0; --v13) 488 for (v13 = 138; v13 > 0; --v13)
488 //do
489 { 489 {
490 if ( *((int *)v12 - 5) ) 490 if ( *((int *)pAttributes - 5) )
491 *(int *)v12 |= 1u; 491 *(int *)pAttributes |= 1;
492 v12 += 36; 492 pAttributes += 36;
493 //--v13; 493 //--v13;
494 } 494 }
495 //while ( v13 ); 495 //while ( v13 );
496 } 496 }
497 pCharacter->sHealth = pCharacter->GetMaxHealth(); 497 pCharacter->sHealth = pCharacter->GetMaxHealth();