Bazaar developer reference

CvGameLeagues::GetFeatureYieldChange(PlayerTypes, FeatureTypes, YieldTypes)

Defined in
CvVotingClasses.cpp, line 7221
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_GetFeatureYieldChange

Hooks

static bool BeforeCvGameLeagues_GetFeatureYieldChange(CvGameLeagues* self, PlayerTypes ePlayer, FeatureTypes eFeature, YieldTypes eYield, int& result);static void AfterCvGameLeagues_GetFeatureYieldChange(CvGameLeagues* self, PlayerTypes ePlayer, FeatureTypes eFeature, YieldTypes eYield, int& result);static int ReplaceCvGameLeagues_GetFeatureYieldChange(int (*original)(CvGameLeagues*, PlayerTypes, FeatureTypes, YieldTypes), CvGameLeagues* self, PlayerTypes ePlayer, FeatureTypes eFeature, YieldTypes eYield);CivRegisterBefore<CivHooks::CvGameLeagues_GetFeatureYieldChange>(host, &BeforeCvGameLeagues_GetFeatureYieldChange);CivRegisterAfter<CivHooks::CvGameLeagues_GetFeatureYieldChange>(host, &AfterCvGameLeagues_GetFeatureYieldChange);CivRegisterReplace<CivHooks::CvGameLeagues_GetFeatureYieldChange>(host, &ReplaceCvGameLeagues_GetFeatureYieldChange);

Code

7221int CvGameLeagues::GetFeatureYieldChange(PlayerTypes ePlayer, FeatureTypes eFeature, YieldTypes eYield)7222{7223	int iValue = 0;7224	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); it++)7225	{7226		if (it->IsMember(ePlayer))7227		{7228			int iLeagueMod = it->GetFeatureYieldChange(eFeature, eYield);7229			if (iLeagueMod != 0)7230			{7231				iValue += iLeagueMod;7232			}7233		}7234	}7235	return iValue;7236}

Calls

Called by