GetPlotYield(CvPlot *, YieldTypes)
- Defined in
- CvBuilderTaskingAI.cpp, line 268
- Hook name
CivHooks::GetPlotYield
Hooks
static bool BeforeGetPlotYield(CvPlot* pPlot, YieldTypes eYield, int& result);static void AfterGetPlotYield(CvPlot* pPlot, YieldTypes eYield, int& result);static int ReplaceGetPlotYield(int (*original)(CvPlot*, YieldTypes), CvPlot* pPlot, YieldTypes eYield);CivRegisterBefore<CivHooks::GetPlotYield>(host, &BeforeGetPlotYield);CivRegisterAfter<CivHooks::GetPlotYield>(host, &AfterGetPlotYield);CivRegisterReplace<CivHooks::GetPlotYield>(host, &ReplaceGetPlotYield);
Code
268int GetPlotYield(CvPlot* pPlot, YieldTypes eYield)269{270 if(pPlot->getTerrainType() == NO_TERRAIN)271 {272 return 0;273 }274275 return pPlot->calculateNatureYield(eYield, NO_TEAM);;276}