Option SHOW_SKILLS_IN_HIRING_PAGE removed and made to be enabled automatically.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9331 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2022-03-18 22:05:29 +00:00
parent 374b125ffc
commit c3bb1c0da5
4 changed files with 129 additions and 125 deletions
+56 -58
View File
@@ -851,79 +851,77 @@ void DisplayMercMemberClickOnFaceHelpText( UINT8 ubMercID )
CHAR16 sString[ 128 ], sTemp[ 20 ];
// Buggler: skills/traits tooltip on merc portrait
if( gGameExternalOptions.fShowSkillsInHirePage == TRUE )
// clear string value
swprintf( sString, L"");
if (gGameOptions.fNewTraitSystem) // SANDRO - old/new traits check
{
// clear string value
swprintf( sString, L"");
UINT8 ubTempSkillArray[30];
INT8 bNumSkillTraits = 0;
if (gGameOptions.fNewTraitSystem) // SANDRO - old/new traits check
// lets rearrange our skills to a temp array
// we also get the number of lines (skills) to be displayed
for ( UINT8 ubCnt = 1; ubCnt < NUM_SKILLTRAITS_NT; ubCnt++ )
{
UINT8 ubTempSkillArray[30];
INT8 bNumSkillTraits = 0;
// lets rearrange our skills to a temp array
// we also get the number of lines (skills) to be displayed
for ( UINT8 ubCnt = 1; ubCnt < NUM_SKILLTRAITS_NT; ubCnt++ )
if ( ProfileHasSkillTrait( ubMercID, ubCnt ) == 2 )
{
if ( ProfileHasSkillTrait( ubMercID, ubCnt ) == 2 )
{
ubTempSkillArray[bNumSkillTraits] = (ubCnt + NEWTRAIT_MERCSKILL_EXPERTOFFSET);
bNumSkillTraits++;
}
else if ( ProfileHasSkillTrait( ubMercID, ubCnt ) == 1 )
{
ubTempSkillArray[bNumSkillTraits] = ubCnt;
bNumSkillTraits++;
}
ubTempSkillArray[bNumSkillTraits] = (ubCnt + NEWTRAIT_MERCSKILL_EXPERTOFFSET);
bNumSkillTraits++;
}
if ( bNumSkillTraits == 0 )
else if ( ProfileHasSkillTrait( ubMercID, ubCnt ) == 1 )
{
swprintf( sString, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
ubTempSkillArray[bNumSkillTraits] = ubCnt;
bNumSkillTraits++;
}
}
if ( bNumSkillTraits == 0 )
{
swprintf( sString, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
}
else
{
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
{
swprintf( sTemp, L"%s\n", gzMercSkillTextNew[ ubTempSkillArray[ubCnt] ] );
wcscat( sString, sTemp );
}
}
}
else
{
INT8 bSkill1 = 0, bSkill2 = 0;
bSkill1 = gMercProfiles[ ubMercID ].bSkillTraits[0];
bSkill2 = gMercProfiles[ ubMercID ].bSkillTraits[1];
if ( bSkill1 == 0 && bSkill2 == 0 )
{
swprintf( sString, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
}
else
{
//if the 2 skills are the same, add the '(expert)' at the end
if( bSkill1 == bSkill2 )
{
swprintf( sString, L"%s %s", gzMercSkillText[bSkill1], gzMercSkillText[EXPERT] );
}
else
{
for ( UINT8 ubCnt = 0; ubCnt < bNumSkillTraits; ubCnt++ )
//Display the first skill
if( bSkill1 != 0 )
{
swprintf( sTemp, L"%s\n", gzMercSkillTextNew[ ubTempSkillArray[ubCnt] ] );
swprintf( sString, L"%s\n", gzMercSkillText[bSkill1] );
}
if( bSkill2 != 0 )
{
swprintf( sTemp, L"%s", gzMercSkillText[bSkill2] );
wcscat( sString, sTemp );
}
}
}
else
{
INT8 bSkill1 = 0, bSkill2 = 0;
bSkill1 = gMercProfiles[ ubMercID ].bSkillTraits[0];
bSkill2 = gMercProfiles[ ubMercID ].bSkillTraits[1];
if ( bSkill1 == 0 && bSkill2 == 0 )
{
swprintf( sString, L"%s", pPersonnelScreenStrings[ PRSNL_TXT_NOSKILLS ] );
}
else
{
//if the 2 skills are the same, add the '(expert)' at the end
if( bSkill1 == bSkill2 )
{
swprintf( sString, L"%s %s", gzMercSkillText[bSkill1], gzMercSkillText[EXPERT] );
}
else
{
//Display the first skill
if( bSkill1 != 0 )
{
swprintf( sString, L"%s\n", gzMercSkillText[bSkill1] );
}
if( bSkill2 != 0 )
{
swprintf( sTemp, L"%s", gzMercSkillText[bSkill2] );
wcscat( sString, sTemp );
}
}
}
}
SetRegionFastHelpText( &gMercSelectedFaceRegion, sString );
}
SetRegionFastHelpText( &gMercSelectedFaceRegion, sString );
}
void LoadAndDisplayMercBio( UINT8 ubMercID )