CvGlobals::getUnitClassInfo(UnitClassTypes)
- Defined in
- CvGlobals.cpp, line 3391
- Class
- CvGlobals
- Hook name
CivHooks::CvGlobals_getUnitClassInfo_with_UnitClassTypes
Hooks
static bool BeforeCvGlobals_getUnitClassInfo_with_UnitClassTypes(CvGlobals* self, UnitClassTypes eUnitClassNum, CvUnitClassInfo*& result);static void AfterCvGlobals_getUnitClassInfo_with_UnitClassTypes(CvGlobals* self, UnitClassTypes eUnitClassNum, CvUnitClassInfo*& result);static CvUnitClassInfo* ReplaceCvGlobals_getUnitClassInfo_with_UnitClassTypes(CvUnitClassInfo* (*original)(CvGlobals*, UnitClassTypes), CvGlobals* self, UnitClassTypes eUnitClassNum);CivRegisterBefore<CivHooks::CvGlobals_getUnitClassInfo_with_UnitClassTypes>(host, &BeforeCvGlobals_getUnitClassInfo_with_UnitClassTypes);CivRegisterAfter<CivHooks::CvGlobals_getUnitClassInfo_with_UnitClassTypes>(host, &AfterCvGlobals_getUnitClassInfo_with_UnitClassTypes);CivRegisterReplace<CivHooks::CvGlobals_getUnitClassInfo_with_UnitClassTypes>(host, &ReplaceCvGlobals_getUnitClassInfo_with_UnitClassTypes);
Code
3391CvUnitClassInfo* CvGlobals::getUnitClassInfo(UnitClassTypes eUnitClassNum)3392{3393 CvAssert(eUnitClassNum > -1);3394 CvAssert(eUnitClassNum < GC.getNumUnitClassInfos());3395 if(eUnitClassNum > -1 && eUnitClassNum < (int)m_paUnitClassInfo.size())3396 return m_paUnitClassInfo[eUnitClassNum];3397 else3398 return NULL;3399}
Calls
std::vector::operator[]std::vector::size
Called by
34 functions in 13 files
- CvBarbarians::GetRandomBarbarianUnitType(CvPlot *, UnitAITypes)
- CvCity::allUpgradesAvailable(UnitTypes, int) const
- CvCity::getConscriptUnit() const
- CvGame::GetCompetitiveSpawnUnitType(PlayerTypes, bool, bool, bool)
- CvGame::GetCsGiftSpawnUnitType(PlayerTypes, bool)
- CvGame::GetRandomSpawnUnitType(PlayerTypes, bool, bool)
- CvGame::GetRandomUniqueUnitType(bool, bool, bool, bool)
- CvGame::calculateSyncChecksum()
- CvGame::isUnitClassMaxedOut(UnitClassTypes, int)
- CvGame::reset(HandicapTypes, bool)
- isNationalUnitClass(UnitClassTypes)
- isTeamUnitClass(UnitClassTypes)
- isWorldUnitClass(UnitClassTypes)
- CvGameQueries::GetLeastAdvancedUnitClassNobodyHas(bool)
- UnitClassArrayHelpers::Write(FDataStream &, int *, int)
- CvPlayer::GetSpecificUnitType(const char *, bool)
- CvPlayer::addFreeUnit(UnitTypes, UnitAITypes)
- CvPlayer::addFreeUnitAI(UnitAITypes, int)
- CvPlayer::canTrain(UnitTypes, bool, bool, bool, bool, CvString *) const
- CvPlayer::getProductionNeeded(UnitTypes) const
- CvPlayer::init(PlayerTypes)
- CvPlayer::initFreeUnits(CvGameInitialItemsOverrides &)
- CvPlayer::isUnitClassMaxedOut(UnitClassTypes, int) const
- CvPlayer::processPolicies(PolicyTypes, int)
- CvPlayerAI::AI_chooseFreeGreatPerson()
- CvTeam::isUnitClassMaxedOut(UnitClassTypes, int) const
- CvTeam::shareCounters(TeamTypes)
- CvPlayerTraits::IsFreeMayaGreatPersonChoice() const
- CvUnit::GetUpgradeUnitType() const
- CvUnit::reset(int, UnitTypes, PlayerTypes, bool)
- CvUnit::setHasPromotion(PromotionTypes, bool)
- CvLeague::GetCurrentEffectsSummary(PlayerTypes)
- CvLeagueAI::ScoreVoteChoiceYesNo(CvProposal *, int, bool)
- CvLuaGame::lGetUnitUpgradesTo(lua_State *)