-added code for enemies to carry money items / wallets w/actual deposit-able cash

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@173 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2006-06-05 07:06:19 +00:00
parent 26adc690ed
commit 07aee0e43f
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -1786,7 +1786,11 @@ void ChooseMiscGearForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bMiscC
usItem = PickARandomItem (MISCITEMS , bMiscClass, FALSE);
if ( usItem > 0 )
{
CreateItem( usItem, (INT8)(80 + Random( 21 )), &Object );
int bStatus = 80 + Random( 21 );
if ( Item[usItem].usItemClass == IC_MONEY )
bStatus = 1 + Random( 20 );
CreateItem( usItem, (INT8)(bStatus), &Object );
Object.fFlags |= OBJECT_UNDROPPABLE;
PlaceObjectInSoldierCreateStruct( pp, &Object );
}
+1 -1
View File
@@ -4699,7 +4699,7 @@ BOOLEAN CreateItem( UINT16 usItem, INT8 bStatus, OBJECTTYPE * pObj )
{
pObj->usItem = usItem;
pObj->ubNumberOfObjects = 1;
if (usItem == MONEY)
if (usItem == MONEY || Item[usItem].usItemClass == IC_MONEY )
{
// special case... always set status to 100 when creating
// and use status value to determine amount!