Bazaar developer reference

CvGameLeagues::GetPressureForIdeology(PlayerTypes, PolicyBranchTypes)

Defined in
CvVotingClasses.cpp, line 7304
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_GetPressureForIdeology

Hooks

static bool BeforeCvGameLeagues_GetPressureForIdeology(CvGameLeagues* self, PlayerTypes ePlayer, PolicyBranchTypes eIdeology, int& result);static void AfterCvGameLeagues_GetPressureForIdeology(CvGameLeagues* self, PlayerTypes ePlayer, PolicyBranchTypes eIdeology, int& result);static int ReplaceCvGameLeagues_GetPressureForIdeology(int (*original)(CvGameLeagues*, PlayerTypes, PolicyBranchTypes), CvGameLeagues* self, PlayerTypes ePlayer, PolicyBranchTypes eIdeology);CivRegisterBefore<CivHooks::CvGameLeagues_GetPressureForIdeology>(host, &BeforeCvGameLeagues_GetPressureForIdeology);CivRegisterAfter<CivHooks::CvGameLeagues_GetPressureForIdeology>(host, &AfterCvGameLeagues_GetPressureForIdeology);CivRegisterReplace<CivHooks::CvGameLeagues_GetPressureForIdeology>(host, &ReplaceCvGameLeagues_GetPressureForIdeology);

Code

7304int CvGameLeagues::GetPressureForIdeology(PlayerTypes ePlayer, PolicyBranchTypes eIdeology)7305{7306	int iValue = 0;7307	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); ++it)7308	{7309		if (it->IsMember(ePlayer))7310		{7311			int iLeagueMod = it->GetPressureForIdeology(eIdeology);7312			if (iLeagueMod != 0)7313			{7314				iValue += iLeagueMod;7315			}7316		}7317	}7318	return iValue;7319}

Calls

Called by