mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
New feature: Diseaes affect your mercenaries. They can be contracted in varíous ways and have varying effects.
For more info, see http://www.ja-galaxy-forum.com/ubbthreads.php/topics/334918#Post334918 Requires GameDir >= r2099. Does not break savegame compatibility. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7384 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -54,7 +54,9 @@ drugsStartElementHandle(void *userData, const XML_Char *name, const XML_Char **a
|
||||
strcmp(name, "ubDrugEffect") == 0 ||
|
||||
strcmp(name, "ubDrugSideEffect") == 0 ||
|
||||
strcmp(name, "ubDrugSideEffectRate") == 0 ||
|
||||
strcmp(name, "ubMoralBacklash") ))
|
||||
strcmp(name, "ubMoralBacklash" ) == 0 ||
|
||||
strcmp(name, "ubMoralBacklash" ) == 0 ||
|
||||
strcmp(name, "ubDiseaseCure" ) == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
|
||||
@@ -142,6 +144,11 @@ drugsEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curDrugs.ubMoralBacklash = (UINT8) atol(pData->szCharData);
|
||||
}
|
||||
else if ( strcmp( name, "ubDiseaseCure" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curDrugs.ubDiseaseCure = (UINT8)atol( pData->szCharData );
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
@@ -241,6 +248,7 @@ BOOLEAN WriteDrugsStats()
|
||||
FilePrintf(hFile,"\t\t<ubDrugSideEffect>%d</ubDrugSideEffect>\r\n", Drug[cnt].ubDrugSideEffect );
|
||||
FilePrintf(hFile,"\t\t<ubDrugSideEffectRate>%d</ubDrugSideEffectRate>\r\n", Drug[cnt].ubDrugSideEffectRate );
|
||||
FilePrintf(hFile,"\t\t<ubMoralBacklash>%d</ubMoralBacklash>\r\n", Drug[cnt].ubMoralBacklash );
|
||||
FilePrintf(hFile,"\t\t<ubDiseaseCure>%d</ubDiseaseCure>\r\n", Drug[cnt].ubDiseaseCure );
|
||||
|
||||
FilePrintf(hFile,"\t</DRUG>\r\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user