CvPlot::plotAction(PlotUnitFunc, int, int, PlayerTypes, TeamTypes)
- Defined in
- CvPlot.cpp, line 3377
- Class
- CvPlot
- Hook name
CivHooks::CvPlot_plotAction
Hooks
static bool BeforeCvPlot_plotAction(CvPlot* self, PlotUnitFunc func, int iData1, int iData2, PlayerTypes eOwner, TeamTypes eTeam);static void AfterCvPlot_plotAction(CvPlot* self, PlotUnitFunc func, int iData1, int iData2, PlayerTypes eOwner, TeamTypes eTeam);static void ReplaceCvPlot_plotAction(void (*original)(CvPlot*, PlotUnitFunc, int, int, PlayerTypes, TeamTypes), CvPlot* self, PlotUnitFunc func, int iData1, int iData2, PlayerTypes eOwner, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvPlot_plotAction>(host, &BeforeCvPlot_plotAction);CivRegisterAfter<CivHooks::CvPlot_plotAction>(host, &AfterCvPlot_plotAction);CivRegisterReplace<CivHooks::CvPlot_plotAction>(host, &ReplaceCvPlot_plotAction);
Code
3377void CvPlot::plotAction(PlotUnitFunc func, int iData1, int iData2, PlayerTypes eOwner, TeamTypes eTeam)3378{3379 IDInfo* pUnitNode;3380 CvUnit* pLoopUnit;33813382 pUnitNode = headUnitNode();33833384 while(pUnitNode != NULL)3385 {3386 pLoopUnit = GetPlayerUnit(*pUnitNode);3387 pUnitNode = nextUnitNode(pUnitNode);33883389 if(pLoopUnit)3390 {3391 if((eOwner == NO_PLAYER) || (pLoopUnit->getOwner() == eOwner))3392 {3393 if((eTeam == NO_TEAM) || (pLoopUnit->getTeam() == eTeam))3394 {3395 func(pLoopUnit, iData1, iData2);3396 }3397 }3398 }3399 }3400}