Store the profile type in the profile structure and remove superfluous code

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8620 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-09-24 19:36:28 +00:00
parent 8ae2eacfcd
commit 494dbc6e69
41 changed files with 385 additions and 942 deletions
+4 -6
View File
@@ -853,11 +853,11 @@ void HandleEarlyMorningEvents( void )
UINT32 uiAmount;
// loop through all *NPCs* and reset "default response used recently" flags
//for (cnt = FIRST_RPC; cnt < GASTON; cnt++)
for (cnt = 0; cnt < NUM_PROFILES; cnt++)
for (cnt = 0; cnt < NUM_PROFILES; ++cnt)
{
//new profiles by Jazz
if ( gProfilesRPC[cnt].ProfilId == cnt || gProfilesNPC[cnt].ProfilId == cnt || gProfilesVehicle[cnt].ProfilId == cnt )
if ( gMercProfiles[cnt].Type == PROFILETYPE_RPC ||
gMercProfiles[cnt].Type == PROFILETYPE_NPC ||
gMercProfiles[cnt].Type == PROFILETYPE_VEHICLE )
{
gMercProfiles[cnt].bFriendlyOrDirectDefaultResponseUsedRecently = FALSE;
gMercProfiles[cnt].bRecruitDefaultResponseUsedRecently = FALSE;
@@ -886,7 +886,6 @@ void HandleEarlyMorningEvents( void )
}
}
if( gMercProfiles[ TONY ].ubLastDateSpokenTo > 0 && !( gWorldSectorX == 5 && gWorldSectorY == MAP_ROW_C && gbWorldSectorZ == 0 ) )
{
// San Mona C5 is not loaded so make Tony possibly not availableif
@@ -906,7 +905,6 @@ void HandleEarlyMorningEvents( void )
}
}
if ( gMercProfiles[ DEVIN ].ubLastDateSpokenTo == 0 )
{
// Does Devin move?