CvGameCulture::GetGreatWorkEra(int) const
- Defined in
- CvCultureClasses.cpp, line 282
- Class
- CvGameCulture
- Hook name
CivHooks::CvGameCulture_GetGreatWorkEra
Hooks
static bool BeforeCvGameCulture_GetGreatWorkEra(const CvGameCulture* self, int iIndex, CvString& result);static void AfterCvGameCulture_GetGreatWorkEra(const CvGameCulture* self, int iIndex, CvString& result);static CvString ReplaceCvGameCulture_GetGreatWorkEra(CvString (*original)(const CvGameCulture*, int), const CvGameCulture* self, int iIndex);CivRegisterBefore<CivHooks::CvGameCulture_GetGreatWorkEra>(host, &BeforeCvGameCulture_GetGreatWorkEra);CivRegisterAfter<CivHooks::CvGameCulture_GetGreatWorkEra>(host, &AfterCvGameCulture_GetGreatWorkEra);CivRegisterReplace<CivHooks::CvGameCulture_GetGreatWorkEra>(host, &ReplaceCvGameCulture_GetGreatWorkEra);
Code
281/// Returns era of this Great Work282CvString CvGameCulture::GetGreatWorkEra(int iIndex) const283{284 CvAssertMsg (iIndex < GetNumGreatWorks(), "Bad Great Work index");285 CvString szEra = "";286287 const CvGreatWork *pWork = &m_CurrentGreatWorks[iIndex];288289 CvString strYearString;290 CvGameTextMgr::setDateStr(strYearString,291 pWork->m_iTurnFounded,292 false /*bSave*/,293 GC.getGame().getCalendar(),294 GC.getGame().getStartYear(),295 GC.getGame().getGameSpeedType());296297 szEra += GC.getEraInfo(pWork->m_eEra)->GetDescription();298 szEra += " (";299 szEra += strYearString;300 szEra += ")";301302 return szEra;303}
Calls
BaseVector::operator[]- CvBaseInfo::GetDescription() const
- CvGame::getCalendar() const
- CvGame::getGameSpeedType() const
- CvGame::getStartYear() const
- CvGameTextMgr::setDateStr(CvString &, int, bool, CalendarTypes, int, GameSpeedTypes)
- CvGlobals::getEraInfo(EraTypes)
- CvGlobals::getGame()
CvString::CvStringCvString::CvStringCvString::CvStringstd::basic_string::operator+=std::basic_string::operator+=