Bazaar developer reference

CvPlayer::calculateUnitCost() const

Defined in
CvPlayer.cpp, line 9787
Class
CvPlayer
Hook name
CivHooks::CvPlayer_calculateUnitCost

Hooks

static bool BeforeCvPlayer_calculateUnitCost(const CvPlayer* self, int& result);static void AfterCvPlayer_calculateUnitCost(const CvPlayer* self, int& result);static int ReplaceCvPlayer_calculateUnitCost(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_calculateUnitCost>(host, &BeforeCvPlayer_calculateUnitCost);CivRegisterAfter<CivHooks::CvPlayer_calculateUnitCost>(host, &AfterCvPlayer_calculateUnitCost);CivRegisterReplace<CivHooks::CvPlayer_calculateUnitCost>(host, &ReplaceCvPlayer_calculateUnitCost);

Code

9787int CvPlayer::calculateUnitCost() const9788{9789	int iFreeUnits;9790	int iPaidUnits;9791	int iBaseUnitCost;9792	int iExtraCost;97939794	return GetTreasury()->CalculateUnitCost(iFreeUnits, iPaidUnits, iBaseUnitCost, iExtraCost);9795}

Calls

Called by