CvPlot::isUnitFighting() const
- Defined in
- CvPlot.cpp, line 4308
- Class
- CvPlot
- Hook name
CivHooks::CvPlot_isUnitFighting
Hooks
static bool BeforeCvPlot_isUnitFighting(const CvPlot* self, bool& result);static void AfterCvPlot_isUnitFighting(const CvPlot* self, bool& result);static bool ReplaceCvPlot_isUnitFighting(bool (*original)(const CvPlot*), const CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_isUnitFighting>(host, &BeforeCvPlot_isUnitFighting);CivRegisterAfter<CivHooks::CvPlot_isUnitFighting>(host, &AfterCvPlot_isUnitFighting);CivRegisterReplace<CivHooks::CvPlot_isUnitFighting>(host, &ReplaceCvPlot_isUnitFighting);
Code
4307// Return true if any units are fighting in the plot.4308bool CvPlot::isUnitFighting() const4309{4310 const IDInfo* pUnitNode = m_units.head();4311 if(pUnitNode)4312 {4313 do4314 {4315 const CvUnit* pLoopUnit = GetPlayerUnit(*pUnitNode);4316 pUnitNode = m_units.next(pUnitNode);43174318 if(pLoopUnit && pLoopUnit->isFighting())4319 {4320 return true;4321 }4322 }4323 while(pUnitNode != NULL);4324 }43254326 return false;4327}
Calls
- CvUnit::isFighting() const
FFastSmallFixedList::headFFastSmallFixedList::next- GetPlayerUnit(const IDInfo &)