mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- new option for automatic IMP item distribution:
uiIndex 52 "Sidearm" in IMPItemChoices.xml is used to give the IMP a standard sidearm based on random selection. It is encouraged to remove marksmanship based gun choices and instead add special weaponry for traits. - The following changes are supposed to remove useless items from vendors and other lists: Function ItemIsLegal now filters out food items if the food system is off. The same applies to cleaning kits if the dirt system is off. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7722 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -623,6 +623,8 @@ void GiveItemsToPC( UINT8 ubProfileId )
|
||||
|
||||
GiveIMPItems(pProfile, 100, IMP_DEFAULT);
|
||||
GiveIMPRandomItems(pProfile, IMP_RANDOMDEFAULT);
|
||||
// silversurfer: added sidearm selection
|
||||
GiveIMPRandomItems(pProfile, IMP_SIDEARM);
|
||||
|
||||
GiveIMPItems (pProfile,pProfile->bWisdom,IMP_WISDOM);
|
||||
GiveIMPItems (pProfile,pProfile->bMarksmanship,IMP_MARKSMANSHIP);
|
||||
@@ -1686,7 +1688,8 @@ void GiveIMPRandomItems( MERCPROFILESTRUCT *pProfile, UINT8 typeIndex )
|
||||
for ( UINT8 cnt=0; cnt < ubNumChoices; ++cnt )
|
||||
{
|
||||
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ cnt ];
|
||||
if ( ItemIsLegal(usItem) )
|
||||
// allow guns no matter if Tons of Guns was selected so the merc doesn't have to start without a weapon
|
||||
if ( ItemIsLegal(usItem) || Item[usItem].usItemClass == IC_GUN )
|
||||
++ubValidChoices;
|
||||
}
|
||||
|
||||
@@ -1710,7 +1713,7 @@ void GiveIMPRandomItems( MERCPROFILESTRUCT *pProfile, UINT8 typeIndex )
|
||||
iChoice = Random( ubNumChoices );
|
||||
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
|
||||
// is this legal and we don't have it already?
|
||||
if (ItemIsLegal(usItem) && !ubItemsGiven[iChoice] )
|
||||
if ( (ItemIsLegal(usItem) || Item[usItem].usItemClass == IC_GUN) && !ubItemsGiven[iChoice] )
|
||||
ubItemsGiven[iChoice] = TRUE;
|
||||
else
|
||||
usItem=0;
|
||||
|
||||
Reference in New Issue
Block a user