Bazaar developer reference

CvDiplomacyAI::IsCapitalCapturedBy(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 8069
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_IsCapitalCapturedBy

Hooks

static bool BeforeCvDiplomacyAI_IsCapitalCapturedBy(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static void AfterCvDiplomacyAI_IsCapitalCapturedBy(CvDiplomacyAI* self, PlayerTypes ePlayer, bool& result);static bool ReplaceCvDiplomacyAI_IsCapitalCapturedBy(bool (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_IsCapitalCapturedBy>(host, &BeforeCvDiplomacyAI_IsCapitalCapturedBy);CivRegisterAfter<CivHooks::CvDiplomacyAI_IsCapitalCapturedBy>(host, &AfterCvDiplomacyAI_IsCapitalCapturedBy);CivRegisterReplace<CivHooks::CvDiplomacyAI_IsCapitalCapturedBy>(host, &ReplaceCvDiplomacyAI_IsCapitalCapturedBy);

Code

8069bool CvDiplomacyAI::IsCapitalCapturedBy(PlayerTypes ePlayer)8070{8071	if(m_pPlayer->IsHasLostCapital() && m_pPlayer->GetCapitalConqueror() == ePlayer)8072	{8073		return true;8074	}8075	return false;8076}

Calls

Called by