mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
New feature: We can now create non-profile-based merchants via lua.scripts.
Requires GameDir >= r2320. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23061&goto=345526&#msg_345526 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8212 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -65,7 +65,8 @@ merchantStartElementHandle(void *userData, const XML_Char *name, const XML_Char
|
||||
strcmp(name, "daysDelayMin") == 0 ||
|
||||
strcmp(name, "daysDelayMax") == 0 ||
|
||||
strcmp(name, "useBRSetting") == 0 ||
|
||||
strcmp(name, "allInventoryAlwaysAvailable") == 0 ))
|
||||
strcmp(name, "allInventoryAlwaysAvailable" ) == 0 ||
|
||||
strcmp(name, "nonprofile_loyaltyrequired") == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
|
||||
@@ -223,6 +224,11 @@ merchantEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curMerchant.allInventoryAlwaysAvailable = (BOOLEAN) atol(pData->szCharData);
|
||||
}
|
||||
else if ( strcmp( name, "nonprofile_loyaltyrequired" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curMerchant.nonprofile_loyaltyrequired = (UINT8)strtoul( pData->szCharData, NULL, 0 );
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
@@ -333,6 +339,7 @@ BOOLEAN WriteMerchantStats()
|
||||
FilePrintf(hFile,"\t\t<daysDelayMax>%d</daysDelayMax>\r\n", armsDealerInfo[cnt].daysDelayMax );
|
||||
FilePrintf(hFile,"\t\t<useBRSetting>%d</useBRSetting>\r\n", armsDealerInfo[cnt].useBRSetting );
|
||||
FilePrintf(hFile,"\t\t<allInventoryAlwaysAvailable>%d</allInventoryAlwaysAvailable>\r\n", armsDealerInfo[cnt].allInventoryAlwaysAvailable );
|
||||
FilePrintf(hFile,"\t\t<nonprofile_loyaltyrequired>%d</nonprofile_loyaltyrequired>\r\n", armsDealerInfo[cnt].nonprofile_loyaltyrequired );
|
||||
|
||||
FilePrintf(hFile,"\t</MERCHANT>\r\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user