Bazaar developer reference

CvArea::getFreeSpecialist(PlayerTypes) const

Defined in
CvArea.cpp, line 449
Class
CvArea
Hook name
CivHooks::CvArea_getFreeSpecialist

Hooks

static bool BeforeCvArea_getFreeSpecialist(const CvArea* self, PlayerTypes eIndex, int& result);static void AfterCvArea_getFreeSpecialist(const CvArea* self, PlayerTypes eIndex, int& result);static int ReplaceCvArea_getFreeSpecialist(int (*original)(const CvArea*, PlayerTypes), const CvArea* self, PlayerTypes eIndex);CivRegisterBefore<CivHooks::CvArea_getFreeSpecialist>(host, &BeforeCvArea_getFreeSpecialist);CivRegisterAfter<CivHooks::CvArea_getFreeSpecialist>(host, &AfterCvArea_getFreeSpecialist);CivRegisterReplace<CivHooks::CvArea_getFreeSpecialist>(host, &ReplaceCvArea_getFreeSpecialist);

Code

448//	What is the number of free specialist in the area for the specified player?449int CvArea::getFreeSpecialist(PlayerTypes eIndex) const450{451	CvAssertMsg(eIndex >= 0, "eIndex is expected to be >= 0");452	CvAssertMsg(eIndex < MAX_PLAYERS, "eIndex is expected to be < MAX_PLAYERS");453	if(eIndex < 0 || eIndex >= MAX_PLAYERS) return 0;454455	return m_aiFreeSpecialist[eIndex];456}

Called by