Bazaar developer reference

CvGameLeagues::GetLeague(LeagueTypes)

Defined in
CvVotingClasses.cpp, line 7102
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_GetLeague

Hooks

static bool BeforeCvGameLeagues_GetLeague(CvGameLeagues* self, LeagueTypes eLeague, CvLeague*& result);static void AfterCvGameLeagues_GetLeague(CvGameLeagues* self, LeagueTypes eLeague, CvLeague*& result);static CvLeague* ReplaceCvGameLeagues_GetLeague(CvLeague* (*original)(CvGameLeagues*, LeagueTypes), CvGameLeagues* self, LeagueTypes eLeague);CivRegisterBefore<CivHooks::CvGameLeagues_GetLeague>(host, &BeforeCvGameLeagues_GetLeague);CivRegisterAfter<CivHooks::CvGameLeagues_GetLeague>(host, &AfterCvGameLeagues_GetLeague);CivRegisterReplace<CivHooks::CvGameLeagues_GetLeague>(host, &ReplaceCvGameLeagues_GetLeague);

Code

7102CvLeague* CvGameLeagues::GetLeague(LeagueTypes eLeague)7103{7104	CvLeague* pLeague = NULL;7105	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); it++)7106	{7107		if (it->GetID() == eLeague)7108		{7109			pLeague = it;7110		}7111	}7112	CvAssertMsg(pLeague != NULL, "CvLeague is NULL. Please send Anton your save file and version.");7113	return pLeague;7114}

Calls

Called by