Bazaar developer reference

CvDiplomacyAI::GetSupportedMyHostingScore(PlayerTypes)

Defined in
CvDiplomacyAI.cpp, line 24157
Class
CvDiplomacyAI
Hook name
CivHooks::CvDiplomacyAI_GetSupportedMyHostingScore

Hooks

static bool BeforeCvDiplomacyAI_GetSupportedMyHostingScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static void AfterCvDiplomacyAI_GetSupportedMyHostingScore(CvDiplomacyAI* self, PlayerTypes ePlayer, int& result);static int ReplaceCvDiplomacyAI_GetSupportedMyHostingScore(int (*original)(CvDiplomacyAI*, PlayerTypes), CvDiplomacyAI* self, PlayerTypes ePlayer);CivRegisterBefore<CivHooks::CvDiplomacyAI_GetSupportedMyHostingScore>(host, &BeforeCvDiplomacyAI_GetSupportedMyHostingScore);CivRegisterAfter<CivHooks::CvDiplomacyAI_GetSupportedMyHostingScore>(host, &AfterCvDiplomacyAI_GetSupportedMyHostingScore);CivRegisterReplace<CivHooks::CvDiplomacyAI_GetSupportedMyHostingScore>(host, &ReplaceCvDiplomacyAI_GetSupportedMyHostingScore);

Code

24157int CvDiplomacyAI::GetSupportedMyHostingScore(PlayerTypes ePlayer)24158{24159	int iOpinionWeight = 0;24160	int iTurnsSince = GetTurnsSinceTheySupportedOurHosting(ePlayer);24161	if (iTurnsSince > -1 && iTurnsSince < GC.getOPINION_WEIGHT_THEY_SUPPORTED_OUR_HOSTING_NUM_TURNS())24162	{24163		iOpinionWeight += GC.getOPINION_WEIGHT_THEY_SUPPORTED_OUR_HOSTING();	24164	}24165	return iOpinionWeight;24166}

Calls

Called by