Mercurial > mm7
changeset 2236:3c802b5e026a
_4B254D_SkillMasteryTeacher getting rid of uninitialized var use
author | Grumpy7 |
---|---|
date | Sun, 23 Feb 2014 12:55:01 +0100 |
parents | 6ab7d7c112bb |
children | d903816e972e |
files | mm7_4.cpp |
diffstat | 1 files changed, 7 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/mm7_4.cpp Sun Feb 23 03:07:46 2014 +0100 +++ b/mm7_4.cpp Sun Feb 23 12:55:01 2014 +0100 @@ -1828,7 +1828,6 @@ //Player *v1; // esi@1 int v2; // edx@1 int v3; // ecx@1 - int v4; // edi@1 int pClassType; // eax@7 int v6; // eax@7 int v7; // ebx@7 @@ -1852,9 +1851,6 @@ //int v26; // [sp-4h] [bp-30h]@38 //int v27; // [sp-4h] [bp-30h]@82 char v28[4]; // [sp+Ch] [bp-20h]@9 - int v29; // [sp+10h] [bp-1Ch]@13 - int v30; // [sp+14h] [bp-18h]@15 - int v31; // [sp+18h] [bp-14h]@16 unsigned __int16 a1[2]; // [sp+1Ch] [bp-10h]@7 //int v33; // [sp+20h] [bp-Ch]@7 int v34; // [sp+24h] [bp-8h]@7 @@ -1863,7 +1859,6 @@ contract_approved = 0; v2 = (_this - 200) % 3; v3 = (_this - 200) / 3; - v4 = v2; v35 = (char *)pNPCTopics[127].pText; dword_F8B1AC_award_bit_number = v3; if ( v2 ) @@ -1901,30 +1896,18 @@ v11 = &byte_4ED970_skill_learn_ability_by_class_table[pClassType - pClassType % 4][v3]; for ( v9 = 0; v9 < 4; ++v9 ) { - v28[4 * v9] = 0; - if ( (unsigned __int8)*v11 < v34 ) - { - v14 = 1; - } - else - { - v14 = 1; - v28[4 * v9] = 1; - } + v28[v9] = ( (unsigned __int8)*v11 < v34 ) ? 0 : 1; v11 += 37; } - __debugbreak(); // warning C4700: uninitialized local variable 'v29' used - if ( v29 == v14 ) + if ( v28[1] == 1 ) { v25 = pClassNames[v10 + 1]; } else { - __debugbreak(); // warning C4700: uninitialized local variable 'v30' used - if ( v30 == v14 )//crash + if ( v28[2] == 1 ) { - __debugbreak(); // warning C4700: uninitialized local variable 'v31' used - if ( v31 == v14 ) + if ( v28[3] == 1 ) { sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[634], pClassNames[v10 + 2], pClassNames[v10 + 3]);//Вы должны достичь звания %s или %s для обучения этому уровню навыка. return pTmpBuf.data(); @@ -1933,7 +1916,7 @@ } else { - if ( v31 != v14 ) + if ( v28[3] != 1 ) { sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[632], pClassNames[pClassType]);//Этот уровень навыка не может быть постигнут классом %s. return pTmpBuf.data(); @@ -1949,8 +1932,8 @@ if ( !v7 ) return (char *)pNPCTopics[131].pText; v16 = SkillToMastery(a1[0]); - if ( (signed int)v16 > v4 + 1 ) - return (char *)pNPCTopics[v4 + 128].pText; + if ( (signed int)v16 > v2 + 1 ) + return (char *)pNPCTopics[v2 + 128].pText; if ( v34 != 2 ) { if ( v34 == 3 )