mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Fixed a crash/freeze that could occur when trying to Sell All or Delete All items while the item description box was open.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2471 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+27
-21
@@ -1069,7 +1069,7 @@ void BeginSellAllCallBack( UINT8 bExitValue )
|
|||||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||||
{
|
{
|
||||||
fRestoreBackgroundForMessageBox = TRUE;
|
fRestoreBackgroundForMessageBox = TRUE;
|
||||||
if ( gpItemPointer != NULL )
|
if ( gpItemPointer != NULL || InSectorStackPopup( ) || InItemStackPopup( ) || InItemDescriptionBox( ) || InKeyRingPopup( ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1107,7 +1107,7 @@ void BeginDeleteAllCallBack( UINT8 bExitValue )
|
|||||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||||
{
|
{
|
||||||
fRestoreBackgroundForMessageBox = TRUE;
|
fRestoreBackgroundForMessageBox = TRUE;
|
||||||
if ( gpItemPointer != NULL )
|
if ( gpItemPointer != NULL || InSectorStackPopup( ) || InItemStackPopup( ) || InItemDescriptionBox( ) || InKeyRingPopup( ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -6272,16 +6272,19 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
case 'D':
|
case 'D':
|
||||||
if( fCtrl )
|
if( fCtrl )
|
||||||
{
|
{
|
||||||
//CHRISL: Delete all items
|
if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) )
|
||||||
if(!fShowMapInventoryPool)
|
|
||||||
{
|
{
|
||||||
fShowMapInventoryPool = TRUE;
|
//CHRISL: Delete all items
|
||||||
CreateDestroyMapInventoryPoolButtons( TRUE );
|
if(!fShowMapInventoryPool)
|
||||||
}
|
{
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, NewInvMessage[NIV_DELETE_ALL], guiCurrentScreen, ( UINT8 )MSG_BOX_FLAG_YESNO, BeginDeleteAllCallBack, NULL );
|
fShowMapInventoryPool = TRUE;
|
||||||
if(fShowMapInventoryPool)
|
CreateDestroyMapInventoryPoolButtons( TRUE );
|
||||||
{
|
}
|
||||||
fShowMapInventoryPool = FALSE;
|
DoMessageBox( MSG_BOX_BASIC_STYLE, NewInvMessage[NIV_DELETE_ALL], guiCurrentScreen, ( UINT8 )MSG_BOX_FLAG_YESNO, BeginDeleteAllCallBack, NULL );
|
||||||
|
if(fShowMapInventoryPool)
|
||||||
|
{
|
||||||
|
fShowMapInventoryPool = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -6625,18 +6628,21 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
case 'S':
|
case 'S':
|
||||||
if( fCtrl )
|
if( fCtrl )
|
||||||
{
|
{
|
||||||
//CHRISL: Sell all items
|
if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) )
|
||||||
if(gGameExternalOptions.fSellAll == TRUE)
|
|
||||||
{
|
{
|
||||||
if(!fShowMapInventoryPool)
|
//CHRISL: Sell all items
|
||||||
|
if(gGameExternalOptions.fSellAll == TRUE)
|
||||||
{
|
{
|
||||||
fShowMapInventoryPool = TRUE;
|
if(!fShowMapInventoryPool)
|
||||||
CreateDestroyMapInventoryPoolButtons( TRUE );
|
{
|
||||||
}
|
fShowMapInventoryPool = TRUE;
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, NewInvMessage[NIV_SELL_ALL], guiCurrentScreen, ( UINT8 )MSG_BOX_FLAG_YESNO, BeginSellAllCallBack, NULL );
|
CreateDestroyMapInventoryPoolButtons( TRUE );
|
||||||
if(fShowMapInventoryPool)
|
}
|
||||||
{
|
DoMessageBox( MSG_BOX_BASIC_STYLE, NewInvMessage[NIV_SELL_ALL], guiCurrentScreen, ( UINT8 )MSG_BOX_FLAG_YESNO, BeginSellAllCallBack, NULL );
|
||||||
fShowMapInventoryPool = FALSE;
|
if(fShowMapInventoryPool)
|
||||||
|
{
|
||||||
|
fShowMapInventoryPool = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user