Bazaar developer reference

CvPlayer::getBuyPlotDistance() const

Defined in
CvPlayer.cpp, line 3388
Class
CvPlayer
Hook name
CivHooks::CvPlayer_getBuyPlotDistance

Hooks

static bool BeforeCvPlayer_getBuyPlotDistance(const CvPlayer* self, int& result);static void AfterCvPlayer_getBuyPlotDistance(const CvPlayer* self, int& result);static int ReplaceCvPlayer_getBuyPlotDistance(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_getBuyPlotDistance>(host, &BeforeCvPlayer_getBuyPlotDistance);CivRegisterAfter<CivHooks::CvPlayer_getBuyPlotDistance>(host, &AfterCvPlayer_getBuyPlotDistance);CivRegisterReplace<CivHooks::CvPlayer_getBuyPlotDistance>(host, &ReplaceCvPlayer_getBuyPlotDistance);

Code

3387/// How far out this player may buy plots3388int CvPlayer::getBuyPlotDistance() const3389{3390	int iDistance = GC.getMAXIMUM_BUY_PLOT_DISTANCE();3391	3392	iDistance = std::min(MAX_CITY_RADIUS, std::max(getWorkPlotDistance(), iDistance));3393	return iDistance;3394}

Calls

Called by