Bazaar developer reference

CvPlayer::GetNumUnitsSuppliedByHandicap() const

Defined in
CvPlayer.cpp, line 9718
Class
CvPlayer
Hook name
CivHooks::CvPlayer_GetNumUnitsSuppliedByHandicap

Hooks

static bool BeforeCvPlayer_GetNumUnitsSuppliedByHandicap(const CvPlayer* self, int& result);static void AfterCvPlayer_GetNumUnitsSuppliedByHandicap(const CvPlayer* self, int& result);static int ReplaceCvPlayer_GetNumUnitsSuppliedByHandicap(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_GetNumUnitsSuppliedByHandicap>(host, &BeforeCvPlayer_GetNumUnitsSuppliedByHandicap);CivRegisterAfter<CivHooks::CvPlayer_GetNumUnitsSuppliedByHandicap>(host, &AfterCvPlayer_GetNumUnitsSuppliedByHandicap);CivRegisterReplace<CivHooks::CvPlayer_GetNumUnitsSuppliedByHandicap>(host, &ReplaceCvPlayer_GetNumUnitsSuppliedByHandicap);

Code

9717/// Units supplied from Difficulty Level9718int CvPlayer::GetNumUnitsSuppliedByHandicap() const9719{9720#if defined(MOD_TRAITS_EXTRA_SUPPLY)9721	// Don't need a test here for MOD_TRAITS_EXTRA_SUPPLY being enabled, as if it isn't GetExtraSupply() will return 09722	return getHandicapInfo().getProductionFreeUnits() + m_pTraits->GetExtraSupply();9723#else9724	return getHandicapInfo().getProductionFreeUnits();9725#endif9726}

Calls

Called by