Fixed crash when Carmen attempts to give the diskette to the Barry. Note, this is rather a workaround than anything. The reason for this crash is that the Merchants.xml contains only 68 entries, but the total number of arms dealers is 80. Thus the remaining 12 slots are zero-fill and therefore the function to check if soldier is armsdealer will return true for Barry as his profile id is 0. A large rewrite of this additional arms dealers system is required.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9179 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2021-10-14 18:47:06 +00:00
parent aa767c4355
commit 144842b1f6
+2 -1
View File
@@ -1242,7 +1242,8 @@ BOOLEAN IsMercADealer( UINT8 ubMercID )
//loop through the list of arms dealers
for ( UINT8 cnt = 0; cnt<NUM_ARMS_DEALERS; ++cnt )
{
if( armsDealerInfo[ cnt ].ubShopKeeperID == ubMercID )
if (!armsDealerInfo[cnt].ubShopKeeperID) break;
else if( armsDealerInfo[ cnt ].ubShopKeeperID == ubMercID )
return( TRUE );
}
return( FALSE );