Mercurial > might-and-magic-trilogy
diff Player.cpp @ 162:8ff698000225
Слияние
author | Ritor1 |
---|---|
date | Fri, 30 Nov 2012 18:14:09 +0600 |
parents | 062e8a8e09bc |
children | b1f67710227f |
line wrap: on
line diff
--- a/Player.cpp Fri Nov 30 18:13:54 2012 +0600 +++ b/Player.cpp Fri Nov 30 18:14:09 2012 +0600 @@ -6514,7 +6514,7 @@ uLevel = 1; uExperience = 251 + rand() % 100; uBirthYear = 1147 - rand() % 6; - memset(pActiveSkills, 0, 32 * sizeof(short)); + memset(pActiveSkills, 0, sizeof(pActiveSkills)); memset(field_152, 0, 64); memset(&spellbook, 0, sizeof(PlayerSpells)); @@ -6552,7 +6552,7 @@ int v5; // esi@11 unsigned __int16 *v6; // edx@11 int v7; // esi@18 - unsigned __int16 *v8; // edx@18 + unsigned __int16 *pActiveSkill; // edx@18 if ( order >= 0 ) { @@ -6560,17 +6560,17 @@ { result = (PLAYER_SKILL_TYPE)0; v7 = 0; - v8 = this->pActiveSkills; + pActiveSkill = this->pActiveSkills; do { - if ( *v8 && pSkillAvailabilityPerClass[uClass / 4][result] == 2 ) + if ( *pActiveSkill && pSkillAvailabilityPerClass[uClass / 4][result] == 2 ) { if ( v7 == order ) return result; ++v7; } result = (PLAYER_SKILL_TYPE)((int)result + 1); - ++v8; + ++pActiveSkill; } while ( (signed int)result < 37 ); } @@ -6580,17 +6580,17 @@ { result = (PLAYER_SKILL_TYPE)0; v5 = 0; - v6 = this->pActiveSkills; + pActiveSkill = this->pActiveSkills; do { - if ( *v6 && pSkillAvailabilityPerClass[uClass / 4][result] == 1 ) + if ( *pActiveSkill && pSkillAvailabilityPerClass[uClass / 4][result] == 1 ) { if ( v5 == order - 2 ) return result; ++v5; } result = (PLAYER_SKILL_TYPE)((int)result + 1); - ++v6; + ++pActiveSkill; } while ( (signed int)result < 37 ); }