- To make it easier to search for dialogue and understand what a line is supposed to mean, changed a few dialogue enums.

- Merged IsMercOnTeam...(...) functions into one
- Fix: during hiring, AIM mercs only complained about their hated ones if these were already in the country, thus ignoring other mercs in transit


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8512 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-01-04 15:50:31 +00:00
parent f8b34b35d7
commit a8e62cc406
12 changed files with 50 additions and 131 deletions
+8 -8
View File
@@ -3217,7 +3217,7 @@ BOOLEAN CanMercBeHired()
continue;
}
if( IsMercOnTeamAndInOmertaAlready( bMercID ) )
if( IsMercOnTeam( bMercID, TRUE, FALSE ) )
{
//if the merc hates someone on the team, see if a buddy is on the team
for ( UINT8 j = 0; j< NUMBER_HATED_MERCS_ONTEAM; ++j )
@@ -3239,7 +3239,7 @@ BOOLEAN CanMercBeHired()
if( bMercID < 0 )
continue;
if( IsMercOnTeam( bMercID ) && !IsMercDead( bMercID ) )
if( IsMercOnTeam( bMercID, FALSE, FALSE ) && !IsMercDead( bMercID ) )
{
if ( j == 0 )
{
@@ -3282,7 +3282,7 @@ BOOLEAN CanMercBeHired()
}
else
{
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_PERSONALITY_BIAS_WITH_HATED_1 );
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE );
fRetVal = TRUE;
}
}
@@ -3296,8 +3296,8 @@ BOOLEAN CanMercBeHired()
}
else
{
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_PERSONALITY_BIAS_WITH_HATED_2 );
// DelayMercSpeech( gbCurrentSoldier, QUOTE_PERSONALITY_BIAS_WITH_MERC_2, 750, TRUE, FALSE );
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_HATED_2_ON_TEAM_LONGTIMETOHATE );
// DelayMercSpeech( gbCurrentSoldier, QUOTE_HATED_2_ON_TEAM_LONGTIMETOHATE, 750, TRUE, FALSE );
fRetVal = TRUE;
}
}
@@ -3311,7 +3311,7 @@ BOOLEAN CanMercBeHired()
}
else
{
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_PERSONALITY_BIAS_WITH_HATED_3 );
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_HATED_3_ON_TEAM_LONGTIMETOHATE );
fRetVal = TRUE;
}
}
@@ -3325,7 +3325,7 @@ BOOLEAN CanMercBeHired()
}
else
{
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_PERSONALITY_BIAS_WITH_HATED_4 );
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_HATED_4_ON_TEAM_LONGTIMETOHATE );
fRetVal = TRUE;
}
}
@@ -3339,7 +3339,7 @@ BOOLEAN CanMercBeHired()
}
else
{
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_PERSONALITY_BIAS_WITH_HATED_5 );
InitVideoFaceTalking(gbCurrentSoldier, QUOTE_HATED_5_ON_TEAM_LONGTIMETOHATE );
fRetVal = TRUE;
}
}
+3 -3
View File
@@ -204,7 +204,7 @@ INT32 GetNumberOfHiredMercs()
usMercID = GetMercIDFromMERCArray( i );
// Is the merc hired?
if( IsMercOnTeam( (UINT8)usMercID ) || gMercProfiles[ usMercID ].iMercMercContractLength != 0 )
if( IsMercOnTeam( (UINT8)usMercID, FALSE, FALSE ) || gMercProfiles[ usMercID ].iMercMercContractLength != 0 )
{
#ifdef JA2UB
@@ -527,7 +527,7 @@ void DisplayHiredMercs()
usMercID = GetMercIDFromMERCArray( i );
//is the merc on the team, or is owed money
if( IsMercOnTeam( (UINT8)usMercID ) || gMercProfiles[ usMercID ].iMercMercContractLength != 0 )
if( IsMercOnTeam( (UINT8)usMercID, FALSE, FALSE ) || gMercProfiles[ usMercID ].iMercMercContractLength != 0 )
{
// count the number of mercs we really hired, but only display those that should be on this page
++merccounter;
@@ -616,7 +616,7 @@ void SettleMercAccounts()
ubMercID = GetMercIDFromMERCArray( (UINT8) i );
//if the merc is on the team, or does the player owe money for a fired merc
if( IsMercOnTeam( ubMercID ) || ( gMercProfiles[ ubMercID ].iMercMercContractLength != 0 ) )
if( IsMercOnTeam( ubMercID, FALSE, FALSE ) || ( gMercProfiles[ ubMercID ].iMercMercContractLength != 0 ) )
{
//Calc the contract charge
#ifdef JA2UB
+9 -9
View File
@@ -1001,10 +1001,10 @@ void DailyUpdateOfMercSite( UINT16 usDate)
iNumDays = 0;
//loop through all of the hired mercs from M.E.R.C.
for(i=0; i<NUMBER_OF_MERCS; i++)
for(i=0; i<NUMBER_OF_MERCS; ++i )
{
ubMercID = GetMercIDFromMERCArray( (UINT8) i );
if( IsMercOnTeam( ubMercID ) )
if( IsMercOnTeam( ubMercID, FALSE, FALSE ) )
{
// WANNE: If we have drunken merc, then skip otherwise is will exist 2 times!
if (gConditionsForMercAvailability[ i ].Drunk)
@@ -2325,10 +2325,10 @@ BOOLEAN IsAnyMercMercsHired( )
UINT8 i;
//loop through all of the hired mercs from M.E.R.C.
for(i=0; i<NUMBER_OF_MERCS; i++)
for(i=0; i<NUMBER_OF_MERCS; ++i)
{
ubMercID = GetMercIDFromMERCArray( i );
if( IsMercOnTeam( ubMercID ) )
if( IsMercOnTeam( ubMercID, FALSE, FALSE ) )
{
return( TRUE );
}
@@ -2380,12 +2380,12 @@ UINT8 CountNumberOfMercMercsHired()
UINT8 ubCount=0;
//loop through all of the hired mercs from M.E.R.C.
for(i=0; i<NUMBER_OF_MERCS; i++)
for(i=0; i<NUMBER_OF_MERCS; ++i)
{
ubMercID = GetMercIDFromMERCArray( i );
if( IsMercOnTeam( ubMercID ) )
if( IsMercOnTeam( ubMercID, FALSE, FALSE ) )
{
ubCount++;
++ubCount;
}
}
@@ -2535,7 +2535,7 @@ void HandlePlayerHiringMerc( UINT8 ubHiredMercID )
// anv: Speck is hired
case SPECK_PLAYABLE:
if( IsMercOnTeam( VICKI ) )
if( IsMercOnTeam( VICKI, FALSE, FALSE ) )
StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_SPECK_TOGETHER_WITH_VICKI );
else
StartSpeckTalking( SPECK_QUOTE_PLAYER_HIRES_SPECK );
@@ -2618,7 +2618,7 @@ BOOLEAN ShouldSpeckStartTalkingDueToActionOnSubPage()
BOOLEAN IsSpeckComAvailable() // anv: Prevent Speck from talking if his playable version is out of reach
{
//he's hired, travelling, dead or POW, he cant' talk
if( ( ( IsMercOnTeam( SPECK_PLAYABLE )
if( ( ( IsMercOnTeam( SPECK_PLAYABLE, FALSE, FALSE )
|| gMercProfiles[ SPECK_PLAYABLE ].bMercStatus == MERC_IS_DEAD
|| gMercProfiles[ SPECK_PLAYABLE ].bMercStatus == MERC_RETURNING_HOME
|| gMercProfiles[ SPECK_PLAYABLE ].bMercStatus == MERC_FIRED_AS_A_POW ) )