CvGlobals::getPromotionInfo(PromotionTypes)
- Defined in
- CvGlobals.cpp, line 3496
- Class
- CvGlobals
- Hook name
CivHooks::CvGlobals_getPromotionInfo_with_PromotionTypes
Hooks
static bool BeforeCvGlobals_getPromotionInfo_with_PromotionTypes(CvGlobals* self, PromotionTypes ePromotionNum, CvPromotionEntry*& result);static void AfterCvGlobals_getPromotionInfo_with_PromotionTypes(CvGlobals* self, PromotionTypes ePromotionNum, CvPromotionEntry*& result);static CvPromotionEntry* ReplaceCvGlobals_getPromotionInfo_with_PromotionTypes(CvPromotionEntry* (*original)(CvGlobals*, PromotionTypes), CvGlobals* self, PromotionTypes ePromotionNum);CivRegisterBefore<CivHooks::CvGlobals_getPromotionInfo_with_PromotionTypes>(host, &BeforeCvGlobals_getPromotionInfo_with_PromotionTypes);CivRegisterAfter<CivHooks::CvGlobals_getPromotionInfo_with_PromotionTypes>(host, &AfterCvGlobals_getPromotionInfo_with_PromotionTypes);CivRegisterReplace<CivHooks::CvGlobals_getPromotionInfo_with_PromotionTypes>(host, &ReplaceCvGlobals_getPromotionInfo_with_PromotionTypes);
Code
3496CvPromotionEntry* CvGlobals::getPromotionInfo(PromotionTypes ePromotionNum)3497{3498 CvAssert(ePromotionNum > -1);3499 CvAssert(ePromotionNum < GC.getNumPromotionInfos());3500 if(ePromotionNum > -1 && ePromotionNum < GC.getNumPromotionInfos())3501 return m_pPromotions->GetPromotionEntries()[ePromotionNum];3502 else3503 return NULL;3504}
Calls
- CvGlobals::getNumPromotionInfos()
- CvPromotionXMLEntries::GetPromotionEntries()
std::vector::operator[]
Called by
36 functions in 15 files
- CvBarbarians::GetRandomBarbarianUnitType(CvPlot *, UnitAITypes)
- CvCity::addProductionExperience(CvUnit *, bool)
- CvDllGameContext::GetPromotionInfo(PromotionTypes)
- CvDllDatabaseUtility::SetGlobalActionInfo()
- EconomicAIHelpers::IsTestStrategy_ReallyNeedReconSea(CvPlayer *)
- CvGame::GetCompetitiveSpawnUnitType(PlayerTypes, bool, bool, bool)
- CvGame::GetRandomSpawnUnitType(PlayerTypes, bool, bool)
- CvGame::GetRandomUniqueUnitType(bool, bool, bool, bool)
- IsPromotionValidForCivilianUnitType(PromotionTypes, UnitTypes)
- IsPromotionValidForUnitCombatType(PromotionTypes, UnitTypes)
- isPromotionValid(PromotionTypes, UnitTypes, bool, bool)
- CvActionInfo::getCommandType() const
- CvActionInfo::getHotkeyInfo() const
- CvInfosSerializationHelper::Write(FDataStream &, const PromotionTypes)
- CvInfosSerializationHelper::WriteHashed(FDataStream &, const PromotionTypes)
- CvPlayer::setCombatExperienceTimes100(int, CvUnit *)
- CvPlayer::setNavalCombatExperienceTimes100(int, CvUnit *)
- CvPlot::updateSeeFromSight(bool)
- CvUnitPromotions::GetAllowFeaturePassable(FeatureTypes) const
- CvUnitPromotions::GetAllowTerrainPassable(TerrainTypes) const
- CvUnitPromotions::GetUnitClassAttackMod(UnitClassTypes) const
- CvUnitPromotions::GetUnitClassDefenseMod(UnitClassTypes) const
- PromotionArrayHelpers::Write(FDataStream &, const CvBitfield &, int)
- CvUnit::AI_promote()
- CvUnit::AI_promotionValue(PromotionTypes)
- CvUnit::canAcquirePromotion(PromotionTypes) const
- CvUnit::canPromote(PromotionTypes, int) const
- CvUnit::changeExperienceTimes100(int, int, bool, bool, bool)
- CvUnit::convert(CvUnit *, bool)
- CvUnit::initWithNameOffset(int, UnitTypes, int, UnitAITypes, PlayerTypes, int, int, DirectionTypes, bool, bool, int, int)
- CvUnit::isPromotionValid(PromotionTypes) const
- CvUnit::promote(PromotionTypes, int)
- CvUnit::setHasPromotion(PromotionTypes, bool)
- CvUnitEntry::DoUpdatePower()
- CvUnitEntry::GetCargoSpace() const
- InitTypeDesc()