Bazaar developer reference

CvMinorCivAI::SetMajorBoughtOutBy(PlayerTypes)

Defined in
CvMinorCivAI.cpp, line 8736
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_SetMajorBoughtOutBy

Hooks

static bool BeforeCvMinorCivAI_SetMajorBoughtOutBy(CvMinorCivAI* self, PlayerTypes eMajor);static void AfterCvMinorCivAI_SetMajorBoughtOutBy(CvMinorCivAI* self, PlayerTypes eMajor);static void ReplaceCvMinorCivAI_SetMajorBoughtOutBy(void (*original)(CvMinorCivAI*, PlayerTypes), CvMinorCivAI* self, PlayerTypes eMajor);CivRegisterBefore<CivHooks::CvMinorCivAI_SetMajorBoughtOutBy>(host, &BeforeCvMinorCivAI_SetMajorBoughtOutBy);CivRegisterAfter<CivHooks::CvMinorCivAI_SetMajorBoughtOutBy>(host, &AfterCvMinorCivAI_SetMajorBoughtOutBy);CivRegisterReplace<CivHooks::CvMinorCivAI_SetMajorBoughtOutBy>(host, &ReplaceCvMinorCivAI_SetMajorBoughtOutBy);

Code

8735/// This minor has been bought out by a major civ8736void CvMinorCivAI::SetMajorBoughtOutBy(PlayerTypes eMajor)8737{8738	CvAssertMsg(eMajor >= 0, "eMajor is expected to be non-negative (invalid Index)");8739	CvAssertMsg(eMajor < MAX_MAJOR_CIVS, "eMajor is expected to be within maximum bounds (invalid Index)");87408741	m_eMajorBoughtOutBy = eMajor;8742}

Called by