Bazaar developer reference

atWar(TeamTypes, TeamTypes)

Defined in
CvGameCoreUtils.cpp, line 157
Hook name
CivHooks::atWar

Hooks

static bool BeforeatWar(TeamTypes eTeamA, TeamTypes eTeamB, bool& result);static void AfteratWar(TeamTypes eTeamA, TeamTypes eTeamB, bool& result);static bool ReplaceatWar(bool (*original)(TeamTypes, TeamTypes), TeamTypes eTeamA, TeamTypes eTeamB);CivRegisterBefore<CivHooks::atWar>(host, &BeforeatWar);CivRegisterAfter<CivHooks::atWar>(host, &AfteratWar);CivRegisterReplace<CivHooks::atWar>(host, &ReplaceatWar);

Code

157bool atWar(TeamTypes eTeamA, TeamTypes eTeamB)158{159	if((eTeamA == NO_TEAM) || (eTeamB == NO_TEAM))160	{161		return false;162	}163164	CvAssert(GET_TEAM(eTeamA).isAtWar(eTeamB) == GET_TEAM(eTeamB).isAtWar(eTeamA));165	CvAssert((eTeamA != eTeamB) || !(GET_TEAM(eTeamA).isAtWar(eTeamB)));166167	return GET_TEAM(eTeamA).isAtWar(eTeamB);168}

Calls

Called by

32 functions in 14 files