CvPreGame::setCalendar(const CvString &)
- Defined in
- CvPreGame.cpp, line 2328
- Hook name
CivHooks::CvPreGame_setCalendar_with_const_CvString
Hooks
static bool BeforeCvPreGame_setCalendar_with_const_CvString(const CvString& c);static void AfterCvPreGame_setCalendar_with_const_CvString(const CvString& c);static void ReplaceCvPreGame_setCalendar_with_const_CvString(void (*original)(const CvString&), const CvString& c);CivRegisterBefore<CivHooks::CvPreGame_setCalendar_with_const_CvString>(host, &BeforeCvPreGame_setCalendar_with_const_CvString);CivRegisterAfter<CivHooks::CvPreGame_setCalendar_with_const_CvString>(host, &AfterCvPreGame_setCalendar_with_const_CvString);CivRegisterReplace<CivHooks::CvPreGame_setCalendar_with_const_CvString>(host, &ReplaceCvPreGame_setCalendar_with_const_CvString);
Code
2328void setCalendar(const CvString& c)2329{2330 Database::SingleResult kResult;2331 if(!DB.SelectAt(kResult, "Calendars", "Type", c.c_str()))2332 {2333 CvAssertMsg(false, "Cannot find calendar info.");2334 }2335 s_calendarInfo.dirtyGet().CacheResult(kResult);23362337 s_calendar = (CalendarTypes)s_calendarInfo.get().GetID();2338}
Calls
- CvBaseInfo::CacheResult(Database::Results &)
- CvBaseInfo::GetID() const
- CvGlobals::GetGameDatabase()
Database::Connection::SelectAtDatabase::SingleResult::SingleResultFAutoVariable::dirtyGetFAutoVariable::getFAutoVariable::operator=std::basic_string::c_str