Bazaar developer reference

CvMinorCivAI::SetMajorIntruding(PlayerTypes, bool)

Defined in
CvMinorCivAI.cpp, line 7266
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_SetMajorIntruding

Hooks

static bool BeforeCvMinorCivAI_SetMajorIntruding(CvMinorCivAI* self, PlayerTypes eMajor, bool bValue);static void AfterCvMinorCivAI_SetMajorIntruding(CvMinorCivAI* self, PlayerTypes eMajor, bool bValue);static void ReplaceCvMinorCivAI_SetMajorIntruding(void (*original)(CvMinorCivAI*, PlayerTypes, bool), CvMinorCivAI* self, PlayerTypes eMajor, bool bValue);CivRegisterBefore<CivHooks::CvMinorCivAI_SetMajorIntruding>(host, &BeforeCvMinorCivAI_SetMajorIntruding);CivRegisterAfter<CivHooks::CvMinorCivAI_SetMajorIntruding>(host, &AfterCvMinorCivAI_SetMajorIntruding);CivRegisterReplace<CivHooks::CvMinorCivAI_SetMajorIntruding>(host, &ReplaceCvMinorCivAI_SetMajorIntruding);

Code

7265/// Sets a Major to be intruding in our territory7266void CvMinorCivAI::SetMajorIntruding(PlayerTypes eMajor, bool bValue)7267{7268	CvAssertMsg(eMajor >= 0, "eMajor is expected to be non-negative (invalid Index)");7269	CvAssertMsg(eMajor < MAX_MAJOR_CIVS, "eMajor is expected to be within maximum bounds (invalid Index)");7270	if(eMajor < 0 || eMajor >= MAX_MAJOR_CIVS) return;72717272	if(IsMajorIntruding(eMajor) != bValue)7273	{7274		m_abMajorIntruding[eMajor] = bValue;7275	}7276}

Calls

Called by