mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
A paramedic can use empty bloodbags (<emptybloodbag>-tag, item #1756) to create blood bags (<bloodbag>-tag, item #1757) from other mercs. These can then boost the health returned by surgery by ONTOP_PERCENT_SURGERY_HEAL_BLOODBAG percent.
Requires GameDir >= r2467. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8662 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+23
-7
@@ -294,7 +294,9 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
|
||||
strcmp(name, "diseaseprotectionface" ) == 0 ||
|
||||
strcmp(name, "diseaseprotectionhand" ) == 0||
|
||||
strcmp(name, "usRiotShieldStrength" ) == 0 ||
|
||||
strcmp(name, "usRiotShieldGraphic" ) == 0))
|
||||
strcmp(name, "usRiotShieldGraphic" ) == 0 ||
|
||||
strcmp(name, "bloodbag" ) == 0 ||
|
||||
strcmp(name, "emptybloodbag" ) == 0))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("itemStartElementHandle: going into element, name = %s",name) );
|
||||
@@ -1372,7 +1374,7 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "ItemFlag") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.usItemFlag = (UINT32) strtoul(pData->szCharData, NULL, 0);
|
||||
pData->curItem.usItemFlag = (UINT64) strtoul(pData->szCharData, NULL, 0);
|
||||
}
|
||||
else if(strcmp(name, "FoodType") == 0)
|
||||
{
|
||||
@@ -1517,6 +1519,20 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.usRiotShieldGraphic = (UINT16)atol( pData->szCharData );
|
||||
}
|
||||
else if ( strcmp( name, "bloodbag" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
if ( (BOOLEAN)atol( pData->szCharData ) )
|
||||
pData->curItem.usItemFlag |= BLOOD_BAG;
|
||||
}
|
||||
else if ( strcmp( name, "emptybloodbag" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
if ( (BOOLEAN)atol( pData->szCharData ) )
|
||||
pData->curItem.usItemFlag |= EMPTY_BLOOD_BAG;
|
||||
}
|
||||
|
||||
--pData->maxReadDepth;
|
||||
}
|
||||
@@ -2150,11 +2166,11 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t<cigarette>%d</cigarette>\r\n", Item[cnt].cigarette );
|
||||
FilePrintf(hFile,"\t\t<usPortionSize>%d</usPortionSize>\r\n", Item[cnt].usPortionSize );
|
||||
|
||||
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_1 )
|
||||
FilePrintf( hFile, "\t\t<diseaseprotectionface>%d</diseaseprotectionface>\r\n", 1 );
|
||||
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_2 )
|
||||
FilePrintf( hFile, "\t\t<diseaseprotectionhand>%d</diseaseprotectionhand>\r\n", 1 );
|
||||
|
||||
if ( HasItemFlag( cnt, DISEASEPROTECTION_1 ) ) FilePrintf( hFile, "\t\t<diseaseprotectionface>%d</diseaseprotectionface>\r\n", 1 );
|
||||
if ( HasItemFlag( cnt, DISEASEPROTECTION_2 ) ) FilePrintf( hFile, "\t\t<diseaseprotectionhand>%d</diseaseprotectionhand>\r\n", 1 );
|
||||
if ( HasItemFlag( cnt, BLOOD_BAG) ) FilePrintf( hFile, "\t\t<bloodbag>%d</bloodbag>\r\n", 1 );
|
||||
if ( HasItemFlag( cnt, EMPTY_BLOOD_BAG ) ) FilePrintf( hFile, "\t\t<emptybloodbag>%d</emptybloodbag>\r\n", 1 );
|
||||
|
||||
FilePrintf(hFile,"\t\t<usRiotShieldStrength>%d</usRiotShieldStrength>\r\n", Item[cnt].usRiotShieldStrength );
|
||||
FilePrintf(hFile,"\t\t<usRiotShieldGraphic>%d</usRiotShieldGraphic>\r\n", Item[cnt].usRiotShieldGraphic );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user