CvUnit::CanEverEmbark() const
- Defined in
- CvUnit.cpp, line 5139
- Class
- CvUnit
- Hook name
CivHooks::CvUnit_CanEverEmbark
Hooks
static bool BeforeCvUnit_CanEverEmbark(const CvUnit* self, bool& result);static void AfterCvUnit_CanEverEmbark(const CvUnit* self, bool& result);static bool ReplaceCvUnit_CanEverEmbark(bool (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_CanEverEmbark>(host, &BeforeCvUnit_CanEverEmbark);CivRegisterAfter<CivHooks::CvUnit_CanEverEmbark>(host, &AfterCvUnit_CanEverEmbark);CivRegisterReplace<CivHooks::CvUnit_CanEverEmbark>(host, &ReplaceCvUnit_CanEverEmbark);
Code
5139bool CvUnit::CanEverEmbark() const5140{5141 VALIDATE_OBJECT51425143 if(getDomainType() == DOMAIN_LAND && IsHasEmbarkAbility())5144 {5145 return true;5146 }5147 else5148 {5149 return false;5150 }5151}
Calls
Called by
- CvAIOperation::FindBestFitReserveUnit(OperationSlot, CvPlot *, CvPlot *, bool *)
- PathDestValid(int, int, const void *, CvAStar *)
- UnitPathInitialize(const void *, CvAStar *)
- CvBuilderTaskingAI::FindTurnsAway(CvUnit *, CvPlot *, bool)
- CvBuilderTaskingAI::ShouldBuilderConsiderPlot(CvUnit *, CvPlot *)
- CvHomelandAI::IsValidExplorerEndTurnPlot(const CvUnit *, CvPlot *) const
- MilitaryAIHelpers::FirstSlotCityCanFill(CvPlayer *, MultiunitFormationTypes, bool, bool, bool)
- MilitaryAIHelpers::NumberOfFillableSlots(CvPlayer *, MultiunitFormationTypes, bool, int *, int *)
- CvPlayer::GetClosestGoodyPlot(bool)
- CvUnit::baseMoves(DomainTypes) const
- CvUnit::canEnterTerrain(const CvPlot &, byte) const
- CvUnit::move(CvPlot &, bool)
- CvUnitMovement::ConsumesAllMoves(const CvUnit *, const CvPlot *, const CvPlot *)
- CvUnitMovement::CostsOnlyOne(const CvUnit *, const CvPlot *, const CvPlot *)