mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +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:
+15
-3
@@ -747,11 +747,23 @@ BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
gArmsDealersInventory.resize(dealers);
|
||||
|
||||
if (!FileRead( hFile, gArmsDealerStatus, sizeof( gArmsDealerStatus ), &uiNumBytesRead ))
|
||||
if ( guiCurrentSaveGameVersion >= NONPROFILE_MERCHANTS )
|
||||
{
|
||||
return( FALSE );
|
||||
if ( !FileRead( hFile, gArmsDealerStatus, sizeof(gArmsDealerStatus), &uiNumBytesRead ) )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Flugente: as we increased the number of dealers, we can only read part of the array
|
||||
if ( !FileRead( hFile, gArmsDealerStatus, sizeof(ARMS_DEALER_STATUS) * 40, &uiNumBytesRead ) )
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
//loop through all the dealers inventories
|
||||
@@ -2179,7 +2191,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
}
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bScopeMode, sizeof(bScopeMode), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->ubMilitiaAssists, sizeof(ubMilitiaAssists), sizeof(UINT8), numBytesRead );
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bUnusedINT8_2, sizeof(bUnusedINT8_2), sizeof(INT8), numBytesRead );
|
||||
numBytesRead = ReadFieldByField(hFile, &this->sNonNPCTraderID, sizeof(sNonNPCTraderID), sizeof(INT8), numBytesRead );
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bUnusedINT8_3, sizeof(bUnusedINT8_3), sizeof(INT8), numBytesRead );
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bUnusedINT16_4, sizeof(bUnusedINT16_4), sizeof(INT16), numBytesRead );
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bUnusedINT16_5, sizeof(bUnusedINT16_5), sizeof(INT16), numBytesRead );
|
||||
|
||||
Reference in New Issue
Block a user