Bazaar developer reference

CvMinorCivAI::SetWaryOfTeam(TeamTypes, bool)

Defined in
CvMinorCivAI.cpp, line 10539
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_SetWaryOfTeam

Hooks

static bool BeforeCvMinorCivAI_SetWaryOfTeam(CvMinorCivAI* self, TeamTypes eTeam, bool bValue);static void AfterCvMinorCivAI_SetWaryOfTeam(CvMinorCivAI* self, TeamTypes eTeam, bool bValue);static void ReplaceCvMinorCivAI_SetWaryOfTeam(void (*original)(CvMinorCivAI*, TeamTypes, bool), CvMinorCivAI* self, TeamTypes eTeam, bool bValue);CivRegisterBefore<CivHooks::CvMinorCivAI_SetWaryOfTeam>(host, &BeforeCvMinorCivAI_SetWaryOfTeam);CivRegisterAfter<CivHooks::CvMinorCivAI_SetWaryOfTeam>(host, &AfterCvMinorCivAI_SetWaryOfTeam);CivRegisterReplace<CivHooks::CvMinorCivAI_SetWaryOfTeam>(host, &ReplaceCvMinorCivAI_SetWaryOfTeam);

Code

10538// Wary of eTeam?10539void CvMinorCivAI::SetWaryOfTeam(TeamTypes eTeam, bool bValue)10540{10541	CvAssertMsg(eTeam >= 0, "eTeam is expected to be non-negative (invalid Index)");10542	CvAssertMsg(eTeam < MAX_TEAMS, "eTeam is expected to be within maximum bounds (invalid Index)");10543	if(eTeam < 0 || eTeam >= MAX_TEAMS) return;1054410545	if(IsWaryOfTeam(eTeam) == bValue)10546		return;1054710548	m_abWaryOfTeam[eTeam] = bValue;10549}

Calls

Called by