CvUnit::canAirPatrol(const CvPlot *) const
- Defined in
- CvUnit.cpp, line 4667
- Class
- CvUnit
- Hook name
CivHooks::CvUnit_canAirPatrol
Hooks
static bool BeforeCvUnit_canAirPatrol(const CvUnit* self, const CvPlot* pPlot, bool& result);static void AfterCvUnit_canAirPatrol(const CvUnit* self, const CvPlot* pPlot, bool& result);static bool ReplaceCvUnit_canAirPatrol(bool (*original)(const CvUnit*, const CvPlot*), const CvUnit* self, const CvPlot* pPlot);CivRegisterBefore<CivHooks::CvUnit_canAirPatrol>(host, &BeforeCvUnit_canAirPatrol);CivRegisterAfter<CivHooks::CvUnit_canAirPatrol>(host, &AfterCvUnit_canAirPatrol);CivRegisterReplace<CivHooks::CvUnit_canAirPatrol>(host, &ReplaceCvUnit_canAirPatrol);
Code
4667bool CvUnit::canAirPatrol(const CvPlot* pPlot) const4668{4669 VALIDATE_OBJECT4670 if(getDomainType() != DOMAIN_AIR)4671 {4672 return false;4673 }46744675 if(!canAirDefend(pPlot))4676 {4677 return false;4678 }46794680 if(isWaiting())4681 {4682 return false;4683 }46844685 return true;4686}
Calls
Called by
- CvHomelandAI::ExecuteAircraftInterceptions()
- CvMilitaryAI::WillAirUnitRebase(CvUnit *) const
- CvTacticalAI::ExecuteAirInterceptMoves()
- CvTacticalAI::PlotAirInterceptMoves()
- CvUnit::AI_promotionValue(PromotionTypes)
- CvUnitMission::CanStartMission(UnitHandle, int, int, int, CvPlot *, bool)
- CvLuaUnit::lCanAirPatrol(lua_State *)