mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
New feature: riot shields protect against damage from some directions.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23452&start=0& git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8434 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+17
-2
@@ -291,7 +291,9 @@ itemStartElementHandle(void *userData, const XML_Char *name, const XML_Char **at
|
||||
strcmp(name, "cigarette" ) == 0 ||
|
||||
strcmp(name, "usPortionSize" ) == 0 ||
|
||||
strcmp(name, "diseaseprotectionface" ) == 0 ||
|
||||
strcmp(name, "diseaseprotectionhand" ) == 0))
|
||||
strcmp(name, "diseaseprotectionhand" ) == 0||
|
||||
strcmp(name, "usRiotShieldStrength" ) == 0 ||
|
||||
strcmp(name, "usRiotShieldGraphic" ) == 0))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
//DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("itemStartElementHandle: going into element, name = %s",name) );
|
||||
@@ -1499,6 +1501,16 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
if ( val )
|
||||
pData->curItem.usItemFlag |= DISEASEPROTECTION_2;
|
||||
}
|
||||
else if ( strcmp( name, "usRiotShieldStrength" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.usRiotShieldStrength = min( 100, (UINT16)atol( pData->szCharData ) );
|
||||
}
|
||||
else if ( strcmp( name, "usRiotShieldGraphic" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curItem.usRiotShieldGraphic = (UINT16)atol( pData->szCharData );
|
||||
}
|
||||
|
||||
--pData->maxReadDepth;
|
||||
}
|
||||
@@ -2128,7 +2140,7 @@ BOOLEAN WriteItemStats()
|
||||
FilePrintf(hFile,"\t\t<usSpotting>%d</usSpotting>\r\n", Item[cnt].usSpotting );
|
||||
FilePrintf(hFile,"\t\t<sBackpackWeightModifier>%d</sBackpackWeightModifier>\r\n", Item[cnt].sBackpackWeightModifier);
|
||||
FilePrintf(hFile,"\t\t<fAllowClimbing>%d</fAllowClimbing>\r\n", Item[cnt].fAllowClimbing);
|
||||
FilePrintf(hFile, "\t\t<cigarette>%d</cigarette>\r\n", Item[cnt].cigarette );
|
||||
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 )
|
||||
@@ -2136,6 +2148,9 @@ BOOLEAN WriteItemStats()
|
||||
if ( Item[cnt].usItemFlag & DISEASEPROTECTION_2 )
|
||||
FilePrintf( hFile, "\t\t<diseaseprotectionhand>%d</diseaseprotectionhand>\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 );
|
||||
|
||||
FilePrintf(hFile,"\t</ITEM>\r\n");
|
||||
}
|
||||
FilePrintf(hFile,"</ITEMLIST>\r\n");
|
||||
|
||||
Reference in New Issue
Block a user