Bazaar developer reference

CvGlobals::GetNumPlayableMinorCivs() const

Defined in
CvGlobals.cpp, line 2897
Class
CvGlobals
Hook name
CivHooks::CvGlobals_GetNumPlayableMinorCivs

Hooks

static bool BeforeCvGlobals_GetNumPlayableMinorCivs(const CvGlobals* self, int& result);static void AfterCvGlobals_GetNumPlayableMinorCivs(const CvGlobals* self, int& result);static int ReplaceCvGlobals_GetNumPlayableMinorCivs(int (*original)(const CvGlobals*), const CvGlobals* self);CivRegisterBefore<CivHooks::CvGlobals_GetNumPlayableMinorCivs>(host, &BeforeCvGlobals_GetNumPlayableMinorCivs);CivRegisterAfter<CivHooks::CvGlobals_GetNumPlayableMinorCivs>(host, &AfterCvGlobals_GetNumPlayableMinorCivs);CivRegisterReplace<CivHooks::CvGlobals_GetNumPlayableMinorCivs>(host, &ReplaceCvGlobals_GetNumPlayableMinorCivs);

Code

2897int CvGlobals::GetNumPlayableMinorCivs() const2898{2899	int iFound = 0;2900	int iCurrentMinorIndex = 0;29012902	for(; iCurrentMinorIndex < (int)m_paMinorCivInfo.size(); iCurrentMinorIndex++)2903	{2904		if(m_paMinorCivInfo[iCurrentMinorIndex] != NULL)2905		{2906			iFound++;2907		}2908	}29092910	return iFound;2911}

Calls

Called by