Bazaar developer reference

CvCity::getBuyPlotDistance() const

Defined in
CvCity.cpp, line 2225
Class
CvCity
Hook name
CivHooks::CvCity_getBuyPlotDistance

Hooks

static bool BeforeCvCity_getBuyPlotDistance(const CvCity* self, int& result);static void AfterCvCity_getBuyPlotDistance(const CvCity* self, int& result);static int ReplaceCvCity_getBuyPlotDistance(int (*original)(const CvCity*), const CvCity* self);CivRegisterBefore<CivHooks::CvCity_getBuyPlotDistance>(host, &BeforeCvCity_getBuyPlotDistance);CivRegisterAfter<CivHooks::CvCity_getBuyPlotDistance>(host, &AfterCvCity_getBuyPlotDistance);CivRegisterReplace<CivHooks::CvCity_getBuyPlotDistance>(host, &ReplaceCvCity_getBuyPlotDistance);

Code

2224/// How far out this city may buy plots2225int CvCity::getBuyPlotDistance() const2226{2227	int iDistance = GET_PLAYER(getOwner()).getBuyPlotDistance();2228	2229	iDistance = std::min(MAX_CITY_RADIUS, std::max(getWorkPlotDistance(), iDistance));2230	return iDistance;2231}

Calls

Called by