Merged from revision: 6905

Improved Snitch Trait (by anv)
- The snitch actions can be selected in the strategy view "Assignment" menu
o Spreading Propaganda: Accessible in town sectors
o Gathering Rumours: Accessible in town sectors
o Undercover Prison Snitch: Accessible from Facilities menu (Prison)
o Preventing Misbehaviour: New Snitch Menu
o Passive Reputation Increase
see: http://www.bears-pit.com/board/ubbthreads.php/topics/329412/1.html

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6906 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-02-12 17:22:40 +00:00
parent 3c95f4c9c2
commit 11037729f0
46 changed files with 3463 additions and 59 deletions
+14 -1
View File
@@ -10525,7 +10525,7 @@ UINT16 GetNumberOfPrisoners( UNDERGROUND_SECTORINFO *pSectorInfo, UINT8* apSpeci
return (UINT16)(pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_SPECIAL] + pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ELITE] + pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_REGULAR] + pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ADMIN]);
}
void ChangeNumberOfPrisoners( SECTORINFO *pSectorInfo, INT16 aSpecial, INT16 aElite, INT16 aRegular, INT16 aAdmin )
void ChangeNumberOfPrisoners( SECTORINFO *pSectorInfo, INT16 aSpecial, INT16 aElite, INT16 aRegular, INT16 aAdmin, INT16 sX, INT16 sY )
{
if ( !pSectorInfo )
return;
@@ -10534,6 +10534,19 @@ void ChangeNumberOfPrisoners( SECTORINFO *pSectorInfo, INT16 aSpecial, INT16 aEl
pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ELITE] = max(0, min(255, pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ELITE] + aElite) );
pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_REGULAR] = max(0, min(255, pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_REGULAR] + aRegular) );
pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ADMIN] = max(0, min(255, pSectorInfo->uiNumberOfPrisonersOfWar[PRISONER_ADMIN] + aAdmin) );
// anv: handle change of number of prisoners knowing snitch's identity
//if( sX != 0 && sY != 0 )
//{
// for( UINT8 cnt = 0; cnt < NUM_PROFILES; cnt++ )
// {
// if( gMercProfiles[ cnt ].ubExposedInSector[ SECTOR(sX, sY) ] != 0 )
// {
// gMercProfiles[ cnt ].ubExposedInSector[ SECTOR(sX, sY) ] = max( 0, min( 255, gMercProfiles[ cnt ].ubExposedInSector[ SECTOR(sX, sY) ] + aSpecial + aElite + aRegular + aAdmin ) );
// }
// }
//}
}
void ChangeNumberOfPrisoners( UNDERGROUND_SECTORINFO *pSectorInfo, INT16 aSpecial, INT16 aElite, INT16 aRegular, INT16 aAdmin )