CvPlayer::GetPlotHasOrder(CvPlot *)
- Defined in
- CvPlayer.cpp, line 27384
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_GetPlotHasOrder
Hooks
static bool BeforeCvPlayer_GetPlotHasOrder(CvPlayer* self, CvPlot* pPlot, bool& result);static void AfterCvPlayer_GetPlotHasOrder(CvPlayer* self, CvPlot* pPlot, bool& result);static bool ReplaceCvPlayer_GetPlotHasOrder(bool (*original)(CvPlayer*, CvPlot*), CvPlayer* self, CvPlot* pPlot);CivRegisterBefore<CivHooks::CvPlayer_GetPlotHasOrder>(host, &BeforeCvPlayer_GetPlotHasOrder);CivRegisterAfter<CivHooks::CvPlayer_GetPlotHasOrder>(host, &AfterCvPlayer_GetPlotHasOrder);CivRegisterReplace<CivHooks::CvPlayer_GetPlotHasOrder>(host, &ReplaceCvPlayer_GetPlotHasOrder);
Code
27384bool CvPlayer::GetPlotHasOrder(CvPlot* pPlot)27385{27386 if(!pPlot)27387 {27388 return false;27389 }2739027391 int iLoopUnit;27392 for(CvUnit* pLoopUnit = firstUnit(&iLoopUnit); pLoopUnit; pLoopUnit = nextUnit(&iLoopUnit))27393 {27394 CvPlot* pMissionPlot = pLoopUnit->GetMissionAIPlot();27395 if(NULL != pMissionPlot && pMissionPlot->getX() == pPlot->getX() && pMissionPlot->getY() == pPlot->getY())27396 {27397 return true;27398 }27399 }2740027401 return false;27402}