CvGame::DoUpdateTotalReligionTechCost()
- Defined in
- CvGame.cpp, line 6837
- Class
- CvGame
- Hook name
CivHooks::CvGame_DoUpdateTotalReligionTechCost
Hooks
static bool BeforeCvGame_DoUpdateTotalReligionTechCost(CvGame* self);static void AfterCvGame_DoUpdateTotalReligionTechCost(CvGame* self);static void ReplaceCvGame_DoUpdateTotalReligionTechCost(void (*original)(CvGame*), CvGame* self);CivRegisterBefore<CivHooks::CvGame_DoUpdateTotalReligionTechCost>(host, &BeforeCvGame_DoUpdateTotalReligionTechCost);CivRegisterAfter<CivHooks::CvGame_DoUpdateTotalReligionTechCost>(host, &AfterCvGame_DoUpdateTotalReligionTechCost);CivRegisterReplace<CivHooks::CvGame_DoUpdateTotalReligionTechCost>(host, &ReplaceCvGame_DoUpdateTotalReligionTechCost);
Code
6836/// Updates the cached Total Research cost for the Religion Victory Competition6837void CvGame::DoUpdateTotalReligionTechCost()6838{6839 TechTypes ePrereqTech = GetReligionTech();68406841 // If it's been removed, then we're done here6842 if(ePrereqTech == NO_TECH)6843 {6844 m_iTotalReligionTechCost = -1;6845 return;6846 }68476848 if(ePrereqTech != NO_TECH)6849 {6850 m_iTotalReligionTechCost = GetResearchLeftToTech(NO_TEAM, ePrereqTech);6851 }6852}