Bazaar developer reference

CvPlot::movementCost(const CvUnit *, const CvPlot *, int) const

Defined in
CvPlot.cpp, line 3132
Class
CvPlot
Hook name
CivHooks::CvPlot_movementCost

Hooks

static bool BeforeCvPlot_movementCost(const CvPlot* self, const CvUnit* pUnit, const CvPlot* pFromPlot, int iMovesRemaining, int& result);static void AfterCvPlot_movementCost(const CvPlot* self, const CvUnit* pUnit, const CvPlot* pFromPlot, int iMovesRemaining, int& result);static int ReplaceCvPlot_movementCost(int (*original)(const CvPlot*, const CvUnit*, const CvPlot*, int), const CvPlot* self, const CvUnit* pUnit, const CvPlot* pFromPlot, int iMovesRemaining);CivRegisterBefore<CivHooks::CvPlot_movementCost>(host, &BeforeCvPlot_movementCost);CivRegisterAfter<CivHooks::CvPlot_movementCost>(host, &AfterCvPlot_movementCost);CivRegisterReplace<CivHooks::CvPlot_movementCost>(host, &ReplaceCvPlot_movementCost);

Code

3132int CvPlot::movementCost(const CvUnit* pUnit, const CvPlot* pFromPlot, int iMovesRemaining /*= 0*/) const3133{3134	return CvUnitMovement::MovementCost(pUnit, pFromPlot, this, pUnit->baseMoves(isWater()?DOMAIN_SEA:NO_DOMAIN), pUnit->maxMoves(), iMovesRemaining);3135}

Calls

Called by