CvUnit::canRepairFleet(const CvPlot *, bool) const
- Defined in
- CvUnit.cpp, line 9573
- Class
- CvUnit
- Hook name
CivHooks::CvUnit_canRepairFleet
Hooks
static bool BeforeCvUnit_canRepairFleet(const CvUnit* self, const CvPlot* arg0, bool arg1, bool& result);static void AfterCvUnit_canRepairFleet(const CvUnit* self, const CvPlot* arg0, bool arg1, bool& result);static bool ReplaceCvUnit_canRepairFleet(bool (*original)(const CvUnit*, const CvPlot*, bool), const CvUnit* self, const CvPlot* arg0, bool arg1);CivRegisterBefore<CivHooks::CvUnit_canRepairFleet>(host, &BeforeCvUnit_canRepairFleet);CivRegisterAfter<CivHooks::CvUnit_canRepairFleet>(host, &AfterCvUnit_canRepairFleet);CivRegisterReplace<CivHooks::CvUnit_canRepairFleet>(host, &ReplaceCvUnit_canRepairFleet);
Code
9573bool CvUnit::canRepairFleet(const CvPlot* /*pPlot*/, bool /*bTestVisible*/) const9574{9575 VALIDATE_OBJECT9576 if(isDelayedDeath())9577 {9578 return false;9579 }95809581#if defined(MOD_GLOBAL_SEPARATE_GREAT_ADMIRAL)9582 bool bHasSkill = !MOD_GLOBAL_SEPARATE_GREAT_ADMIRAL && IsGreatAdmiral();9583 bHasSkill = bHasSkill || (MOD_GLOBAL_SEPARATE_GREAT_ADMIRAL && m_pUnitInfo->IsCanRepairFleet());9584 if (!bHasSkill)9585#else9586 if (!IsGreatAdmiral())9587#endif9588 {9589 return false;9590 }95919592 return true;9593}