CvCityStrategyAI::ResetBestYields()
- Defined in
- CvCityStrategyAI.cpp, line 1572
- Class
- CvCityStrategyAI
- Hook name
CivHooks::CvCityStrategyAI_ResetBestYields
Hooks
static bool BeforeCvCityStrategyAI_ResetBestYields(CvCityStrategyAI* self);static void AfterCvCityStrategyAI_ResetBestYields(CvCityStrategyAI* self);static void ReplaceCvCityStrategyAI_ResetBestYields(void (*original)(CvCityStrategyAI*), CvCityStrategyAI* self);CivRegisterBefore<CivHooks::CvCityStrategyAI_ResetBestYields>(host, &BeforeCvCityStrategyAI_ResetBestYields);CivRegisterAfter<CivHooks::CvCityStrategyAI_ResetBestYields>(host, &AfterCvCityStrategyAI_ResetBestYields);CivRegisterReplace<CivHooks::CvCityStrategyAI_ResetBestYields>(host, &ReplaceCvCityStrategyAI_ResetBestYields);
Code
1572void CvCityStrategyAI::ResetBestYields()1573{1574 for(uint uiYields = 0; uiYields < NUM_YIELD_TYPES; uiYields++)1575 {1576#if defined(MOD_GLOBAL_CITY_WORKING)1577 for(uint uiPlots = 0; uiPlots < MAX_CITY_PLOTS - 1; uiPlots++)1578#else1579 for(uint uiPlots = 0; uiPlots < NUM_CITY_PLOTS - 1; uiPlots++)1580#endif1581 {1582 m_acBestYields[uiYields][uiPlots] = MAX_UNSIGNED_CHAR;1583 }15841585 m_asBestYieldAverageTimes100[uiYields] = MAX_SHORT;1586 }1587}