Bazaar developer reference

CvGameLeagues::GetCityTourismModifier(PlayerTypes, const CvCity *)

Defined in
CvVotingClasses.cpp, line 7270
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_GetCityTourismModifier

Hooks

static bool BeforeCvGameLeagues_GetCityTourismModifier(CvGameLeagues* self, PlayerTypes ePlayer, const CvCity* pCity, int& result);static void AfterCvGameLeagues_GetCityTourismModifier(CvGameLeagues* self, PlayerTypes ePlayer, const CvCity* pCity, int& result);static int ReplaceCvGameLeagues_GetCityTourismModifier(int (*original)(CvGameLeagues*, PlayerTypes, const CvCity*), CvGameLeagues* self, PlayerTypes ePlayer, const CvCity* pCity);CivRegisterBefore<CivHooks::CvGameLeagues_GetCityTourismModifier>(host, &BeforeCvGameLeagues_GetCityTourismModifier);CivRegisterAfter<CivHooks::CvGameLeagues_GetCityTourismModifier>(host, &AfterCvGameLeagues_GetCityTourismModifier);CivRegisterReplace<CivHooks::CvGameLeagues_GetCityTourismModifier>(host, &ReplaceCvGameLeagues_GetCityTourismModifier);

Code

7270int CvGameLeagues::GetCityTourismModifier(PlayerTypes ePlayer, const CvCity* pCity)7271{7272	int iValue = 0;7273	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); ++it)7274	{7275		if (it->IsMember(ePlayer))7276		{7277			int iLeagueMod = it->GetCityTourismModifier(pCity);7278			if (iLeagueMod != 0)7279			{7280				iValue += iLeagueMod;7281			}7282		}7283	}7284	return iValue;7285}

Calls

Called by