CvPlayerAI::AI_foundValue(int, int, int, bool)
- Defined in
- CvPlayerAI.cpp, line 399
- Class
- CvPlayerAI
- Hook name
CivHooks::CvPlayerAI_AI_foundValue- Overrides
- CvPlayer::AI_foundValue(int, int, int, bool)
Hooks
static bool BeforeCvPlayerAI_AI_foundValue(CvPlayerAI* self, int iX, int iY, int arg2, bool bStartingLoc, int& result);static void AfterCvPlayerAI_AI_foundValue(CvPlayerAI* self, int iX, int iY, int arg2, bool bStartingLoc, int& result);static int ReplaceCvPlayerAI_AI_foundValue(int (*original)(CvPlayerAI*, int, int, int, bool), CvPlayerAI* self, int iX, int iY, int arg2, bool bStartingLoc);CivRegisterBefore<CivHooks::CvPlayerAI_AI_foundValue>(host, &BeforeCvPlayerAI_AI_foundValue);CivRegisterAfter<CivHooks::CvPlayerAI_AI_foundValue>(host, &AfterCvPlayerAI_AI_foundValue);CivRegisterReplace<CivHooks::CvPlayerAI_AI_foundValue>(host, &ReplaceCvPlayerAI_AI_foundValue);
Code
399int CvPlayerAI::AI_foundValue(int iX, int iY, int, bool bStartingLoc)400{401402 CvPlot* pPlot;403 int rtnValue = 0;404405 pPlot = GC.getMap().plot(iX, iY);406407 if(bStartingLoc)408 {409 rtnValue = GC.getGame().GetStartSiteEvaluator()->PlotFoundValue(pPlot, this);410 }411 else412 {413 GC.getGame().GetSettlerSiteEvaluator()->ComputeFlavorMultipliers(this);414 rtnValue = GC.getGame().GetSettlerSiteEvaluator()->PlotFoundValue(pPlot, this, NO_YIELD, false);415 }416417 return rtnValue;418}
Calls
- CvCitySiteEvaluator::ComputeFlavorMultipliers(CvPlayer *)
- CvGame::GetSettlerSiteEvaluator()
- CvGame::GetStartSiteEvaluator()
- CvGlobals::getGame()
- CvGlobals::getMap()
- CvMap::plot(int, int) const
- CvSiteEvaluatorForSettler::PlotFoundValue(CvPlot *, CvPlayer *, YieldTypes, bool)
- CvSiteEvaluatorForStart::PlotFoundValue(CvPlot *, CvPlayer *, YieldTypes, bool)