Bazaar developer reference

CvPlot::changePlayerCityRadiusCount(PlayerTypes, int)

Defined in
CvPlot.cpp, line 8723
Class
CvPlot
Hook name
CivHooks::CvPlot_changePlayerCityRadiusCount

Hooks

static bool BeforeCvPlot_changePlayerCityRadiusCount(CvPlot* self, PlayerTypes eIndex, int iChange);static void AfterCvPlot_changePlayerCityRadiusCount(CvPlot* self, PlayerTypes eIndex, int iChange);static void ReplaceCvPlot_changePlayerCityRadiusCount(void (*original)(CvPlot*, PlayerTypes, int), CvPlot* self, PlayerTypes eIndex, int iChange);CivRegisterBefore<CivHooks::CvPlot_changePlayerCityRadiusCount>(host, &BeforeCvPlot_changePlayerCityRadiusCount);CivRegisterAfter<CivHooks::CvPlot_changePlayerCityRadiusCount>(host, &AfterCvPlot_changePlayerCityRadiusCount);CivRegisterReplace<CivHooks::CvPlot_changePlayerCityRadiusCount>(host, &ReplaceCvPlot_changePlayerCityRadiusCount);

Code

8723void CvPlot::changePlayerCityRadiusCount(PlayerTypes eIndex, int iChange)8724{8725	CvAssertMsg(eIndex >= 0, "eIndex is expected to be non-negative (invalid Index)");8726	CvAssertMsg(eIndex < MAX_PLAYERS, "eIndex is expected to be within maximum bounds (invalid Index)");87278728	if(0 != iChange)8729	{8730		m_aiPlayerCityRadiusCount[eIndex] += iChange;8731		CvAssert(getPlayerCityRadiusCount(eIndex) >= 0);8732	}8733}

Called by