mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Merged New Inventory Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+92
-92
@@ -20,7 +20,7 @@
|
||||
#include "strategic.h"
|
||||
#include "strategicmap.h"
|
||||
#include "Quests.h"
|
||||
#include "worlddef.h"
|
||||
#include "worlddef.h"
|
||||
#include "rotting corpses.h"
|
||||
#include "Animation Control.h"
|
||||
#include "Tactical Save.h"
|
||||
@@ -64,7 +64,7 @@ BOOLEAN fEnterMapDueToContract = FALSE;
|
||||
extern BOOLEAN fOneFrame;
|
||||
extern BOOLEAN fPausedTimeDuringQuote;
|
||||
UINT8 ubQuitType = 0;
|
||||
BOOLEAN gfFirstMercSayQuote = FALSE;
|
||||
BOOLEAN gfFirstMercSayQuote = FALSE;
|
||||
extern BOOLEAN gfFirstMercSayingQuoteWillLeaveNoMatterWhat;
|
||||
|
||||
extern CHAR16 gzUserDefinedButton1[ 128 ];
|
||||
@@ -82,12 +82,12 @@ UINT8 ubNumContractRenewals = 0;
|
||||
// end
|
||||
UINT8 ubCurrentContractRenewal = 0;
|
||||
UINT8 ubCurrentContractRenewalInProgress = FALSE;
|
||||
BOOLEAN gfContractRenewalSquenceOn = FALSE;
|
||||
BOOLEAN gfContractRenewalSquenceOn = FALSE;
|
||||
BOOLEAN gfInContractMenuFromRenewSequence = FALSE;
|
||||
|
||||
|
||||
|
||||
// the airport sector
|
||||
#define AIRPORT_X 13
|
||||
#define AIRPORT_X 13
|
||||
#define AIRPORT_Y 2
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ BOOLEAN SaveContractRenewalDataToSaveGameFile( HWFILE hFile )
|
||||
}
|
||||
|
||||
|
||||
return( TRUE );
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ BOOLEAN LoadContractRenewalDataFromSaveGameFile( HWFILE hFile )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
void BeginContractRenewalSequence( )
|
||||
@@ -146,7 +146,7 @@ void BeginContractRenewalSequence( )
|
||||
|
||||
if ( pSoldier )
|
||||
{
|
||||
if( ( pSoldier->bActive == FALSE ) || ( pSoldier->bLife == 0 ) || ( pSoldier->bAssignment == IN_TRANSIT ) ||( pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
||||
if( ( pSoldier->bActive == FALSE ) || ( pSoldier->stats.bLife == 0 ) || ( pSoldier->bAssignment == IN_TRANSIT ) ||( pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
||||
{
|
||||
// no
|
||||
continue;
|
||||
@@ -226,7 +226,7 @@ void HandleContractRenewalSequence( )
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_CONTRACT_NOGO_TO_RENEW , pSoldier->ubID,0 ,0 ,0 ,0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// OK check what dialogue to play
|
||||
// If we have not used this one before....
|
||||
if ( pSoldier->ubContractRenewalQuoteCode == SOLDIER_CONTRACT_RENEW_QUOTE_NOT_USED )
|
||||
@@ -242,7 +242,7 @@ void HandleContractRenewalSequence( )
|
||||
HandleImportantMercQuote( pSoldier, QUOTE_MERC_LEAVING_ALSUCO_SOON );
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
|
||||
}
|
||||
|
||||
|
||||
// Do special dialogue event...
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_CONTRACT_WANTS_TO_RENEW , pSoldier->ubID,0 ,0 ,0 ,0 );
|
||||
}
|
||||
@@ -263,7 +263,7 @@ void EndCurrentContractRenewal( )
|
||||
{
|
||||
// OK stop this one and increment current one
|
||||
ubCurrentContractRenewalInProgress = FALSE;
|
||||
gfInContractMenuFromRenewSequence = FALSE;
|
||||
gfInContractMenuFromRenewSequence = FALSE;
|
||||
|
||||
ubCurrentContractRenewal++;
|
||||
|
||||
@@ -296,7 +296,7 @@ void HandleMercIsNotWillingToRenew( UINT8 ubID )
|
||||
|
||||
// We wish to lock interface
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,1,MAP_SCREEN,0,0,0 );
|
||||
|
||||
|
||||
// Setup variable for this....
|
||||
gfInContractMenuFromRenewSequence = TRUE;
|
||||
|
||||
@@ -378,7 +378,7 @@ BOOLEAN MercContractHandling( SOLDIERTYPE *pSoldier, UINT8 ubDesiredAction )
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
fPausedTimeDuringQuote = TRUE;
|
||||
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,1 ,MAP_SCREEN ,0 ,0 ,0 );
|
||||
@@ -395,7 +395,7 @@ BOOLEAN MercContractHandling( SOLDIERTYPE *pSoldier, UINT8 ubDesiredAction )
|
||||
//determine the end of the contract
|
||||
pSoldier->iEndofContractTime += ( iContractLength * 1440 );
|
||||
|
||||
if( ( pSoldier->usLifeInsurance ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) ) // DEF: Removed cause they can extend a 1 day contract && ( iContractLength > 1 )
|
||||
if( ( pSoldier->usLifeInsurance ) && ( pSoldier->bAssignment != ASSIGNMENT_POW ) ) // DEF: Removed cause they can extend a 1 day contract && ( iContractLength > 1 )
|
||||
{
|
||||
// check if player can afford insurance, if not, tell them
|
||||
iCostOfInsurance = CalculateInsuranceContractCost( iContractLength, pSoldier->ubProfile );
|
||||
@@ -436,22 +436,22 @@ BOOLEAN MercContractHandling( SOLDIERTYPE *pSoldier, UINT8 ubDesiredAction )
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
|
||||
|
||||
|
||||
// ATE: Setup when they can be signed again!
|
||||
// If they are 2-weeks this can be extended
|
||||
// otherwise don't change from current
|
||||
if ( pSoldier->bTypeOfLastContract == CONTRACT_EXTEND_2_WEEK )
|
||||
{
|
||||
pSoldier->iTimeCanSignElsewhere = pSoldier->iEndofContractTime;
|
||||
}
|
||||
// ATE: Setup when they can be signed again!
|
||||
// If they are 2-weeks this can be extended
|
||||
// otherwise don't change from current
|
||||
if ( pSoldier->bTypeOfLastContract == CONTRACT_EXTEND_2_WEEK )
|
||||
{
|
||||
pSoldier->iTimeCanSignElsewhere = pSoldier->iEndofContractTime;
|
||||
}
|
||||
|
||||
// ARM: Do not reset because of renewal! The quote is for early dismissal from *initial* time of hiring
|
||||
// ARM: Do not reset because of renewal! The quote is for early dismissal from *initial* time of hiring
|
||||
// pSoldier->uiTimeOfLastContractUpdate = GetWorldTotalMin();
|
||||
|
||||
// ARM: Do not reset because of renewal! The deposit in the profile goes up when merc levels, but the one in the soldier
|
||||
// ARM: Do not reset because of renewal! The deposit in the profile goes up when merc levels, but the one in the soldier
|
||||
// structure must always reflect the deposit actually paid (which does NOT change when a merc levels).
|
||||
// pSoldier->usMedicalDeposit = gMercProfiles[ pSoldier->ubProfile ].sMedicalDepositAmount;
|
||||
|
||||
//add an entry in the finacial page for the extending of the mercs contract
|
||||
//add an entry in the finacial page for the extending of the mercs contract
|
||||
AddTransactionToPlayersBook( ubFinancesContractType, pSoldier->ubProfile, GetWorldTotalMin(), -iContractCharge );
|
||||
|
||||
//add an entry in the history page for the extending of the merc contract
|
||||
@@ -476,7 +476,7 @@ BOOLEAN WillMercRenew( SOLDIERTYPE *pSoldier, BOOLEAN fSayQuote )
|
||||
return( FALSE );
|
||||
|
||||
// does the merc have another contract already lined up?
|
||||
if( pSoldier->fSignedAnotherContract )
|
||||
if( pSoldier->flags.fSignedAnotherContract )
|
||||
{
|
||||
// NOTE: Having a buddy around will NOT stop a merc from leaving on another contract (IC's call)
|
||||
|
||||
@@ -569,14 +569,14 @@ BOOLEAN WillMercRenew( SOLDIERTYPE *pSoldier, BOOLEAN fSayQuote )
|
||||
if ( bMercID >= 0 )
|
||||
{
|
||||
if ( IsMercOnTeamAndInOmertaAlreadyAndAlive( (UINT8) bMercID ) )
|
||||
{
|
||||
{
|
||||
if ( gMercProfiles[ pSoldier->ubProfile ].bLearnToHateCount == 0 )
|
||||
{
|
||||
// our tolerance has run out!
|
||||
fUnhappy = TRUE;
|
||||
usReasonQuote = QUOTE_LEARNED_TO_HATE_MERC_1_ON_TEAM_WONT_RENEW;
|
||||
|
||||
}
|
||||
}
|
||||
else if ( gMercProfiles[ pSoldier->ubProfile ].bLearnToHateCount <= gMercProfiles[ pSoldier->ubProfile ].bLearnToHateTime / 2 )
|
||||
{
|
||||
pHated = FindSoldierByProfileID( bMercID, TRUE );
|
||||
@@ -596,7 +596,7 @@ BOOLEAN WillMercRenew( SOLDIERTYPE *pSoldier, BOOLEAN fSayQuote )
|
||||
if (!fUnhappy)
|
||||
{
|
||||
// check if death rate is too high
|
||||
if( MercThinksDeathRateTooHigh( pSoldier-> ubProfile ) )
|
||||
if( MercThinksDeathRateTooHigh( pSoldier->ubProfile ) )
|
||||
{
|
||||
fUnhappy = TRUE;
|
||||
usReasonQuote = QUOTE_DEATH_RATE_RENEWAL;
|
||||
@@ -641,7 +641,7 @@ BOOLEAN WillMercRenew( SOLDIERTYPE *pSoldier, BOOLEAN fSayQuote )
|
||||
}
|
||||
else
|
||||
{
|
||||
SetMercPrecedentQuoteBitStatus( pSoldier->ubProfile , GetQuoteBitNumberFromQuoteID( ( UINT32 ) ( usReasonQuote ) ) );
|
||||
SetMercPrecedentQuoteBitStatus( pSoldier->ubProfile , GetQuoteBitNumberFromQuoteID( ( UINT32 ) ( usReasonQuote ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -682,7 +682,7 @@ BOOLEAN WillMercRenew( SOLDIERTYPE *pSoldier, BOOLEAN fSayQuote )
|
||||
if( ( SoldierWantsToDelayRenewalOfContract( pSoldier ) ) )
|
||||
{
|
||||
// has a new job lined up
|
||||
HandleImportantMercQuote( pSoldier, QUOTE_DELAY_CONTRACT_RENEWAL );
|
||||
HandleImportantMercQuote( pSoldier, QUOTE_DELAY_CONTRACT_RENEWAL );
|
||||
}
|
||||
else
|
||||
*/
|
||||
@@ -717,11 +717,11 @@ void HandleSoldierLeavingWithLowMorale( SOLDIERTYPE *pSoldier )
|
||||
|
||||
void HandleSoldierLeavingForAnotherContract( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
if (pSoldier->fSignedAnotherContract)
|
||||
if (pSoldier->flags.fSignedAnotherContract)
|
||||
{
|
||||
// merc goes to work elsewhere
|
||||
gMercProfiles[ pSoldier->ubProfile ].bMercStatus = MERC_WORKING_ELSEWHERE;
|
||||
gMercProfiles[ pSoldier->ubProfile ].uiDayBecomesAvailable += 1 + Random(6 + (pSoldier->bExpLevel / 2) ); // 1-(6 to 11) days
|
||||
gMercProfiles[ pSoldier->ubProfile ].uiDayBecomesAvailable += 1 + Random(6 + (pSoldier->stats.bExpLevel / 2) ); // 1-(6 to 11) days
|
||||
}
|
||||
}
|
||||
|
||||
@@ -738,11 +738,11 @@ BOOLEAN SoldierWantsToDelayRenewalOfContract( SOLDIERTYPE *pSoldier )
|
||||
// does the soldier want to delay renew of contract, possibly due to poor performance by player
|
||||
if( pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
return( FALSE );
|
||||
|
||||
|
||||
// type of contract the merc had
|
||||
bTypeOfCurrentContract = pSoldier -> bTypeOfLastContract;
|
||||
bTypeOfCurrentContract = pSoldier->bTypeOfLastContract;
|
||||
iLeftTimeOnContract = pSoldier->iEndofContractTime - GetWorldTotalMin();
|
||||
|
||||
|
||||
// grab tolerance
|
||||
switch( bTypeOfCurrentContract )
|
||||
{
|
||||
@@ -783,14 +783,14 @@ void CheckIfMercGetsAnotherContract( SOLDIERTYPE *pSoldier )
|
||||
if( pSoldier->ubWhatKindOfMercAmI != MERC_TYPE__AIM_MERC )
|
||||
return;
|
||||
|
||||
// ATE: check time we have and see if we can accept new contracts....
|
||||
if ( GetWorldTotalMin() <= (UINT32) pSoldier->iTimeCanSignElsewhere )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// ATE: check time we have and see if we can accept new contracts....
|
||||
if ( GetWorldTotalMin() <= (UINT32) pSoldier->iTimeCanSignElsewhere )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// if he doesn't already have another contract
|
||||
if (!pSoldier->fSignedAnotherContract)
|
||||
if (!pSoldier->flags.fSignedAnotherContract)
|
||||
{
|
||||
// chance depends on how much time he has left in his contract, and his experience level (determines demand)
|
||||
uiFullDaysRemaining = (pSoldier->iEndofContractTime - GetWorldTotalMin()) / (24 * 60);
|
||||
@@ -820,36 +820,36 @@ void CheckIfMercGetsAnotherContract( SOLDIERTYPE *pSoldier )
|
||||
}
|
||||
|
||||
// multiply by experience level
|
||||
iChance *= pSoldier->bExpLevel;
|
||||
iChance *= pSoldier->stats.bExpLevel;
|
||||
|
||||
if( (INT32) Random( 100 ) < iChance )
|
||||
{
|
||||
// B'bye!
|
||||
pSoldier->fSignedAnotherContract = TRUE;
|
||||
pSoldier->flags.fSignedAnotherContract = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//for ubRemoveType pass in the enum from the .h, ( MERC_QUIT, MERC_FIRED )
|
||||
//for ubRemoveType pass in the enum from the .h, ( MERC_QUIT, MERC_FIRED )
|
||||
BOOLEAN BeginStrategicRemoveMerc( SOLDIERTYPE *pSoldier, BOOLEAN fAddRehireButton )
|
||||
{
|
||||
InterruptTime( );
|
||||
PauseGame();
|
||||
LockPauseState( 8 );
|
||||
|
||||
//if the soldier may have some special action when he/she leaves the party, handle it
|
||||
HandleUniqueEventWhenPlayerLeavesTeam( pSoldier );
|
||||
|
||||
// IF the soldier is an EPC, don't ask about equipment
|
||||
if ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__EPC )
|
||||
{
|
||||
UnEscortEPC( pSoldier );
|
||||
}
|
||||
else
|
||||
{
|
||||
NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( pSoldier, fAddRehireButton );
|
||||
}
|
||||
//if the soldier may have some special action when he/she leaves the party, handle it
|
||||
HandleUniqueEventWhenPlayerLeavesTeam( pSoldier );
|
||||
|
||||
// IF the soldier is an EPC, don't ask about equipment
|
||||
if ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__EPC )
|
||||
{
|
||||
UnEscortEPC( pSoldier );
|
||||
}
|
||||
else
|
||||
{
|
||||
NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( pSoldier, fAddRehireButton );
|
||||
}
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
@@ -863,7 +863,7 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
EndCurrentContractRenewal( );
|
||||
}
|
||||
|
||||
|
||||
// ATE: Determine which HISTORY ENTRY to use...
|
||||
if ( pSoldier->ubLeaveHistoryCode == 0 )
|
||||
{
|
||||
@@ -874,7 +874,7 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
ubHistoryCode = pSoldier->ubLeaveHistoryCode;
|
||||
|
||||
//if the soldier is DEAD
|
||||
if( pSoldier->bLife <= 0 )
|
||||
if( pSoldier->stats.bLife <= 0 )
|
||||
{
|
||||
AddCharacterToDeadList( pSoldier );
|
||||
}
|
||||
@@ -894,7 +894,7 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
|
||||
if( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__NPC )
|
||||
{
|
||||
SetupProfileInsertionDataForSoldier( pSoldier );
|
||||
SetupProfileInsertionDataForSoldier( pSoldier );
|
||||
}
|
||||
|
||||
//remove him from the soldier structure
|
||||
@@ -911,7 +911,7 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
// remove him from any existing merc slot he could be in
|
||||
RemoveMercSlot( pSoldier );
|
||||
TakeSoldierOutOfVehicle( pSoldier );
|
||||
TakeSoldierOutOfVehicle( pSoldier );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -937,7 +937,7 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
|
||||
//add an entry in the history page for the firing/quiting of the merc
|
||||
// ATE: Don't do this if they are already dead!
|
||||
if ( !( pSoldier->uiStatusFlags & SOLDIER_DEAD ) )
|
||||
if ( !( pSoldier->flags.uiStatusFlags & SOLDIER_DEAD ) )
|
||||
{
|
||||
AddHistoryToPlayersLog( ubHistoryCode, pSoldier->ubProfile, GetWorldTotalMin(), pSoldier->sSectorX, pSoldier->sSectorY );
|
||||
}
|
||||
@@ -955,7 +955,7 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
CalculateMedicalDepositRefund( pSoldier );
|
||||
}
|
||||
|
||||
//remove the merc from the tactical
|
||||
//remove the merc from the tactical
|
||||
TacticalRemoveSoldier( pSoldier->ubID );
|
||||
|
||||
// Check if we should remove loaded world...
|
||||
@@ -973,7 +973,7 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
// stop time compression so player can react to the departure
|
||||
StopTimeCompression();
|
||||
|
||||
// WDS: This allows for replacing dead IMP mercs. See "BtnIMPBeginScreenDoneCallback" in "IMP Begin Screen.cpp"
|
||||
// WDS: This allows for replacing dead IMP mercs. See "BtnIMPBeginScreenDoneCallback" in "IMP Begin Screen.cpp"
|
||||
if( ( pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__PLAYER_CHARACTER ) &&
|
||||
( gMercProfiles[ pSoldier->ubProfile ].bMercStatus == MERC_IS_DEAD ) ) {
|
||||
// Replace the name with an empty string
|
||||
@@ -982,7 +982,7 @@ BOOLEAN StrategicRemoveMerc( SOLDIERTYPE *pSoldier )
|
||||
|
||||
// ATE: update team panels....
|
||||
UpdateTeamPanelAssignments( );
|
||||
|
||||
|
||||
// And unpause the @#$@#$ interface
|
||||
UnLockPauseState();
|
||||
UnPauseGame();
|
||||
@@ -1000,7 +1000,7 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
||||
return;
|
||||
|
||||
//if the merc is at full health, refund the full medical deposit
|
||||
if( pSoldier->bLife == pSoldier->bLifeMax )
|
||||
if( pSoldier->stats.bLife == pSoldier->stats.bLifeMax )
|
||||
{
|
||||
//add an entry in the finacial page for the FULL refund of the medical deposit
|
||||
// use the medical deposit in pSoldier, not in profile, which goes up with leveling
|
||||
@@ -1010,7 +1010,7 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
||||
AddEmailWithSpecialData( AIM_MEDICAL_DEPOSIT_REFUND, AIM_MEDICAL_DEPOSIT_REFUND_LENGTH, AIM_SITE, GetWorldTotalMin(), pSoldier->usMedicalDeposit, pSoldier->ubProfile );
|
||||
}
|
||||
//else if the merc is a dead, refund NOTHING!!
|
||||
else if( pSoldier->bLife <= 0 )
|
||||
else if( pSoldier->stats.bLife <= 0 )
|
||||
{
|
||||
//add an entry in the finacial page for NO refund of the medical deposit
|
||||
//AddTransactionToPlayersBook( NO_MEDICAL_REFUND, pSoldier->ubProfile, GetWorldTotalMin(), 0 );
|
||||
@@ -1023,7 +1023,7 @@ void CalculateMedicalDepositRefund( SOLDIERTYPE *pSoldier )
|
||||
else
|
||||
{
|
||||
// use the medical deposit in pSoldier, not in profile, which goes up with leveling
|
||||
iRefundAmount = (INT32) ( ( pSoldier->bLife / ( FLOAT ) pSoldier->bLifeMax ) * pSoldier->usMedicalDeposit + 0.5 );
|
||||
iRefundAmount = (INT32) ( ( pSoldier->stats.bLife / ( FLOAT ) pSoldier->stats.bLifeMax ) * pSoldier->usMedicalDeposit + 0.5 );
|
||||
|
||||
//add an entry in the finacial page for a PARTIAL refund of the medical deposit
|
||||
AddTransactionToPlayersBook( PARTIAL_MEDICAL_REFUND, pSoldier->ubProfile, GetWorldTotalMin(), iRefundAmount );
|
||||
@@ -1056,12 +1056,12 @@ void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldi
|
||||
|
||||
pLeaveSoldier = pSoldier;
|
||||
|
||||
if( pSoldier->fSignedAnotherContract == TRUE )
|
||||
if( pSoldier->flags.fSignedAnotherContract == TRUE )
|
||||
{
|
||||
fAddRehireButton = FALSE;
|
||||
}
|
||||
|
||||
if( pSoldier->fSignedAnotherContract == TRUE )
|
||||
if( pSoldier->flags.fSignedAnotherContract == TRUE )
|
||||
{
|
||||
fAddRehireButton = FALSE;
|
||||
}
|
||||
@@ -1086,9 +1086,9 @@ void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldi
|
||||
}
|
||||
|
||||
// check if drassen controlled
|
||||
else if( StrategicMap[ ( AIRPORT_X + ( MAP_WORLD_X * AIRPORT_Y ) ) ].fEnemyControlled == FALSE )
|
||||
else if( StrategicMap[ ( AIRPORT_X + ( MAP_WORLD_X * AIRPORT_Y ) ) ].fEnemyControlled == FALSE )
|
||||
{
|
||||
|
||||
|
||||
if( ( pSoldier->sSectorX == AIRPORT_X ) && ( pSoldier->sSectorY == AIRPORT_Y ) && ( pSoldier->bSectorZ == 0 ) )
|
||||
{
|
||||
if( gMercProfiles[ pSoldier->ubProfile ].bSex == MALE )
|
||||
@@ -1114,7 +1114,7 @@ void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldi
|
||||
{
|
||||
swprintf( sString, pMercSheLeaveString[ 0 ], pSoldier->name, zShortTownIDString );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1151,13 +1151,13 @@ void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldi
|
||||
if ( (guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) )
|
||||
{
|
||||
if( fInSector == FALSE )
|
||||
{
|
||||
{
|
||||
// set up for mapscreen
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, ( UINT16 )( ( fAddRehireButton ? MSG_BOX_FLAG_GENERICCONTRACT : MSG_BOX_FLAG_GENERIC ) ), MercDepartEquipmentBoxCallBack );
|
||||
}
|
||||
else
|
||||
{
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, ( UINT16 )( ( fAddRehireButton ? MSG_BOX_FLAG_OKCONTRACT : MSG_BOX_FLAG_OK ) ), MercDepartEquipmentBoxCallBack );
|
||||
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, ( UINT16 )( ( fAddRehireButton ? MSG_BOX_FLAG_OKCONTRACT : MSG_BOX_FLAG_OK ) ), MercDepartEquipmentBoxCallBack );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1166,15 +1166,15 @@ void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldi
|
||||
if( fInSector == FALSE )
|
||||
{
|
||||
// set up for all otherscreens
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, sString, guiCurrentScreen, ( UINT16 ) ( MSG_BOX_FLAG_USE_CENTERING_RECT | ( fAddRehireButton ? MSG_BOX_FLAG_GENERICCONTRACT : MSG_BOX_FLAG_GENERIC ) ), MercDepartEquipmentBoxCallBack, &pCenteringRect );
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, sString, guiCurrentScreen, ( UINT16 ) ( MSG_BOX_FLAG_USE_CENTERING_RECT | ( fAddRehireButton ? MSG_BOX_FLAG_GENERICCONTRACT : MSG_BOX_FLAG_GENERIC ) ), MercDepartEquipmentBoxCallBack, &pCenteringRect );
|
||||
}
|
||||
else
|
||||
{
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, sString, guiCurrentScreen, ( UINT16 ) ( MSG_BOX_FLAG_USE_CENTERING_RECT | ( fAddRehireButton ? MSG_BOX_FLAG_OKCONTRACT : MSG_BOX_FLAG_OK ) ) , MercDepartEquipmentBoxCallBack, &pCenteringRect );
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, sString, guiCurrentScreen, ( UINT16 ) ( MSG_BOX_FLAG_USE_CENTERING_RECT | ( fAddRehireButton ? MSG_BOX_FLAG_OKCONTRACT : MSG_BOX_FLAG_OK ) ) , MercDepartEquipmentBoxCallBack, &pCenteringRect );
|
||||
}
|
||||
}
|
||||
|
||||
if( pSoldier->fSignedAnotherContract == TRUE )
|
||||
|
||||
if( pSoldier->flags.fSignedAnotherContract == TRUE )
|
||||
{
|
||||
//fCurrentMercFired = FALSE;
|
||||
}
|
||||
@@ -1193,7 +1193,7 @@ void MercDepartEquipmentBoxCallBack( UINT8 bExitValue )
|
||||
{
|
||||
// yep (NOTE that this passes the SOLDIER index, not the PROFILE index as the others do)
|
||||
HandleLeavingOfEquipmentInCurrentSector( pLeaveSoldier->ubID );
|
||||
|
||||
|
||||
// aim merc will say goodbye when leaving
|
||||
if( ( pLeaveSoldier->ubWhatKindOfMercAmI == MERC_TYPE__AIM_MERC ) && ( ubQuitType != HISTORY_MERC_FIRED ) )
|
||||
{
|
||||
@@ -1205,7 +1205,7 @@ void MercDepartEquipmentBoxCallBack( UINT8 bExitValue )
|
||||
HandleExtendMercsContract( pLeaveSoldier );
|
||||
return;
|
||||
}
|
||||
else if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
else if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
{
|
||||
// yep (NOTE that this passes the SOLDIER index, not the PROFILE index as the others do)
|
||||
HandleLeavingOfEquipmentInCurrentSector( pLeaveSoldier->ubID );
|
||||
@@ -1265,7 +1265,7 @@ BOOLEAN HandleFiredDeadMerc( SOLDIERTYPE *pSoldier )
|
||||
SET_PALETTEREP_ID ( Corpse.HeadPal, pSoldier->HeadPal );
|
||||
SET_PALETTEREP_ID ( Corpse.VestPal, pSoldier->VestPal );
|
||||
SET_PALETTEREP_ID ( Corpse.SkinPal, pSoldier->SkinPal );
|
||||
SET_PALETTEREP_ID ( Corpse.PantsPal, pSoldier->PantsPal );
|
||||
SET_PALETTEREP_ID ( Corpse.PantsPal, pSoldier->PantsPal );
|
||||
|
||||
Corpse.bDirection = pSoldier->ubDirection;
|
||||
|
||||
@@ -1301,12 +1301,12 @@ void HandleExtendMercsContract( SOLDIERTYPE *pSoldier )
|
||||
pContractReHireSoldier = pSoldier;
|
||||
uiContractTimeMode = giTimeCompressMode;
|
||||
}
|
||||
|
||||
|
||||
fTeamPanelDirty = TRUE;
|
||||
fCharacterInfoPanelDirty = TRUE;
|
||||
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE, 1, MAP_SCREEN, 0, 0, 0 );
|
||||
|
||||
|
||||
CheckIfSalaryIncreasedAndSayQuote( pSoldier, TRUE );
|
||||
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE, 0 ,MAP_SCREEN, 0, 0, 0 );
|
||||
@@ -1339,9 +1339,9 @@ void FindOutIfAnyMercAboutToLeaveIsGonnaRenew( void )
|
||||
for( iCounter = 0; iCounter < iNumberOnTeam; iCounter++ )
|
||||
{
|
||||
pSoldier = &Menptr[ iCounter ];
|
||||
|
||||
|
||||
// valid soldier?
|
||||
if( ( pSoldier->bActive == FALSE ) || ( pSoldier->bLife == 0 ) || ( pSoldier->bAssignment == IN_TRANSIT ) ||( pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
||||
if( ( pSoldier->bActive == FALSE ) || ( pSoldier->stats.bLife == 0 ) || ( pSoldier->bAssignment == IN_TRANSIT ) ||( pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
||||
{
|
||||
// no
|
||||
continue;
|
||||
@@ -1392,7 +1392,7 @@ void FindOutIfAnyMercAboutToLeaveIsGonnaRenew( void )
|
||||
// OK, he does not want to renew.......
|
||||
HandleImportantMercQuote( pSoldierWhoWillQuit, QUOTE_MERC_LEAVING_ALSUCO_SOON );
|
||||
|
||||
AddReasonToWaitingListQueue( CONTRACT_EXPIRE_WARNING_REASON );
|
||||
AddReasonToWaitingListQueue( CONTRACT_EXPIRE_WARNING_REASON );
|
||||
TacticalCharacterDialogueWithSpecialEvent( pSoldierWhoWillQuit, 0, DIALOGUE_SPECIAL_EVENT_SHOW_UPDATE_MENU, 0,0 );
|
||||
|
||||
pSoldierWhoWillQuit->ubContractRenewalQuoteCode = SOLDIER_CONTRACT_RENEW_QUOTE_115_USED;
|
||||
@@ -1409,7 +1409,7 @@ void FindOutIfAnyMercAboutToLeaveIsGonnaRenew( void )
|
||||
HandleImportantMercQuote( MercPtrs[ ubPotentialMercs[ ubChosenMerc ] ], QUOTE_CONTRACTS_OVER );
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
|
||||
|
||||
AddReasonToWaitingListQueue( CONTRACT_EXPIRE_WARNING_REASON );
|
||||
AddReasonToWaitingListQueue( CONTRACT_EXPIRE_WARNING_REASON );
|
||||
TacticalCharacterDialogueWithSpecialEvent( MercPtrs[ ubPotentialMercs[ ubChosenMerc ] ], 0, DIALOGUE_SPECIAL_EVENT_SHOW_UPDATE_MENU, 0,0 );
|
||||
|
||||
MercPtrs[ ubPotentialMercs[ ubChosenMerc ] ]->ubContractRenewalQuoteCode = SOLDIER_CONTRACT_RENEW_QUOTE_89_USED;
|
||||
@@ -1446,13 +1446,13 @@ void HandleNotifyPlayerCanAffordInsurance( SOLDIERTYPE *pSoldier, UINT8 ubLength
|
||||
|
||||
// now pop up the message box
|
||||
DoScreenIndependantMessageBox( sString, MSG_BOX_FLAG_YESNO, ExtendMercInsuranceContractCallBack );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void ExtendMercInsuranceContractCallBack( UINT8 bExitValue )
|
||||
{
|
||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
{
|
||||
PurchaseOrExtendInsuranceForSoldier( gpInsuranceSoldier, gubContractLength );
|
||||
}
|
||||
@@ -1507,7 +1507,7 @@ BOOLEAN ContractIsExpiring( SOLDIERTYPE *pSoldier )
|
||||
if ( GetWorldHour( ) == uiCheckHour )
|
||||
{
|
||||
// All's good for go!
|
||||
return( TRUE );
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1529,10 +1529,10 @@ BOOLEAN ContractIsGoingToExpireSoon( SOLDIERTYPE *pSoldier )
|
||||
if ( GetWorldHour( ) >= ( uiCheckHour - 2 ) )
|
||||
{
|
||||
// All's good for go!
|
||||
return( TRUE );
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user