Bazaar developer reference

CvTreasury::Init(CvPlayer *)

Defined in
CvTreasury.cpp, line 42
Class
CvTreasury
Hook name
CivHooks::CvTreasury_Init

Hooks

static bool BeforeCvTreasury_Init(CvTreasury* self, CvPlayer* pPlayer);static void AfterCvTreasury_Init(CvTreasury* self, CvPlayer* pPlayer);static void ReplaceCvTreasury_Init(void (*original)(CvTreasury*, CvPlayer*), CvTreasury* self, CvPlayer* pPlayer);CivRegisterBefore<CivHooks::CvTreasury_Init>(host, &BeforeCvTreasury_Init);CivRegisterAfter<CivHooks::CvTreasury_Init>(host, &AfterCvTreasury_Init);CivRegisterReplace<CivHooks::CvTreasury_Init>(host, &ReplaceCvTreasury_Init);

Code

41/// Initialize42void CvTreasury::Init(CvPlayer* pPlayer)43{44	m_pPlayer = pPlayer;4546	m_iGold = 0;47	m_iGoldPerTurnFromDiplomacy = 0;48	m_iExpensePerTurnUnitMaintenance = 0;49	m_iExpensePerTurnUnitSupply = 0;50	m_iCityConnectionGoldTimes100 = 0;51	m_iCityConnectionTradeRouteGoldModifier = 0;52	m_iCityConnectionTradeRouteGoldChange = 0;53	m_iBaseBuildingGoldMaintenance = 0;54	m_iBaseImprovementGoldMaintenance = 0;55	m_iLifetimeGrossGoldIncome = 0;5657	m_GoldBalanceForTurnTimes100.clear();58	m_GoldBalanceForTurnTimes100.reserve(750);59	m_GoldChangeForTurnTimes100.clear();60	m_GoldChangeForTurnTimes100.reserve(750);61}

Calls

Called by