CvUnitEntry::GetPower() const
- Defined in
- CvUnitClasses.cpp, line 1302
- Class
- CvUnitEntry
- Hook name
CivHooks::CvUnitEntry_GetPower
Hooks
static bool BeforeCvUnitEntry_GetPower(const CvUnitEntry* self, int& result);static void AfterCvUnitEntry_GetPower(const CvUnitEntry* self, int& result);static int ReplaceCvUnitEntry_GetPower(int (*original)(const CvUnitEntry*), const CvUnitEntry* self);CivRegisterBefore<CivHooks::CvUnitEntry_GetPower>(host, &BeforeCvUnitEntry_GetPower);CivRegisterAfter<CivHooks::CvUnitEntry_GetPower>(host, &AfterCvUnitEntry_GetPower);CivRegisterReplace<CivHooks::CvUnitEntry_GetPower>(host, &ReplaceCvUnitEntry_GetPower);
Code
1301/// Military might or "power" - returns cache1302int CvUnitEntry::GetPower() const1303{1304 return m_iCachedPower;1305}
Called by
- CvDiplomacyAI::DoUpdateWarDamageLevel()
- CvGame::GetCompetitiveSpawnUnitType(PlayerTypes, bool, bool, bool)
- CvGame::GetCsGiftSpawnUnitType(PlayerTypes, bool)
- CvGameQueries::GetLeastAdvancedUnitClassNobodyHas(bool)
- CvHomelandAI::PlotUpgradeMoves()
- CvMilitaryAI::FindBestUnitToScrap(bool, bool, int &)
- CvMilitaryAI::GetPowerOfStrongestBuildableUnit(DomainTypes)
- CvUnit::GetPower() const
- CvUnit::kill(bool, PlayerTypes)