Bazaar developer reference

CvDiplomacyAI::IsTooEarlyForDoF(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 21179
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_IsTooEarlyForDoF

Hooks

static bool BeforeCvDiplomacyAI_IsTooEarlyForDoF(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static void AfterCvDiplomacyAI_IsTooEarlyForDoF(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvDiplomacyAI_IsTooEarlyForDoF(bool (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsTooEarlyForDoF>(host, &BeforeCvDiplomacyAI_IsTooEarlyForDoF);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsTooEarlyForDoF>(host, &AfterCvDiplomacyAI_IsTooEarlyForDoF);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsTooEarlyForDoF>(host, &ReplaceCvDiplomacyAI_IsTooEarlyForDoF);

Code

21178/// AI won't agree to a DoF until they've known a player for at least a few turns21179bool CvDiplomacyAI::IsTooEarlyForDoF(PlayerTypes ePlayer)21180{21181	int iDoFBuffer = /*20*/ GC.getDOF_TURN_BUFFER();2118221183	if(GET_TEAM(GetTeam()).GetTurnsSinceMeetingTeam(GET_PLAYER(ePlayer).getTeam()) < iDoFBuffer)21184		return true;2118521186	return false;21187}

Calls

Called by