- bugfix: CTDs after you have placed your mercs before the attacking occurs

- added notification when you try to create a new IMP and you already have the maxium number of mercs (18) in your team.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@619 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2006-11-05 21:21:51 +00:00
parent f072ee19ce
commit f839dcbe73
10 changed files with 49 additions and 19 deletions
+29 -4
View File
@@ -383,16 +383,27 @@ void HandleTextEvent( UINT32 uiKey )
void ProcessPlayerInputActivationString( void )
{
// prcess string to see if it matches activation string
if( NumberOfMercsOnPlayerTeam() >= 18 )
return;
char charPlayerActivationString[32];
wcstombs(charPlayerActivationString,pPlayerActivationString,32);
BOOLEAN freeMercSlot = TRUE;
// WANNE: Check total number of hired mercs
if( NumberOfMercsOnPlayerTeam() >= 18 )
{
freeMercSlot = FALSE;
}
//Madd multiple imps if( ( ( wcscmp(pPlayerActivationString, L"XEP624") == 0 ) || ( wcscmp(pPlayerActivationString, L"xep624") == 0 ) )&&( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) &&( LaptopSaveInfo.gfNewGameLaptop < 2 ) )
if( ( ( wcscmp(pPlayerActivationString, L"XEP624") == 0 ) || ( wcscmp(pPlayerActivationString, L"xep624") == 0 ) ) &&( LaptopSaveInfo.gfNewGameLaptop < 2 ) )
{
// WANNE: Check total number of hired mercs
if( freeMercSlot == FALSE )
{
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_18_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
return;
}
if (GetFilledIMPSlots(-1) < gGameExternalOptions.iMaxIMPCharacters)
{
// Kaiden: Need to reset skills, attributes and personalities with the new UB Method.
@@ -408,6 +419,13 @@ void ProcessPlayerInputActivationString( void )
//Madd multiple imps else if( ( wcscmp(pPlayerActivationString, L"90210") == 0 ) && ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) )
else if( wcscmp(pPlayerActivationString, L"90210") == 0 )
{
// WANNE: Check total number of hired mercs
if( freeMercSlot == FALSE )
{
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_18_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
return;
}
if (GetFilledIMPSlots(-1) < gGameExternalOptions.iMaxIMPCharacters)
{
if (LoadImpCharacter( IMP_MERC_FILENAME ) == TRUE)
@@ -424,6 +442,13 @@ void ProcessPlayerInputActivationString( void )
// Madd: load characters by name
else if ( ImpExists( charPlayerActivationString ) )
{
// WANNE: Check total number of hired mercs
if( freeMercSlot == FALSE )
{
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, AimPopUpText[ AIM_MEMBER_ALREADY_HAVE_18_MERCS ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
return;
}
if (GetFilledIMPSlots(-1) < gGameExternalOptions.iMaxIMPCharacters)
{
if (LoadImpCharacter( charPlayerActivationString ) == TRUE)