CvUnit::GetCurrHitPoints() const
- Defined in
- CvUnit.cpp, line 12016
- Class
- CvUnit
- Hook name
CivHooks::CvUnit_GetCurrHitPoints
Hooks
static bool BeforeCvUnit_GetCurrHitPoints(const CvUnit* self, int& result);static void AfterCvUnit_GetCurrHitPoints(const CvUnit* self, int& result);static int ReplaceCvUnit_GetCurrHitPoints(int (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_GetCurrHitPoints>(host, &BeforeCvUnit_GetCurrHitPoints);CivRegisterAfter<CivHooks::CvUnit_GetCurrHitPoints>(host, &AfterCvUnit_GetCurrHitPoints);CivRegisterReplace<CivHooks::CvUnit_GetCurrHitPoints>(host, &ReplaceCvUnit_GetCurrHitPoints);
Code
12016int CvUnit::GetCurrHitPoints() const12017{12018 VALIDATE_OBJECT12019 return (GetMaxHitPoints() - getDamage());12020}
Calls
Called by
- CvAIOperation::FindBestFitReserveUnit(OperationSlot, CvPlot *, CvPlot *, bool *)
- CvHomelandAI::MoveCivilianToSafety(CvUnit *, bool, bool)
- CvHomelandAI::PlotHealMoves()
- CvHomelandAI::PlotMovesToSafety()
- MilitaryAIHelpers::FirstSlotCityCanFill(CvPlayer *, MultiunitFormationTypes, bool, bool, bool)
- MilitaryAIHelpers::NumberOfFillableSlots(CvPlayer *, MultiunitFormationTypes, bool, int *, int *)
- CvCombatInfo::getDamageInflicted(BattleUnitTypes) const
- CvTacticalAI::ClearEnemiesNearArmy(CvArmyAI *)
- CvTacticalAI::ExecuteFlankAttack(CvTacticalTarget &)
- CvTacticalAI::ExecuteSafeBombards(CvTacticalTarget &)
- CvTacticalAI::FindAirUnitsToAirSweep(CvPlot *)
- CvTacticalAI::FindParatroopersWithinStrikingDistance(CvPlot *)
- CvTacticalAI::FindUnitsForThisMove(TacticalAIMoveTypes, CvPlot *, int, bool)
- CvTacticalAI::FindUnitsWithinStrikingDistance(CvPlot *, int, int, bool, bool, bool, bool, bool, bool)
- CvTacticalAI::PlotDestroyUnitMoves(AITacticalTargetType, bool, bool)
- CvTacticalAI::PlotHealMoves()
- CvTacticalAI::PlotMovesToSafety(bool)
- CvUnit::GetPower() const
- CvUnit::currInterceptionProbability() const
- CvUnit::setDamage(int, PlayerTypes, int, float, const CvString *)
- CvUnitCombat::ParadropIntercept(CvUnit &, CvPlot &)
- CvLuaUnit::lGetCurrHitPoints(lua_State *)