Oly start PMC hiring if > 0 militia have been selected

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7958 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-08-04 19:11:13 +00:00
parent abe7117231
commit 90486b015b
+4
View File
@@ -526,6 +526,9 @@ void PMCConfirmationCallback( UINT8 val )
void PMCTeamHireCallback( GUI_BUTTON *btn, INT32 reason ) void PMCTeamHireCallback( GUI_BUTTON *btn, INT32 reason )
{ {
if ( reason & MSYS_CALLBACK_REASON_LBUTTON_UP ) if ( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
{
// only proceed if we selected people
if ( pmcdata[0].usToHire || pmcdata[1].usToHire )
{ {
AddTransactionToPlayersBook( PMC_CONTRACT, 0, GetWorldTotalMin( ), (-1) * (INT32)(pmcdata[0].usToHire * GetMilitiaCostPMC( REGULAR_MILITIA ) + pmcdata[1].usToHire * GetMilitiaCostPMC( ELITE_MILITIA )) ); AddTransactionToPlayersBook( PMC_CONTRACT, 0, GetWorldTotalMin( ), (-1) * (INT32)(pmcdata[0].usToHire * GetMilitiaCostPMC( REGULAR_MILITIA ) + pmcdata[1].usToHire * GetMilitiaCostPMC( ELITE_MILITIA )) );
@@ -581,6 +584,7 @@ void PMCTeamHireCallback( GUI_BUTTON *btn, INT32 reason )
DoLowerScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, PMCConfirmationCallback ); DoLowerScreenIndependantMessageBox( sString, MSG_BOX_FLAG_OK, PMCConfirmationCallback );
} }
} }
}
void RenderPMCContract( ) void RenderPMCContract( )
{ {