mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New feature: bloodcat/zombie/bandit raids on player-controlled sectors
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23711&goto=353154&#msg_353154 Requires GameDir >= r2420 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8554 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -99,7 +99,10 @@ SectorNameStartElementHandle(void *userData, const XML_Char *name, const char **
|
||||
strcmp(name, "snowchance" ) == 0 ||
|
||||
strcmp(name, "snakechance" ) == 0 ||
|
||||
strcmp(name, "numsnakes" ) == 0 ||
|
||||
strcmp(name, "maxworkers" ) == 0 ))
|
||||
strcmp(name, "maxworkers" ) == 0 ||
|
||||
strcmp(name, "bloodcatraidpossible" ) == 0 ||
|
||||
strcmp(name, "zombieraidpossible" ) == 0 ||
|
||||
strcmp(name, "banditraidpossible" ) == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
|
||||
@@ -230,7 +233,12 @@ SectorNameEndElementHandle(void *userData, const XML_Char *name)
|
||||
SectorExternalData[ubSectorId][1].maxworkers = 0;
|
||||
SectorExternalData[ubSectorId][2].maxworkers = 0;
|
||||
SectorExternalData[ubSectorId][3].maxworkers = 0;
|
||||
|
||||
|
||||
SectorExternalData[ubSectorId][0].usSectorFlagMask = pData->sectordata.usSectorFlagMask;
|
||||
SectorExternalData[ubSectorId][1].usSectorFlagMask = 0;
|
||||
SectorExternalData[ubSectorId][2].usSectorFlagMask = 0;
|
||||
SectorExternalData[ubSectorId][3].usSectorFlagMask = 0;
|
||||
|
||||
if ( !prisonroomvector.empty( ) )
|
||||
{
|
||||
std::vector<UINT16>::iterator itend = prisonroomvector.end( );
|
||||
@@ -255,6 +263,7 @@ SectorNameEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->sectordata.snakechance = 0;
|
||||
pData->sectordata.numsnakes = 0;
|
||||
pData->sectordata.maxworkers = 0;
|
||||
pData->sectordata.usSectorFlagMask = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -378,6 +387,24 @@ SectorNameEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->sectordata.maxworkers = (UINT8)atoi( pData->szCharData );
|
||||
}
|
||||
else if ( strcmp( name, "bloodcatraidpossible" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
if ( (UINT8)atoi( pData->szCharData ) )
|
||||
pData->sectordata.usSectorFlagMask |= SECTORFLAG_RAIDPOSSIBLE_BLOODCAT;
|
||||
}
|
||||
else if ( strcmp( name, "zombieraidpossible" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
if ( (UINT8)atoi( pData->szCharData ) )
|
||||
pData->sectordata.usSectorFlagMask |= SECTORFLAG_RAIDPOSSIBLE_ZOMBIE;
|
||||
}
|
||||
else if ( strcmp( name, "banditraidpossible" ) == 0 )
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
if ( (UINT8)atoi( pData->szCharData ) )
|
||||
pData->sectordata.usSectorFlagMask |= SECTORFLAG_RAIDPOSSIBLE_BANDIT;
|
||||
}
|
||||
|
||||
pData->maxReadDepth--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user