Bazaar developer reference

CvMinorCivAI::DoNowPeaceWithTeam(TeamTypes)

Defined in
CvMinorCivAI.cpp, line 10262
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_DoNowPeaceWithTeam

Hooks

static bool BeforeCvMinorCivAI_DoNowPeaceWithTeam(CvMinorCivAI* self, TeamTypes eTeam);static void AfterCvMinorCivAI_DoNowPeaceWithTeam(CvMinorCivAI* self, TeamTypes eTeam);static void ReplaceCvMinorCivAI_DoNowPeaceWithTeam(void (*original)(CvMinorCivAI*, TeamTypes), CvMinorCivAI* self, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvMinorCivAI_DoNowPeaceWithTeam>(host, &BeforeCvMinorCivAI_DoNowPeaceWithTeam);CivRegisterAfter<CivHooks::CvMinorCivAI_DoNowPeaceWithTeam>(host, &AfterCvMinorCivAI_DoNowPeaceWithTeam);CivRegisterReplace<CivHooks::CvMinorCivAI_DoNowPeaceWithTeam>(host, &ReplaceCvMinorCivAI_DoNowPeaceWithTeam);

Code

10261/// Now at peace with eTeam10262void CvMinorCivAI::DoNowPeaceWithTeam(TeamTypes eTeam)10263{10264	int iWarFriendship = /*-60*/ GC.getMINOR_FRIENDSHIP_AT_WAR();10265	int iNewFriendship;1026610267	PlayerTypes ePlayer;10268	for(int iPlayerLoop = 0; iPlayerLoop < MAX_MAJOR_CIVS; iPlayerLoop++)10269	{10270		ePlayer = (PlayerTypes) iPlayerLoop;1027110272		if(GET_PLAYER(ePlayer).getTeam() == eTeam)10273		{10274			// Friendship change10275			iNewFriendship = GetBaseFriendshipWithMajor(ePlayer);10276			DoFriendshipChangeEffects(ePlayer, iWarFriendship, iNewFriendship);10277		}10278	}1027910280	GC.GetEngineUserInterface()->setDirty(GameData_DIRTY_BIT, true);10281}

Calls

Called by