Bazaar developer reference

CvGame::isProjectMaxedOut(ProjectTypes, int)

Defined in
CvGame.cpp, line 7419
Class
CvGame
Hook name
CivHooks::CvGame_isProjectMaxedOut

Hooks

static bool BeforeCvGame_isProjectMaxedOut(CvGame* self, ProjectTypes eIndex, int iExtra, bool& result);static void AfterCvGame_isProjectMaxedOut(CvGame* self, ProjectTypes eIndex, int iExtra, bool& result);static bool ReplaceCvGame_isProjectMaxedOut(bool (*original)(CvGame*, ProjectTypes, int), CvGame* self, ProjectTypes eIndex, int iExtra);CivRegisterBefore<CivHooks::CvGame_isProjectMaxedOut>(host, &BeforeCvGame_isProjectMaxedOut);CivRegisterAfter<CivHooks::CvGame_isProjectMaxedOut>(host, &AfterCvGame_isProjectMaxedOut);CivRegisterReplace<CivHooks::CvGame_isProjectMaxedOut>(host, &ReplaceCvGame_isProjectMaxedOut);

Code

7419bool CvGame::isProjectMaxedOut(ProjectTypes eIndex, int iExtra)7420{7421	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");7422	CvAssertMsg(eIndex < GC.getNumProjectInfos(), "eIndex is expected to be within maximum bounds (invalid Index)");74237424	if(!isWorldProject(eIndex))7425	{7426		return false;7427	}74287429	CvAssertMsg(getProjectCreatedCount(eIndex) <= GC.getProjectInfo(eIndex)->GetMaxGlobalInstances(), "Index is expected to be within maximum bounds (invalid Index)");74307431	return ((getProjectCreatedCount(eIndex) + iExtra) >= GC.getProjectInfo(eIndex)->GetMaxGlobalInstances());7432}

Calls

Called by