Bazaar developer reference

CvGame::GetFaithCost(CvUnitEntry *) const

Defined in
CvGame.cpp, line 5848
Class
CvGame
Hook name
CivHooks::CvGame_GetFaithCost

Hooks

static bool BeforeCvGame_GetFaithCost(const CvGame* self, CvUnitEntry * pkUnit, int& result);static void AfterCvGame_GetFaithCost(const CvGame* self, CvUnitEntry * pkUnit, int& result);static int ReplaceCvGame_GetFaithCost(int (*original)(const CvGame*, CvUnitEntry *), const CvGame* self, CvUnitEntry * pkUnit);CivRegisterBefore<CivHooks::CvGame_GetFaithCost>(host, &BeforeCvGame_GetFaithCost);CivRegisterAfter<CivHooks::CvGame_GetFaithCost>(host, &AfterCvGame_GetFaithCost);CivRegisterReplace<CivHooks::CvGame_GetFaithCost>(host, &ReplaceCvGame_GetFaithCost);

Code

5848int CvGame::GetFaithCost(CvUnitEntry *pkUnit) const5849{5850	int iRtnValue = pkUnit->GetFaithCost();5851	iRtnValue *= getGameSpeedInfo().getTrainPercent();5852	iRtnValue /= 1000;   // Normalize costs like purchase system does5853	iRtnValue *= 10;58545855	return iRtnValue;5856}

Calls

Called by