Bazaar developer reference

CvLeague::SetInSession(LeagueSpecialSessionTypes)

Defined in
CvVotingClasses.cpp, line 2055
Class
CvLeague
Hook name
CivHooks::CvLeague_SetInSession_with_LeagueSpecialSessionTypes

Hooks

static bool BeforeCvLeague_SetInSession_with_LeagueSpecialSessionTypes(CvLeague* self, LeagueSpecialSessionTypes eSpecialSession);static void AfterCvLeague_SetInSession_with_LeagueSpecialSessionTypes(CvLeague* self, LeagueSpecialSessionTypes eSpecialSession);static void ReplaceCvLeague_SetInSession_with_LeagueSpecialSessionTypes(void (*original)(CvLeague*, LeagueSpecialSessionTypes), CvLeague* self, LeagueSpecialSessionTypes eSpecialSession);CivRegisterBefore<CivHooks::CvLeague_SetInSession_with_LeagueSpecialSessionTypes>(host, &BeforeCvLeague_SetInSession_with_LeagueSpecialSessionTypes);CivRegisterAfter<CivHooks::CvLeague_SetInSession_with_LeagueSpecialSessionTypes>(host, &AfterCvLeague_SetInSession_with_LeagueSpecialSessionTypes);CivRegisterReplace<CivHooks::CvLeague_SetInSession_with_LeagueSpecialSessionTypes>(host, &ReplaceCvLeague_SetInSession_with_LeagueSpecialSessionTypes);

Code

2055void CvLeague::SetInSession(LeagueSpecialSessionTypes eSpecialSession)2056{2057	CvAssertMsg(eSpecialSession != NO_LEAGUE_SPECIAL_SESSION, "Attempting to set the league in session with an invalid special session type. Please send Anton your save file and version.");2058	if (eSpecialSession != NO_LEAGUE_SPECIAL_SESSION)2059	{2060		SetInSession(true);2061		m_eCurrentSpecialSession = eSpecialSession;2062	}2063}

Calls

Called by