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
+43 -7
View File
@@ -1505,22 +1505,34 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
// Flugente: backgrounds
if(guiCurrentSaveGameVersion >= BACKGROUNDS)
{
if(guiCurrentSaveGameVersion >= BACKGROUNDS_FIX_UINT8)
{
if ( !FileRead( hFile, &this->usBackground, sizeof(UINT16), &uiNumBytesRead ) )
if(guiCurrentSaveGameVersion >= BACKGROUNDS_FIX_UINT8)
{
if ( !FileRead( hFile, &this->usBackground, sizeof(UINT16), &uiNumBytesRead ) )
{
return(FALSE);
}
}
else
{
if ( !FileRead( hFile, &this->usBackground, sizeof(UINT8), &uiNumBytesRead ) )
{
return(FALSE);
}
}
else
{
if ( !FileRead( hFile, &this->usBackground, sizeof(UINT8), &uiNumBytesRead ) )
}
if(guiCurrentSaveGameVersion >= SNITCH_TRAIT_EXTENDED)
{
//if ( !FileRead( hFile, &this->ubExposedInSector, sizeof(ubExposedInSector), &uiNumBytesRead ) )
//{
// return(FALSE);
//}
if ( !FileRead( hFile, &this->ubSnitchExposedCooldown, sizeof(ubSnitchExposedCooldown), &uiNumBytesRead ) )
{
return(FALSE);
}
}
}
}
if ( this->uiProfileChecksum != this->GetChecksum() )
{
return( FALSE );
@@ -1605,6 +1617,16 @@ BOOLEAN MERCPROFILESTRUCT::Save(HWFILE hFile)
return(FALSE);
}
//if ( !FileWrite( hFile, &this->ubExposedInSector, sizeof(ubExposedInSector), &uiNumBytesWritten ) )
//{
// return(FALSE);
//}
if ( !FileWrite( hFile, &this->ubSnitchExposedCooldown, sizeof(ubSnitchExposedCooldown), &uiNumBytesWritten ) )
{
return(FALSE);
}
return TRUE;
}
@@ -2203,6 +2225,20 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
buffer -= 6;
}
if ( guiCurrentSaveGameVersion >= SNITCH_TRAIT_EXTENDED )
{
numBytesRead = ReadFieldByField(hFile, &this->bSoldierFlagMask2, sizeof(bSoldierFlagMask2), sizeof(INT32), numBytesRead);
}
else
{
this->bSoldierFlagMask2 = 0;
for(int i = 0; i < sizeof(bSoldierFlagMask2); ++i)
buffer++;
while((buffer%4) > 0)
buffer++;
}
/*if ( guiCurrentSaveGameVersion >= FOOD_CHANGES )
{
numBytesRead = ReadFieldByField(hFile, &this->bFoodLevel, sizeof(bFoodLevel), sizeof(INT32), numBytesRead);