CvUnitEntry::GetFreePromotions(int) const
- Defined in
- CvUnitClasses.cpp, line 1196
- Class
- CvUnitEntry
- Hook name
CivHooks::CvUnitEntry_GetFreePromotions
Hooks
static bool BeforeCvUnitEntry_GetFreePromotions(const CvUnitEntry* self, int i, bool& result);static void AfterCvUnitEntry_GetFreePromotions(const CvUnitEntry* self, int i, bool& result);static bool ReplaceCvUnitEntry_GetFreePromotions(bool (*original)(const CvUnitEntry*, int), const CvUnitEntry* self, int i);CivRegisterBefore<CivHooks::CvUnitEntry_GetFreePromotions>(host, &BeforeCvUnitEntry_GetFreePromotions);CivRegisterAfter<CivHooks::CvUnitEntry_GetFreePromotions>(host, &AfterCvUnitEntry_GetFreePromotions);CivRegisterReplace<CivHooks::CvUnitEntry_GetFreePromotions>(host, &ReplaceCvUnitEntry_GetFreePromotions);
Code
1195/// Initial set of promotions for this unit1196bool CvUnitEntry::GetFreePromotions(int i) const1197{1198 CvAssertMsg(i < GC.getNumPromotionInfos(), "Index out of bounds");1199 CvAssertMsg(i > -1, "Index out of bounds");1200 return m_pbFreePromotions ? m_pbFreePromotions[i] : false;1201}
Called by
- CvBarbarians::GetRandomBarbarianUnitType(CvPlot *, UnitAITypes)
- EconomicAIHelpers::IsTestStrategy_ReallyNeedReconSea(CvPlayer *)
- CvGame::GetCompetitiveSpawnUnitType(PlayerTypes, bool, bool, bool)
- CvGame::GetRandomSpawnUnitType(PlayerTypes, bool, bool)
- CvGame::GetRandomUniqueUnitType(bool, bool, bool, bool)
- isPromotionValid(PromotionTypes, UnitTypes, bool, bool)
- CvPlayer::setCombatExperienceTimes100(int, CvUnit *)
- CvPlayer::setNavalCombatExperienceTimes100(int, CvUnit *)
- CvUnit::convert(CvUnit *, bool)
- CvUnit::initWithNameOffset(int, UnitTypes, int, UnitAITypes, PlayerTypes, int, int, DirectionTypes, bool, bool, int, int)
- CvUnitEntry::DoUpdatePower()
- CvUnitEntry::GetCargoSpace() const