Bazaar developer reference

CvLeague::CanStartSpecialSession(LeagueSpecialSessionTypes)

Defined in
CvVotingClasses.cpp, line 2188
Class
CvLeague
Hook name
CivHooks::CvLeague_CanStartSpecialSession

Hooks

static bool BeforeCvLeague_CanStartSpecialSession(CvLeague* self, LeagueSpecialSessionTypes arg0, bool& result);static void AfterCvLeague_CanStartSpecialSession(CvLeague* self, LeagueSpecialSessionTypes arg0, bool& result);static bool ReplaceCvLeague_CanStartSpecialSession(bool (*original)(CvLeague*, LeagueSpecialSessionTypes), CvLeague* self, LeagueSpecialSessionTypes arg0);CivRegisterBefore<CivHooks::CvLeague_CanStartSpecialSession>(host, &BeforeCvLeague_CanStartSpecialSession);CivRegisterAfter<CivHooks::CvLeague_CanStartSpecialSession>(host, &AfterCvLeague_CanStartSpecialSession);CivRegisterReplace<CivHooks::CvLeague_CanStartSpecialSession>(host, &ReplaceCvLeague_CanStartSpecialSession);

Code

2188bool CvLeague::CanStartSpecialSession(LeagueSpecialSessionTypes /*eSpecialSession*/)2189{2190	// Cannot already be in session2191	if (IsInSession())2192		return false;21932194	// Cannot have proposals on hold2195	if (HasProposalsOnHold())2196		return false;21972198	// Cannot be awaiting proposals or votes from anyone (UI complications with overview screen)2199	for (MemberList::iterator it = m_vMembers.begin(); it != m_vMembers.end(); ++it)2200	{2201		if (CanPropose(it->ePlayer) || CanVote(it->ePlayer))2202		{2203			return false;2204		}2205	}2206	2207	return true;2208}

Calls

Called by