Bazaar developer reference

CvGame::GetNumMinorCivsEver()

Defined in
CvGame.cpp, line 4393
Class
CvGame
Hook name
CivHooks::CvGame_GetNumMinorCivsEver

Hooks

static bool BeforeCvGame_GetNumMinorCivsEver(CvGame* self, int& result);static void AfterCvGame_GetNumMinorCivsEver(CvGame* self, int& result);static int ReplaceCvGame_GetNumMinorCivsEver(int (*original)(CvGame*), CvGame* self);CivRegisterBefore<CivHooks::CvGame_GetNumMinorCivsEver>(host, &BeforeCvGame_GetNumMinorCivsEver);CivRegisterAfter<CivHooks::CvGame_GetNumMinorCivsEver>(host, &AfterCvGame_GetNumMinorCivsEver);CivRegisterReplace<CivHooks::CvGame_GetNumMinorCivsEver>(host, &ReplaceCvGame_GetNumMinorCivsEver);

Code

4393int CvGame::GetNumMinorCivsEver()4394{4395	int iNumCivs = 0;43964397	for(int iMinorLoop = MAX_MAJOR_CIVS; iMinorLoop < MAX_CIV_PLAYERS; iMinorLoop++)4398	{4399		if(GET_PLAYER((PlayerTypes) iMinorLoop).isEverAlive())4400		{4401			iNumCivs++;4402		}4403	}44044405	return iNumCivs;4406}

Calls

Called by