Fixed item "beaming" bugs that allowed items to be grabbed from a sector your merc wasn't currently in.

Fixed the map editor so that "Nada" items don't appear in the item lists.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2088 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2008-04-29 17:33:49 +00:00
parent 6d4b38541b
commit 5a57354297
5 changed files with 70 additions and 59 deletions
@@ -31,6 +31,7 @@
#include "Sound Control.h"
#include "interface panels.h"
#include "wordwrap.h"
#include "Soldier macros.h"
#endif
#include "ShopKeeper Interface.h"
@@ -837,16 +838,19 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
WORLDITEM * twItem = &(pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ]);
if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) && twItem->object.exists() == true && (bSelectedInfoChar != -1 && gCharactersList[bSelectedInfoChar].fValid))
{
if(ItemSlotLimit( &twItem->object, STACK_SIZE_LIMIT ) == 1)
if(OK_CONTROLLABLE_MERC( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] ))
{
fShowInventoryFlag = TRUE;
MAPInternalInitItemDescriptionBox( &twItem->object, 0, MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] );
}
else if(gpItemPointer == NULL || gpItemPointer->usItem == twItem->object.usItem || ValidAttachment(gpItemPointer->usItem, twItem->object.usItem) == TRUE || ValidAmmoType(twItem->object.usItem, gpItemPointer->usItem) == TRUE)
{
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
fTeamPanelDirty=TRUE;
fInterfacePanelDirty = DIRTYLEVEL2;
if(ItemSlotLimit( &twItem->object, STACK_SIZE_LIMIT ) == 1)
{
fShowInventoryFlag = TRUE;
MAPInternalInitItemDescriptionBox( &twItem->object, 0, MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] );
}
else if(gpItemPointer == NULL || gpItemPointer->usItem == twItem->object.usItem || ValidAttachment(gpItemPointer->usItem, twItem->object.usItem) == TRUE || ValidAmmoType(twItem->object.usItem, gpItemPointer->usItem) == TRUE)
{
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
fTeamPanelDirty=TRUE;
fInterfacePanelDirty = DIRTYLEVEL2;
}
}
}
}