Fix: during IMP creation process, the initial balance check wrongly takes the equipment cost of the previous creation process into account

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8639 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-11-09 20:27:11 +00:00
parent b988df876f
commit f53ec6025c
+7 -13
View File
@@ -378,7 +378,6 @@ void BtnIMPMainPageBackCallback(GUI_BUTTON *btn,INT32 reason)
void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason)
{
// btn callback for Main Page Begin Profiling
if (!(btn->uiFlags & BUTTON_ENABLED))
return;
@@ -392,22 +391,19 @@ void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason)
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
btn->uiFlags&=~(BUTTON_CLICKED_ON);
// are we going to change name, or do we have to start over from scratch
if( iCurrentProfileMode > IMP__ATTRIBUTES )
{
// too far along, restart
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 1 ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, BeginMessageBoxCallBack);
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 1 ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, BeginMessageBoxCallBack);
}
else
{
//if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
if( LaptopSaveInfo.iCurrentBalance < GetProfileCost(TRUE) ) // SANDRO - changed to find actual profile cost in IMPConfirm
if( LaptopSaveInfo.iCurrentBalance < GetProfileCost(FALSE) ) // SANDRO - changed to find actual profile cost in IMPConfirm
{
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, BeginMessageBoxCallBack);
}
else if( NumberOfMercsOnPlayerTeam() >= OUR_TEAM_SIZE_NO_VEHICLE )
{
@@ -415,17 +411,15 @@ void BtnIMPMainPageBeginCallback(GUI_BUTTON *btn,INT32 reason)
}
else
{
// change name
iCurrentImpPage = IMP_BEGIN;
fButtonPendingFlag = TRUE;
}
// change name
iCurrentImpPage = IMP_BEGIN;
fButtonPendingFlag = TRUE;
}
}
}
}
}
void BtnIMPMainPagePersonalityCallback(GUI_BUTTON *btn,INT32 reason)
{