Bazaar developer reference

CvGameLeagues::GetResearchMod(PlayerTypes, TechTypes)

Defined in
CvVotingClasses.cpp, line 7204
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_GetResearchMod

Hooks

static bool BeforeCvGameLeagues_GetResearchMod(CvGameLeagues* self, PlayerTypes ePlayer, TechTypes eTech, int& result);static void AfterCvGameLeagues_GetResearchMod(CvGameLeagues* self, PlayerTypes ePlayer, TechTypes eTech, int& result);static int ReplaceCvGameLeagues_GetResearchMod(int (*original)(CvGameLeagues*, PlayerTypes, TechTypes), CvGameLeagues* self, PlayerTypes ePlayer, TechTypes eTech);CivRegisterBefore<CivHooks::CvGameLeagues_GetResearchMod>(host, &BeforeCvGameLeagues_GetResearchMod);CivRegisterAfter<CivHooks::CvGameLeagues_GetResearchMod>(host, &AfterCvGameLeagues_GetResearchMod);CivRegisterReplace<CivHooks::CvGameLeagues_GetResearchMod>(host, &ReplaceCvGameLeagues_GetResearchMod);

Code

7204int CvGameLeagues::GetResearchMod(PlayerTypes ePlayer, TechTypes eTech)7205{7206	int iValue = 0;7207	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); it++)7208	{7209		if (it->IsMember(ePlayer))7210		{7211			int iLeagueMod = it->GetResearchMod(eTech);7212			if (iLeagueMod != 0)7213			{7214				iValue += iLeagueMod;7215			}7216		}7217	}7218	return iValue;7219}

Calls

Called by