src/game/Tactical/Items.cc
// Determine if it is possible to add this attachment to the CLASS of this item
// (i.e. to any item in the class)
Determine if it is possible to add this attachment to the CLASS of this item
Determine if it is possible to add this attachment to the CLASS of this item
static BOOLEAN ValidAttachmentClass(UINT16 usAttachment, UINT16 usItem)
{
	for (const AttachmentInfoStruct* i = AttachmentInfo; i->usItem != NONE; ++i)
	{
		if (i->uiItemClass == IC_NONE) continue;
		if (i->usItem == usAttachment && i->uiItemClass == GCM->getItem(usItem)->getItemClass())
		{
			return TRUE;
		}
	}
	return FALSE;
}
static BOOLEAN ValidAttachmentClass ( UINT16 usAttachment , UINT16 usItem ) { for ( const AttachmentInfoStruct * i = AttachmentInfo ; i -> usItem != NONE ; ++ i ) { if ( i -> uiItemClass == IC_NONE ) continue ; if ( i -> usItem == usAttachment && i -> uiItemClass == GCM -> getItem ( usItem ) -> getItemClass ( ) ) { return TRUE ; } } return FALSE ; }
Determine if it is possible to add this attachment to the CLASS of this item
(i.e.
Determine if it is possible to add this attachment to the CLASS of this item ( i . e .
// see comment for AttachmentInfo array for why we skip IC_NONE