CvPlayer::GetEmbarkationPromotion() const
- Defined in
- CvPlayer.cpp, line 27221
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_GetEmbarkationPromotion
Hooks
static bool BeforeCvPlayer_GetEmbarkationPromotion(const CvPlayer* self, PromotionTypes& result);static void AfterCvPlayer_GetEmbarkationPromotion(const CvPlayer* self, PromotionTypes& result);static PromotionTypes ReplaceCvPlayer_GetEmbarkationPromotion(PromotionTypes (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_GetEmbarkationPromotion>(host, &BeforeCvPlayer_GetEmbarkationPromotion);CivRegisterAfter<CivHooks::CvPlayer_GetEmbarkationPromotion>(host, &AfterCvPlayer_GetEmbarkationPromotion);CivRegisterReplace<CivHooks::CvPlayer_GetEmbarkationPromotion>(host, &ReplaceCvPlayer_GetEmbarkationPromotion);
Code
27221PromotionTypes CvPlayer::GetEmbarkationPromotion() const27222{27223 if(GET_TEAM(getTeam()).canDefensiveEmbark())27224 {27225 return (PromotionTypes)GC.getPROMOTION_DEFENSIVE_EMBARKATION();27226 }2722727228 if(m_pTraits)27229 {27230 if(m_pTraits->IsEmbarkedAllWater())27231 {27232 return (PromotionTypes)GC.getPROMOTION_ALLWATER_EMBARKATION();27233 }27234 }2723527236 return (PromotionTypes)GC.getPROMOTION_EMBARKATION();27237}
Calls
Called by
- CvPlayer::GetDeepWaterEmbarkationPromotion() const
- CvTeam::changeCanEmbarkCount(int)
- CvTeam::changeDefensiveEmbarkCount(int)
- CvUnit::convert(CvUnit *, bool)
- CvUnit::initWithNameOffset(int, UnitTypes, int, UnitAITypes, PlayerTypes, int, int, DirectionTypes, bool, bool, int, int)
- CvUnit::setXY(int, int, bool, bool, bool, bool, bool)
- SetupUnit(const CvWorldBuilderMap::Unit &, int, int)