Bazaar developer reference

CvMinorCivAI::SetPermanentWar(TeamTypes, bool)

Defined in
CvMinorCivAI.cpp, line 10518
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_SetPermanentWar

Hooks

static bool BeforeCvMinorCivAI_SetPermanentWar(CvMinorCivAI* self, TeamTypes eTeam, bool bValue);static void AfterCvMinorCivAI_SetPermanentWar(CvMinorCivAI* self, TeamTypes eTeam, bool bValue);static void ReplaceCvMinorCivAI_SetPermanentWar(void (*original)(CvMinorCivAI*, TeamTypes, bool), CvMinorCivAI* self, TeamTypes eTeam, bool bValue);CivRegisterBefore<CivHooks::CvMinorCivAI_SetPermanentWar>(host, &BeforeCvMinorCivAI_SetPermanentWar);CivRegisterAfter<CivHooks::CvMinorCivAI_SetPermanentWar>(host, &AfterCvMinorCivAI_SetPermanentWar);CivRegisterReplace<CivHooks::CvMinorCivAI_SetPermanentWar>(host, &ReplaceCvMinorCivAI_SetPermanentWar);

Code

10517/// Permanent War with eTeam?10518void CvMinorCivAI::SetPermanentWar(TeamTypes eTeam, bool bValue)10519{10520	CvAssertMsg(eTeam >= 0, "eTeam is expected to be non-negative (invalid Index)");10521	CvAssertMsg(eTeam < MAX_TEAMS, "eTeam is expected to be within maximum bounds (invalid Index)");10522	if(eTeam < 0 || eTeam >= MAX_TEAMS) return;1052310524	if(ENABLE_PERMANENT_WAR)10525		m_abPermanentWar[eTeam] = bValue;10526}

Called by