Mercurial > might-and-magic-trilogy
changeset 145:dac041fc74e8
19.11.12
author | Ritor1 |
---|---|
date | Mon, 19 Nov 2012 09:41:10 +0600 |
parents | 05b2d9653abc |
children | 1b7ca63e472e d1ea5dda614d |
files | Party.cpp |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Party.cpp Thu Nov 15 16:36:30 2012 +0600 +++ b/Party.cpp Mon Nov 19 09:41:10 2012 +0600 @@ -374,7 +374,7 @@ if ( !pCharacter->uClass ) *(short *)pResMagicBase = v3; uSpellBookPageCount = 0; - v7 = pResMagicBase - 5726;// Skills + v7 = pResMagicBase - 5726;// pSpellBookPageFlags while ( !*(short *)v7 ) { ++uSpellBookPageCount; @@ -462,7 +462,7 @@ case PLAYER_SKILL_TRAP_DISARM: case PLAYER_SKILL_LEARNING: pCharacter->AddItem(-1, ITEM_POTION_BOTTLE); - v16 = 5 * (rand() % 3 + 40); // simple reagent + v16 = 5 * ((rand() % 3) + 40); // simple reagent goto add_item; case PLAYER_SKILL_DODGE: v16 = ITEM_BOOTS_1; @@ -477,21 +477,22 @@ } } uSkillIdx = v18 + 1; - v11 = __OFSUB__(v18 + 1, 36); + v11 = uSkillIdx > 36; v9 = v18 == 35; - v10 = v18++ - 35 < 0; + v10 = uSkillIdx - 35 < 0; } while ( (unsigned __int8)(v10 ^ v11) | v9 ); v12 = (char *)&pCharacter->pInventoryItems[0].uAttributes; - v13 = 138; - do + //v13 = 138; + for (v13 = 138; v13 > 0; --v13) + //do { if ( *((int *)v12 - 5) ) *(int *)v12 |= 1u; v12 += 36; - --v13; + //--v13; } - while ( v13 ); + //while ( v13 ); } pCharacter->sHealth = pCharacter->GetMaxHealth(); pCharacter->sMana = pCharacter->GetMaxMana();