- Bugfixes (by Buggler)

o Fixed Restrict Mouse Region for Stack Popup Screen. Also a Dirty CTD fix for illegal Holster/Backpack pickup in Strategic Key Panel Popup
o Fixed Item Transfer Exploit in Stack Popup Screen/Item in Hand during Combat mode by using hotkeys to select other mercs in Strategic & Tactical Interface
o Corrected Numerator & Denominator Order for Armor Protection Raw Values in Popup Info text

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5632 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-10-19 08:33:11 +00:00
parent 9e058edf5e
commit 5957af60aa
4 changed files with 33 additions and 9 deletions
+6
View File
@@ -2342,6 +2342,12 @@ BOOLEAN ValidSelectableCharForNextOrPrev( INT32 iNewCharSlot )
{
BOOLEAN fHoldingItem = FALSE;
// not in popup
if ( InItemStackPopup( ) || InSectorStackPopup( ) || InKeyRingPopup( ) )
{
return( FALSE );
}
// if holding an item
if ( ( gMPanelRegion.Cursor == EXTERN_CURSOR ) || gpItemPointer || fMapInventoryItem )
{
+6
View File
@@ -16106,6 +16106,12 @@ void ChangeCharacterListSortMethod( INT32 iValue )
return;
}
// not in popup or item in hand
if( InItemStackPopup( ) || InSectorStackPopup( ) || InKeyRingPopup( ) || gpItemPointer != NULL )
{
return;
}
if( ( bSelectedDestChar != -1 ) || ( fPlotForHelicopter == TRUE ) )
{
AbortMovementPlottingMode( );
+9 -9
View File
@@ -8990,11 +8990,11 @@ BOOLEAN InitSectorStackPopup( SOLDIERTYPE *pSoldier, WORLDITEM *pInventoryPoolLi
gfInSectorStackPopup = TRUE;
fShowInventoryFlag = TRUE;
//Reserict mouse cursor to panel
//Restrict mouse cursor to panel
aRect.iLeft = sInvX + sOffSetX;
aRect.iTop = sInvY + sOffSetY;
aRect.iRight = aRect.iLeft + sItemWidth * usPopupWidth;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)+1) * usPopupHeight;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)) * usPopupHeight;
RestrictMouseCursor( &aRect );
@@ -9160,11 +9160,11 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
gfInItemStackPopup = TRUE;
//Reserict mouse cursor to panel
//Restrict mouse cursor to panel
aRect.iLeft = sInvX + xResOffset;
aRect.iTop = sInvY + sOffSetY;
aRect.iRight = aRect.iLeft + sItemWidth * usPopupWidth;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)+1) * usPopupHeight;
aRect.iRight = aRect.iLeft + min(cnt,sItemWidth) * usPopupWidth;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)) * usPopupHeight;
//aRect.iTop = sInvY;
//aRect.iLeft = sInvX;
//aRect.iBottom = sInvY + sInvHeight;
@@ -9469,11 +9469,11 @@ BOOLEAN InitKeyRingPopup( SOLDIERTYPE *pSoldier, INT16 sInvX, INT16 sInvY, INT16
gfInKeyRingPopup = TRUE;
//Reserict mouse cursor to panel
//Restrict mouse cursor to panel
aRect.iLeft = gsKeyRingPopupInvX + sOffSetX;
aRect.iTop = sInvY + sOffSetY;
aRect.iRight = aRect.iLeft + sKeyRingItemWidth * usPopupWidth;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sKeyRingItemWidth)+1) * usPopupHeight;
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sKeyRingItemWidth)) * usPopupHeight;
RestrictMouseCursor( &aRect );
@@ -11961,8 +11961,8 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
sThreshold, //repair threshold
pInvPanelTitleStrings[ 4 ], //Protection string
iProtection, //Protection rating in % based on best armor
Armour[ Item[ usItem ].ubClassIndex ].ubProtection, //Protection (raw data)
Armour[ Item[ usItem ].ubClassIndex ].ubProtection * sValue / 100,
Armour[ Item[ usItem ].ubClassIndex ].ubProtection, //Protection (raw data)
pInvPanelTitleStrings[ 3 ], //Camo string
GetCamoBonus(pObject)+GetUrbanCamoBonus(pObject)+GetDesertCamoBonus(pObject)+GetSnowCamoBonus(pObject), //Camo bonus
gWeaponStatsDesc[ 12 ], //Weight string
@@ -11982,8 +11982,8 @@ void GetHelpTextForItem( STR16 pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldier
sValue, //Item condition
pInvPanelTitleStrings[ 4 ], //Protection string
iProtection, //Protection rating in % based on best armor
Armour[ Item[ usItem ].ubClassIndex ].ubProtection, //Protection (raw data)
Armour[ Item[ usItem ].ubClassIndex ].ubProtection * sValue / 100,
Armour[ Item[ usItem ].ubClassIndex ].ubProtection, //Protection (raw data)
pInvPanelTitleStrings[ 3 ], //Camo string
GetCamoBonus(pObject)+GetUrbanCamoBonus(pObject)+GetDesertCamoBonus(pObject)+GetSnowCamoBonus(pObject), //Camo bonus
gWeaponStatsDesc[ 12 ], //Weight string
+12
View File
@@ -736,6 +736,18 @@ void SetSMPanelCurrentMerc( UINT8 ubNewID )
DeleteItemDescriptionBox( );
}
// Remove stack popup panel if one up....
if ( InItemStackPopup( ) || InSectorStackPopup( ) )
{
DeleteItemStackPopup( );
}
// Remove keyring popup panel if one up....
if ( InKeyRingPopup( ) )
{
DeleteKeyRingPopup( );
}
if ( gfInItemPickupMenu )
{
gfSMDisableForItems = TRUE;