Bazaar developer reference

CvPlayer::SetCityStrengthMod(int)

Defined in
CvPlayer.cpp, line 26436
Class
CvPlayer
Hook name
CivHooks::CvPlayer_SetCityStrengthMod

Hooks

static bool BeforeCvPlayer_SetCityStrengthMod(CvPlayer* self, int iValue);static void AfterCvPlayer_SetCityStrengthMod(CvPlayer* self, int iValue);static void ReplaceCvPlayer_SetCityStrengthMod(void (*original)(CvPlayer*, int), CvPlayer* self, int iValue);CivRegisterBefore<CivHooks::CvPlayer_SetCityStrengthMod>(host, &BeforeCvPlayer_SetCityStrengthMod);CivRegisterAfter<CivHooks::CvPlayer_SetCityStrengthMod>(host, &AfterCvPlayer_SetCityStrengthMod);CivRegisterReplace<CivHooks::CvPlayer_SetCityStrengthMod>(host, &ReplaceCvPlayer_SetCityStrengthMod);

Code

26435/// Sets City strength mod (i.e. 100 = strength doubled)26436void CvPlayer::SetCityStrengthMod(int iValue)26437{26438	CvAssert(iValue >= 0);26439	m_iCityStrengthMod = iValue;2644026441	// Loop through all Cities and update their strength26442	CvCity* pLoopCity;26443	int iLoop;2644426445	for(pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))26446	{26447		pLoopCity->updateStrengthValue();26448	}26449}

Calls

Called by