Bazaar developer reference

CvMinorCivAI::SetUnitSpawningDisabled(PlayerTypes, bool)

Defined in
CvMinorCivAI.cpp, line 8442
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_SetUnitSpawningDisabled

Hooks

static bool BeforeCvMinorCivAI_SetUnitSpawningDisabled(CvMinorCivAI* self, PlayerTypes ePlayer, bool bValue);static void AfterCvMinorCivAI_SetUnitSpawningDisabled(CvMinorCivAI* self, PlayerTypes ePlayer, bool bValue);static void ReplaceCvMinorCivAI_SetUnitSpawningDisabled(void (*original)(CvMinorCivAI*, PlayerTypes, bool), CvMinorCivAI* self, PlayerTypes ePlayer, bool bValue);CivRegisterBefore<CivHooks::CvMinorCivAI_SetUnitSpawningDisabled>(host, &BeforeCvMinorCivAI_SetUnitSpawningDisabled);CivRegisterAfter<CivHooks::CvMinorCivAI_SetUnitSpawningDisabled>(host, &AfterCvMinorCivAI_SetUnitSpawningDisabled);CivRegisterReplace<CivHooks::CvMinorCivAI_SetUnitSpawningDisabled>(host, &ReplaceCvMinorCivAI_SetUnitSpawningDisabled);

Code

8441/// Set the player chosen to disable Unit spawning8442void CvMinorCivAI::SetUnitSpawningDisabled(PlayerTypes ePlayer, bool bValue)8443{8444	CvAssertMsg(ePlayer >= 0, "ePlayer is expected to be non-negative (invalid Index)");8445	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "ePlayer is expected to be within maximum bounds (invalid Index)");8446	if(ePlayer < 0 || ePlayer >= MAX_MAJOR_CIVS) return;84478448	m_abUnitSpawningDisabled[ePlayer] = bValue;8449}

Called by