CvGlobals::getUnitInfo(UnitTypes)
- Defined in
- CvGlobals.cpp, line 2984
- Class
- CvGlobals
- Hook name
CivHooks::CvGlobals_getUnitInfo_with_UnitTypes
Hooks
static bool BeforeCvGlobals_getUnitInfo_with_UnitTypes(CvGlobals* self, UnitTypes eUnitNum, CvUnitEntry*& result);static void AfterCvGlobals_getUnitInfo_with_UnitTypes(CvGlobals* self, UnitTypes eUnitNum, CvUnitEntry*& result);static CvUnitEntry* ReplaceCvGlobals_getUnitInfo_with_UnitTypes(CvUnitEntry* (*original)(CvGlobals*, UnitTypes), CvGlobals* self, UnitTypes eUnitNum);CivRegisterBefore<CivHooks::CvGlobals_getUnitInfo_with_UnitTypes>(host, &BeforeCvGlobals_getUnitInfo_with_UnitTypes);CivRegisterAfter<CivHooks::CvGlobals_getUnitInfo_with_UnitTypes>(host, &AfterCvGlobals_getUnitInfo_with_UnitTypes);CivRegisterReplace<CivHooks::CvGlobals_getUnitInfo_with_UnitTypes>(host, &ReplaceCvGlobals_getUnitInfo_with_UnitTypes);
Code
2984CvUnitEntry* CvGlobals::getUnitInfo(UnitTypes eUnitNum)2985{2986 CvAssert(eUnitNum > -1);2987 CvAssert(eUnitNum < GC.getNumUnitInfos());2988 if(eUnitNum > -1 && eUnitNum < GC.getNumUnitInfos())2989 return m_pUnits->GetUnitEntries()[eUnitNum];2990 else2991 return NULL;2992}
Calls
- CvGlobals::getNumUnitInfos()
- CvUnitXMLEntries::GetUnitEntries()
std::vector::operator[]
Called by
129 functions in 32 files
- CvAdvisorCounsel::BuildCounselList(PlayerTypes)
- CvAdvisorRecommender::FindUnassignedAdvisorForBuildable(PlayerTypes, CvCityBuildable &)
- CvAINavalOperation::FindInitialUnit()
- CvAIOperation::FindBestFitReserveUnit(OperationSlot, CvPlot *, CvPlot *, bool *)
- CvBarbarians::DoCamps()
- CvBarbarians::GetRandomBarbarianUnitType(CvPlot *, UnitAITypes)
- CvCity::CanPlaceUnitHere(UnitTypes)
- CvCity::GetFaithPurchaseCost(UnitTypes, bool)
- CvCity::GetPurchaseCost(UnitTypes)
- CvCity::IsCanPurchase(bool, bool, UnitTypes, BuildingTypes, ProjectTypes, YieldTypes)
- CvCity::Purchase(UnitTypes, BuildingTypes, ProjectTypes, YieldTypes)
- CvCity::allUpgradesAvailable(UnitTypes, int) const
- CvCity::canTrain(UnitCombatTypes) const
- CvCity::canTrain(UnitTypes, bool, bool, bool, bool, CvString *) const
- CvCity::doCheckProduction()
- CvCity::doDecay()
- CvCity::getConscriptPopulation() const
- CvCity::getConscriptUnit() const
- CvCity::getHurryCostModifier(HurryTypes, UnitTypes, bool) const
- CvCity::getProductionExperience(UnitTypes)
- CvCity::getProductionModifier(UnitTypes, CvString *) const
- CvCity::getProductionName() const
- CvCity::getProductionNameKey() const
- CvCity::isFoodProduction(UnitTypes) const
- CvCity::isProductionLimited() const
- CvCity::popOrder(int, bool, bool)
- CvCity::processBuilding(BuildingTypes, int, bool, bool, bool)
- CvCity::pushOrder(OrderTypes, int, int, bool, bool, bool, bool)
- CvCity::read(FDataStream &)
- CvCityCitizens::DoTurn()
- CvCitySpecializationAI::CanBuildSpaceshipParts()
- CvCityStrategyAI::ChooseProduction(bool, BuildingTypes, UnitTypes)
- CvDiplomacyAI::DoUpdateWarDamageLevel()
- CvDllGameContext::GetUnitInfo(UnitTypes)
- CvEconomicAI::DisbandLongObsoleteUnits()
- EconomicAIHelpers::IsTestStrategy_ReallyNeedReconSea(CvPlayer *)
- CvGame::GetCompetitiveSpawnUnitType(PlayerTypes, bool, bool, bool)
- CvGame::GetCsGiftSpawnUnitType(PlayerTypes, bool)
- CvGame::GetRandomSpawnUnitType(PlayerTypes, bool, bool)
- CvGame::GetRandomUniqueUnitType(bool, bool, bool, bool)
- CvGame::canTrainNukes() const
- CvGame::getBestLandUnitCombat()
- CvGame::isUnitEverActive(UnitTypes) const
- CvGame::reset(HandicapTypes, bool)
- CvGame::selectionListIgnoreBuildingDefense()
- CvGame::updateMoves()
- IsPromotionValidForUnitCombatType(PromotionTypes, UnitTypes)
- getDiscoveryTech(UnitTypes, PlayerTypes)
- isPromotionValid(PromotionTypes, UnitTypes, bool, bool)
- isTechRequiredForUnit(TechTypes, UnitTypes)
- CvGameQueries::AreUnitsSameType(UnitTypes, UnitTypes)
- CvGameQueries::GetLeastAdvancedUnitClassNobodyHas(bool)
- CvHomelandAI::ExecuteAircraftInterceptions()
- CvHomelandAI::ExecuteAircraftMoves()
- CvHomelandAI::ExecuteMovesToSafestPlot()
- CvHomelandAI::MoveCivilianToSafety(CvUnit *, bool, bool)
- CvHomelandAI::PlotUpgradeMoves()
- CvHomelandAI::ReviewUnassignedUnits()
- CvInfosSerializationHelper::Write(FDataStream &, const UnitTypes)
- CvInfosSerializationHelper::WriteHashed(FDataStream &, const UnitTypes)
- CvMilitaryAI::GetPowerOfStrongestBuildableUnit(DomainTypes)
- CvMinorCivAI::DoSpawnUnit(PlayerTypes, bool, bool)
- CvMinorCivAI::GetBestGreatPersonForQuest(PlayerTypes)
- CvMinorCivAI::GetMajorBullyUnitDetails(PlayerTypes)
- CvMinorCivAI::SetUniqueUnit(UnitTypes)
- CvMinorCivQuest::DoFinishQuest()
- CvMinorCivQuest::DoStartQuest(int)
- CvPlayer::DoSpawnGreatPerson(PlayerTypes, bool)
- CvPlayer::DoUnresearchedTechBonusFromKill(CvUnit *, UnitTypes, int, int, int &)
- CvPlayer::DoYieldBonusFromKill(YieldTypes, CvUnit *, CvUnit *, UnitTypes, int, int, bool, int &)
- CvPlayer::GetGreatPersonSpawnCity(UnitTypes)
- CvPlayer::GetNumUnitsWithUnitAI(UnitAITypes, bool, bool)
- CvPlayer::addFreeUnit(UnitTypes, UnitAITypes)
- CvPlayer::addFreeUnitAI(UnitAITypes, int)
- CvPlayer::canCreate(ProjectTypes, bool, bool) const
- CvPlayer::canReceiveGoody(CvPlot *, GoodyTypes, CvUnit *) const
- CvPlayer::canTrain(UnitTypes, bool, bool, bool, bool, CvString *) const
- CvPlayer::changeUnitClassMaking(UnitClassTypes, int)
- CvPlayer::getAdvancedStartUnitCost(UnitTypes, bool, CvPlot *)
- CvPlayer::getProductionModifier(UnitTypes, CvString *) const
- CvPlayer::getProductionNeeded(UnitTypes) const
- CvPlayer::init(PlayerTypes)
- CvPlayer::initUnit(UnitTypes, int, int, UnitAITypes, DirectionTypes, bool, bool, int, int)
- CvPlayer::initUnitWithNameOffset(UnitTypes, int, int, int, UnitAITypes, DirectionTypes, bool, bool, int, int)
- CvPlayer::processPolicies(PolicyTypes, int)
- CvPlayer::receiveGoody(CvPlot *, GoodyTypes, CvUnit *)
- CvPlayer::setCombatExperienceTimes100(int, CvUnit *)
- CvPlayer::setNavalCombatExperienceTimes100(int, CvUnit *)
- CvPlayerAI::AI_chooseFreeGreatPerson()
- CvPlot::canTrain(UnitTypes, bool, bool) const
- CvCityReligions::IsDefendedAgainstSpread(ReligionTypes)
- CvGameReligions::DoPlayerTurn(CvPlayer &)
- CvPlayerReligions::CanAffordFaithPurchase(int) const
- CvReligionAI::DoFaithPurchases()
- CvReligionAI::GetDesiredFaithGreatPerson() const
- CvReligionAI::HaveNearbyConversionTarget(ReligionTypes, bool) const
- CvReligionAIHelpers::DoesUnitPassFaithPurchaseCheck(CvPlayer &, UnitTypes)
- CvReligionAIHelpers::GetBestCityFaithUnitPurchase(CvPlayer &, UnitTypes, ReligionTypes)
- CvTacticalAI::ExecuteAttack(CvTacticalTarget *, CvPlot *, bool, bool)
- CvTacticalAI::ExecuteMovesToSafestPlot()
- CvTacticalAI::IsHighPriorityCivilianTarget(CvTacticalTarget *)
- CvTacticalAI::PlotDestroyUnitMoves(AITacticalTargetType, bool, bool)
- CvTacticalAI::PlotNavalEscortOperationMoves(CvAINavalEscortedOperation *)
- CvTacticalAI::PlotSingleHexOperationMoves(CvAIEscortedOperation *)
- CvPlayerTechs::Reset()
- CvPlayerTrade::GetPlotMouseoverToolTips(CvPlot *)
- CvPlayerTrade::GetTradeRouteSpeed(DomainTypes)
- CvPlayerTrade::PlunderTradeRoute(int, CvUnit *)
- CvPlayerTraits::IsFreeMayaGreatPersonChoice() const
- CvUnit::CanUpgradeTo(UnitTypes, bool) const
- CvUnit::DoCultureBomb()
- CvUnit::GetCaptureChance(CvUnit *)
- CvUnit::createCaptureUnit(const CvUnitCaptureDefinition &)
- CvUnit::getCaptureUnitType(CivilizationTypes) const
- CvUnit::initWithNameOffset(int, UnitTypes, int, UnitAITypes, PlayerTypes, int, int, DirectionTypes, bool, bool, int, int)
- CvUnit::read(FDataStream &)
- CvUnit::reset(int, UnitTypes, PlayerTypes, bool)
- CvUnit::upgradePrice(UnitTypes) const
- CvUnitProductionAI::GetTempWeightRevised(UnitTypes, int)
- CvUnitProductionAI::RecommendUnit(UnitAITypes)
- CvUnitProductionAI::Write(FDataStream &) const
- InitTypeDesc()
- SetupUnit(const CvWorldBuilderMap::Unit &, int, int)
- CvLuaGame::lGetFaithCost(lua_State *)
- CvLuaGame::lGetNumResourceRequiredForUnit(lua_State *)
- CvLuaGame::lGetUnitUpgradesTo(lua_State *)
- CvLuaPlayer::lGetRecommendedWorkerPlots(lua_State *)
- CvLuaUnit::lGetNumResourceNeededToUpgrade(lua_State *)
- CvLuaUnit::lIsRangeAttackOnlyInDomain(lua_State *)