Bazaar developer reference

CvPlayer::calculateProductionMight() const

Defined in
CvPlayer.cpp, line 17060
Class
CvPlayer
Hook name
CivHooks::CvPlayer_calculateProductionMight

Hooks

static bool BeforeCvPlayer_calculateProductionMight(const CvPlayer* self, int& result);static void AfterCvPlayer_calculateProductionMight(const CvPlayer* self, int& result);static int ReplaceCvPlayer_calculateProductionMight(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_calculateProductionMight>(host, &BeforeCvPlayer_calculateProductionMight);CivRegisterAfter<CivHooks::CvPlayer_calculateProductionMight>(host, &AfterCvPlayer_calculateProductionMight);CivRegisterReplace<CivHooks::CvPlayer_calculateProductionMight>(host, &ReplaceCvPlayer_calculateProductionMight);

Code

17060int CvPlayer::calculateProductionMight() const17061{17062	int iMight = 0;1706317064	const CvCity* pLoopCity;17065	int iLoop;17066	for(pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))17067	{17068		iMight += pLoopCity->getRawProductionDifference(/*bIgnoreFood*/ true, /*bOverflow*/ false);17069	}1707017071	return iMight;17072}

Calls

Called by