CvPlot::getUnitByIndex(int) const
- Defined in
- CvPlot.cpp, line 10247
- Class
- CvPlot
- Hook name
CivHooks::CvPlot_getUnitByIndex
Hooks
static bool BeforeCvPlot_getUnitByIndex(const CvPlot* self, int iIndex, CvUnit*& result);static void AfterCvPlot_getUnitByIndex(const CvPlot* self, int iIndex, CvUnit*& result);static CvUnit* ReplaceCvPlot_getUnitByIndex(CvUnit* (*original)(const CvPlot*, int), const CvPlot* self, int iIndex);CivRegisterBefore<CivHooks::CvPlot_getUnitByIndex>(host, &BeforeCvPlot_getUnitByIndex);CivRegisterAfter<CivHooks::CvPlot_getUnitByIndex>(host, &AfterCvPlot_getUnitByIndex);CivRegisterReplace<CivHooks::CvPlot_getUnitByIndex>(host, &ReplaceCvPlot_getUnitByIndex);
Code
10247CvUnit* CvPlot::getUnitByIndex(int iIndex) const10248{10249 const IDInfo* pUnitNode;1025010251 pUnitNode = m_units.nodeNum(iIndex);1025210253 if(pUnitNode != NULL)10254 {10255 return (CvUnit*)GetPlayerUnit(*pUnitNode);10256 }10257 else10258 {10259 return NULL;10260 }10261}
Calls
FFastSmallFixedList::nodeNum- GetPlayerUnit(const IDInfo &)
Called by
33 functions in 16 files
- CvAIOperationNavalSuperiority::FindBestTarget()
- PathValid(CvAStarNode *, CvAStarNode *, int, const void *, CvAStar *)
- TacticalAnalysisMapPathValid(CvAStarNode *, CvAStarNode *, int, const void *, CvAStar *)
- CvBarbarians::DoSpawnBarbarianUnit(CvPlot *, bool, bool)
- CvCity::PreKill(bool)
- CvDllNetMessageHandler::ResponseSwapUnits(PlayerTypes, int, MissionTypes, int, int, int, bool)
- CvDllPlot::GetUnitByIndex(int) const
- CvHomelandAI::ExecuteAdmiralMoves()
- CvHomelandAI::ExecuteGeneralMoves()
- CvHomelandAI::ExecuteProphetMoves()
- CvHomelandAI::FindHomelandTargets()
- CvMilitaryAI::GetBestAirSweepTarget(CvUnit *) const
- CvPlot::IsActualAlliedUnit(PlayerTypes, bool) const
- CvPlot::IsActualEnemyUnit(PlayerTypes, bool, bool) const
- CvPlot::changeVisibilityCount(TeamTypes, int, InvisibleTypes, bool, bool, CvUnit *)
- CvPlot::getLayerUnit(int, int) const
- CvCityReligions::IsDefendedAgainstSpread(ReligionTypes)
- CvReligionAI::ChooseInquisitorTargetPlot(UnitHandle, int *)
- CvReligionAI::ChooseMissionaryTargetPlot(UnitHandle, int *)
- CvReligionAI::ChooseProphetTargetPlot(UnitHandle, int *)
- CvTacticalAI::ExecuteBarbarianCivilianEscortMove()
- CvTacticalAI::FindTacticalTargets()
- CvTacticalAI::PlotMovesToSafety(bool)
- CvTacticalAI::ScoreGreatGeneralPlot(UnitHandle, CvPlot *, CvArmyAI *)
- CvTacticalAnalysisMap::PopulateCell(int, CvPlot *)
- CvUnit::canHeal(const CvPlot *, bool) const
- CvUnit::canMoveInto(const CvPlot &, byte) const
- CvUnit::repairFleet()
- CvUnit::setXY(int, int, bool, bool, bool, bool, bool)
- CvUnitCombat::AttackNuclear(CvUnit &, int, int, ATTACK_OPTION)
- CvUnitCombat::GetFireSupportUnit(PlayerTypes, int, int, int, int)
- CvUnitMission::ContinueMission(UnitHandle, int, int)
- CvLuaPlot::lGetUnit(lua_State *)