Bazaar developer reference

CvPlayerCulture::GetNumCivsInfluentialOn() const

Defined in
CvCultureClasses.cpp, line 2910
Class
CvPlayerCulture
Hook name
CivHooks::CvPlayerCulture_GetNumCivsInfluentialOn

Hooks

static bool BeforeCvPlayerCulture_GetNumCivsInfluentialOn(const CvPlayerCulture* self, int& result);static void AfterCvPlayerCulture_GetNumCivsInfluentialOn(const CvPlayerCulture* self, int& result);static int ReplaceCvPlayerCulture_GetNumCivsInfluentialOn(int (*original)(const CvPlayerCulture*), const CvPlayerCulture* self);CivRegisterBefore<CivHooks::CvPlayerCulture_GetNumCivsInfluentialOn>(host, &BeforeCvPlayerCulture_GetNumCivsInfluentialOn);CivRegisterAfter<CivHooks::CvPlayerCulture_GetNumCivsInfluentialOn>(host, &AfterCvPlayerCulture_GetNumCivsInfluentialOn);CivRegisterReplace<CivHooks::CvPlayerCulture_GetNumCivsInfluentialOn>(host, &ReplaceCvPlayerCulture_GetNumCivsInfluentialOn);

Code

2909/// How many civs do we have influence culture over?2910int CvPlayerCulture::GetNumCivsInfluentialOn() const2911{2912	int iRtnValue = 0;29132914	for (int iLoopPlayer = 0; iLoopPlayer < MAX_MAJOR_CIVS; iLoopPlayer++)2915	{2916		CvPlayer &kPlayer = GET_PLAYER((PlayerTypes)iLoopPlayer);2917		if (iLoopPlayer != m_pPlayer->GetID() && kPlayer.isAlive() && !kPlayer.isMinorCiv())2918		{2919			if (GetInfluenceLevel(kPlayer.GetID()) >= INFLUENCE_LEVEL_INFLUENTIAL)2920			{2921				iRtnValue++;2922			}2923		}2924	}29252926	return iRtnValue;2927}

Calls

Called by