CvPreGame::setEra(const CvString &)
- Defined in
- CvPreGame.cpp, line 2451
- Hook name
CivHooks::CvPreGame_setEra_with_const_CvString
Hooks
static bool BeforeCvPreGame_setEra_with_const_CvString(const CvString& e);static void AfterCvPreGame_setEra_with_const_CvString(const CvString& e);static void ReplaceCvPreGame_setEra_with_const_CvString(void (*original)(const CvString&), const CvString& e);CivRegisterBefore<CivHooks::CvPreGame_setEra_with_const_CvString>(host, &BeforeCvPreGame_setEra_with_const_CvString);CivRegisterAfter<CivHooks::CvPreGame_setEra_with_const_CvString>(host, &AfterCvPreGame_setEra_with_const_CvString);CivRegisterReplace<CivHooks::CvPreGame_setEra_with_const_CvString>(host, &ReplaceCvPreGame_setEra_with_const_CvString);
Code
2451void setEra(const CvString& e)2452{2453 for(int i = 0; i < GC.getNumEraInfos(); i++)2454 {2455 const EraTypes eEra = static_cast<EraTypes>(i);2456 CvEraInfo* pkEraInfo = GC.getEraInfo(eEra);2457 if(pkEraInfo)2458 {2459 if(_stricmp(e.c_str(), pkEraInfo->GetType()) == 0)2460 {2461 setEra(eEra);2462 }2463 }24642465 }2466}
Calls
_stricmp- CvBaseInfo::GetType() const
- CvGlobals::getEraInfo(EraTypes)
- CvGlobals::getNumEraInfos()
- CvPreGame::setEra(EraTypes)
std::basic_string::c_str