Bazaar developer reference

CvGameLeagues::GetActiveLeague()

Defined in
CvVotingClasses.cpp, line 7116
Class
CvGameLeagues
Hook name
CivHooks::CvGameLeagues_GetActiveLeague

Hooks

static bool BeforeCvGameLeagues_GetActiveLeague(CvGameLeagues* self, CvLeague*& result);static void AfterCvGameLeagues_GetActiveLeague(CvGameLeagues* self, CvLeague*& result);static CvLeague* ReplaceCvGameLeagues_GetActiveLeague(CvLeague* (*original)(CvGameLeagues*), CvGameLeagues* self);CivRegisterBefore<CivHooks::CvGameLeagues_GetActiveLeague>(host, &BeforeCvGameLeagues_GetActiveLeague);CivRegisterAfter<CivHooks::CvGameLeagues_GetActiveLeague>(host, &AfterCvGameLeagues_GetActiveLeague);CivRegisterReplace<CivHooks::CvGameLeagues_GetActiveLeague>(host, &ReplaceCvGameLeagues_GetActiveLeague);

Code

7116CvLeague* CvGameLeagues::GetActiveLeague()7117{7118	CvLeague* pLeague = NULL;7119	for (LeagueList::iterator it = m_vActiveLeagues.begin(); it != m_vActiveLeagues.end(); it++)7120	{7121		pLeague = it;7122	}7123	CvAssertMsg(GetNumActiveLeagues() == 0 || GetNumActiveLeagues() == 1, "Unexpected number of active leagues. Please send Anton your save file and version.");7124	return pLeague;7125}

Calls

Called by