Bazaar developer reference

CvPlayer::GetEconomicMight() const

Defined in
CvPlayer.cpp, line 16993
Class
CvPlayer
Hook name
CivHooks::CvPlayer_GetEconomicMight

Hooks

static bool BeforeCvPlayer_GetEconomicMight(const CvPlayer* self, int& result);static void AfterCvPlayer_GetEconomicMight(const CvPlayer* self, int& result);static int ReplaceCvPlayer_GetEconomicMight(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_GetEconomicMight>(host, &BeforeCvPlayer_GetEconomicMight);CivRegisterAfter<CivHooks::CvPlayer_GetEconomicMight>(host, &AfterCvPlayer_GetEconomicMight);CivRegisterReplace<CivHooks::CvPlayer_GetEconomicMight>(host, &ReplaceCvPlayer_GetEconomicMight);

Code

16993int CvPlayer::GetEconomicMight() const16994{16995	if(m_iTurnMightRecomputed < GC.getGame().getElapsedGameTurns())16996	{16997		// more lazy evaluation16998		const_cast<CvPlayer*>(this)->m_iTurnMightRecomputed = GC.getGame().getElapsedGameTurns();16999		const_cast<CvPlayer*>(this)->m_iMilitaryMight = calculateMilitaryMight();17000		const_cast<CvPlayer*>(this)->m_iEconomicMight = calculateEconomicMight();17001	}17002	return m_iEconomicMight;17003}

Calls

Called by