CvPlayer::greatAdmiralThreshold() const
- Defined in
- CvPlayer.cpp, line 9995
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_greatAdmiralThreshold
Hooks
static bool BeforeCvPlayer_greatAdmiralThreshold(const CvPlayer* self, int& result);static void AfterCvPlayer_greatAdmiralThreshold(const CvPlayer* self, int& result);static int ReplaceCvPlayer_greatAdmiralThreshold(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_greatAdmiralThreshold>(host, &BeforeCvPlayer_greatAdmiralThreshold);CivRegisterAfter<CivHooks::CvPlayer_greatAdmiralThreshold>(host, &AfterCvPlayer_greatAdmiralThreshold);CivRegisterReplace<CivHooks::CvPlayer_greatAdmiralThreshold>(host, &ReplaceCvPlayer_greatAdmiralThreshold);
Code
9995int CvPlayer::greatAdmiralThreshold() const9996{9997 int iThreshold;99989999 iThreshold = ((/*200*/ GC.getGREAT_GENERALS_THRESHOLD() * std::max(0, (getGreatAdmiralsThresholdModifier() + 100))) / 100);1000010001 iThreshold *= GC.getGame().getGameSpeedInfo().getGreatPeoplePercent();10002 iThreshold /= std::max(1, GC.getGame().getGameSpeedInfo().getTrainPercent());1000310004 iThreshold *= GC.getGame().getStartEraInfo().getGreatPeoplePercent();10005 iThreshold /= 100;1000610007 return std::max(1, iThreshold);10008}
Calls
- CvEraInfo::getGreatPeoplePercent() const
- CvGame::getGameSpeedInfo() const
- CvGame::getStartEraInfo() const
- CvGameSpeedInfo::getGreatPeoplePercent() const
- CvGameSpeedInfo::getTrainPercent() const
- CvGlobals::getGame()
- CvGlobals::getGREAT_GENERALS_THRESHOLD()
- CvPlayer::getGreatAdmiralsThresholdModifier() const
std::max