Bazaar developer reference

CvDangerPlots::GetDanger(const CvPlot &) const

Defined in
CvDangerPlots.cpp, line 264
Class
CvDangerPlots
Hook name
CivHooks::CvDangerPlots_GetDanger

Hooks

static bool BeforeCvDangerPlots_GetDanger(const CvDangerPlots* self, const CvPlot& pPlot, int& result);static void AfterCvDangerPlots_GetDanger(const CvDangerPlots* self, const CvPlot& pPlot, int& result);static int ReplaceCvDangerPlots_GetDanger(int (*original)(const CvDangerPlots*, const CvPlot&), const CvDangerPlots* self, const CvPlot& pPlot);CivRegisterBefore<CivHooks::CvDangerPlots_GetDanger>(host, &BeforeCvDangerPlots_GetDanger);CivRegisterAfter<CivHooks::CvDangerPlots_GetDanger>(host, &AfterCvDangerPlots_GetDanger);CivRegisterReplace<CivHooks::CvDangerPlots_GetDanger>(host, &ReplaceCvDangerPlots_GetDanger);

Code

263/// Return the danger value of a given plot264int CvDangerPlots::GetDanger(const CvPlot& pPlot) const265{266	const int idx = pPlot.getX() + pPlot.getY() * GC.getMap().getGridWidth();267	return m_DangerPlots[idx];268}

Calls

Called by