Bazaar developer reference

CvDiplomacyAI::GetDemandTooSoonNumTurns(PlayerTypes) const

Defined in
CvDiplomacyAI.cpp, line 20733
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetDemandTooSoonNumTurns

Hooks

static bool BeforeCvDiplomacyAI_GetDemandTooSoonNumTurns(const CvDiplomacyAI* self, PlayerTypes ePlayer, short& result);static void AfterCvDiplomacyAI_GetDemandTooSoonNumTurns(const CvDiplomacyAI* self, PlayerTypes ePlayer, short& result);static short ReplaceCvDiplomacyAI_GetDemandTooSoonNumTurns(short (*original)(const CvDiplomacyAI*, PlayerTypes), const CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetDemandTooSoonNumTurns>(host, &BeforeCvDiplomacyAI_GetDemandTooSoonNumTurns);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetDemandTooSoonNumTurns>(host, &AfterCvDiplomacyAI_GetDemandTooSoonNumTurns);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetDemandTooSoonNumTurns>(host, &ReplaceCvDiplomacyAI_GetDemandTooSoonNumTurns);

Code

20733short CvDiplomacyAI::GetDemandTooSoonNumTurns(PlayerTypes ePlayer) const20734{20735	CvAssertMsg(ePlayer >= 0, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");20736	CvAssertMsg(ePlayer < MAX_MAJOR_CIVS, "DIPLOMACY_AI: Invalid Player Index.  Please send Jon this with your last 5 autosaves and what changelist # you're playing.");20737	return m_paiDemandTooSoonNumTurns[ePlayer];20738}

Called by