Bazaar developer reference

CvDiplomacyAI::GetCapitalCapturedByScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 24073
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetCapitalCapturedByScore

Hooks

static bool BeforeCvDiplomacyAI_GetCapitalCapturedByScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetCapitalCapturedByScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetCapitalCapturedByScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetCapitalCapturedByScore>(host, &BeforeCvDiplomacyAI_GetCapitalCapturedByScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetCapitalCapturedByScore>(host, &AfterCvDiplomacyAI_GetCapitalCapturedByScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetCapitalCapturedByScore>(host, &ReplaceCvDiplomacyAI_GetCapitalCapturedByScore);

Code

24073int CvDiplomacyAI::GetCapitalCapturedByScore(PlayerTypes ePlayer)24074{24075	int iOpinionWeight = 0;24076	if(IsCapitalCapturedBy(ePlayer))24077		iOpinionWeight += /*80*/ GC.getOPINION_WEIGHT_CAPTURED_CAPITAL();24078	return iOpinionWeight;24079}

Calls

Called by