mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
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:
@@ -36,15 +36,16 @@
|
||||
|
||||
void InitializeProfilesForTownReputation( void )
|
||||
{
|
||||
UINT32 uiProfileId = 0;
|
||||
|
||||
// initialize the town opinion values in each recruitable merc's profile structure
|
||||
//for( uiProfileId = 0; uiProfileId < FIRST_NPC; uiProfileId++ )
|
||||
//new profiles by Jazz
|
||||
for( uiProfileId = 0; uiProfileId < NUM_PROFILES; uiProfileId++ )
|
||||
for( UINT32 uiProfileId = 0; uiProfileId < NUM_PROFILES; ++uiProfileId )
|
||||
{
|
||||
if ( gProfilesIMP[uiProfileId].ProfilId == uiProfileId || gProfilesRPC[uiProfileId].ProfilId == uiProfileId || gProfilesAIM[uiProfileId].ProfilId == uiProfileId || gProfilesMERC[uiProfileId].ProfilId == uiProfileId)
|
||||
memset( &( gMercProfiles[ uiProfileId ].bMercTownReputation ), INITIAL_TOWN_REPUTATION, sizeof( gMercProfiles[ uiProfileId ].bMercTownReputation ) );
|
||||
if ( gMercProfiles[uiProfileId].Type == PROFILETYPE_AIM ||
|
||||
gMercProfiles[uiProfileId].Type == PROFILETYPE_MERC ||
|
||||
gMercProfiles[uiProfileId].Type == PROFILETYPE_RPC ||
|
||||
gMercProfiles[uiProfileId].Type == PROFILETYPE_IMP )
|
||||
memset( &( gMercProfiles[ uiProfileId ].bMercTownReputation ), INITIAL_TOWN_REPUTATION, sizeof( gMercProfiles[ uiProfileId ].bMercTownReputation ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,22 +132,22 @@ void UpdateTownOpinionOfThisMercForSoldier( SOLDIERTYPE *pSoldier, UINT8 ubTownI
|
||||
|
||||
void HandleSpreadOfAllTownsOpinion( void )
|
||||
{
|
||||
UINT8 ubProfileId;
|
||||
|
||||
// debug message
|
||||
ScreenMsg( MSG_FONT_RED, MSG_DEBUG, L"%s - Spreading town opinions about mercs", WORLDTIMESTR );
|
||||
|
||||
// run though all player-recruitable profiles and update towns opinion of mercs
|
||||
//for( ubProfileId = 0; ubProfileId < FIRST_NPC; ubProfileId++ )
|
||||
//new profiles by Jazz
|
||||
for( ubProfileId = 0; ubProfileId < NUM_PROFILES; ubProfileId++ )
|
||||
for( int ubProfileId = 0; ubProfileId < NUM_PROFILES; ++ubProfileId )
|
||||
{
|
||||
if ( gProfilesIMP[ubProfileId].ProfilId == ubProfileId || gProfilesAIM[ubProfileId].ProfilId == ubProfileId || gProfilesMERC[ubProfileId].ProfilId == ubProfileId || gProfilesRPC[ubProfileId].ProfilId == ubProfileId)
|
||||
HandleSpreadOfTownOpinionForMerc( ubProfileId );
|
||||
if ( gMercProfiles[ubProfileId].Type == PROFILETYPE_AIM ||
|
||||
gMercProfiles[ubProfileId].Type == PROFILETYPE_MERC ||
|
||||
gMercProfiles[ubProfileId].Type == PROFILETYPE_RPC ||
|
||||
gMercProfiles[ubProfileId].Type == PROFILETYPE_IMP )
|
||||
HandleSpreadOfTownOpinionForMerc( ubProfileId );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HandleSpreadOfTownOpinionForMerc( UINT8 ubProfileId )
|
||||
{
|
||||
// handle opinion spread for this grunt
|
||||
|
||||
Reference in New Issue
Block a user