CvLeague::GetLeagueSplashDescription(LeagueSpecialSessionTypes, bool)
- Defined in
- CvVotingClasses.cpp, line 5090
- Class
- CvLeague
- Hook name
CivHooks::CvLeague_GetLeagueSplashDescription
Hooks
static bool BeforeCvLeague_GetLeagueSplashDescription(CvLeague* self, LeagueSpecialSessionTypes eGoverningSpecialSession, bool bJustFounded, CvString& result);static void AfterCvLeague_GetLeagueSplashDescription(CvLeague* self, LeagueSpecialSessionTypes eGoverningSpecialSession, bool bJustFounded, CvString& result);static CvString ReplaceCvLeague_GetLeagueSplashDescription(CvString (*original)(CvLeague*, LeagueSpecialSessionTypes, bool), CvLeague* self, LeagueSpecialSessionTypes eGoverningSpecialSession, bool bJustFounded);CivRegisterBefore<CivHooks::CvLeague_GetLeagueSplashDescription>(host, &BeforeCvLeague_GetLeagueSplashDescription);CivRegisterAfter<CivHooks::CvLeague_GetLeagueSplashDescription>(host, &AfterCvLeague_GetLeagueSplashDescription);CivRegisterReplace<CivHooks::CvLeague_GetLeagueSplashDescription>(host, &ReplaceCvLeague_GetLeagueSplashDescription);
Code
5090CvString CvLeague::GetLeagueSplashDescription(LeagueSpecialSessionTypes eGoverningSpecialSession, bool bJustFounded)5091{5092 CvString s = "";5093 CvLeagueSpecialSessionEntry* pInfo = GC.getLeagueSpecialSessionInfo(eGoverningSpecialSession);5094 5095 if (!bJustFounded && pInfo != NULL)5096 {5097 EraTypes eEra = pInfo->GetEraTrigger();5098 CvEraInfo* pEraInfo = GC.getEraInfo(eEra);5099 CvAssert(pEraInfo != NULL);5100 if (pEraInfo != NULL)5101 {5102 Localization::String sTemp = Localization::Lookup("TXT_KEY_LEAGUE_SPLASH_MESSAGE_GAME_ERA");5103 sTemp << pEraInfo->GetDescriptionKey();5104 s += sTemp.toUTF8();5105 s += "[NEWLINE][NEWLINE]";5106 }5107 5108 s += Localization::Lookup(pInfo->GetHelp()).toUTF8();5109 }5110 else5111 {5112 Localization::String sTemp = Localization::Lookup("TXT_KEY_LEAGUE_SPLASH_MESSAGE_FOUNDED");5113 CvAssert(HasHostMember());5114 if (!HasHostMember())5115 {5116 sTemp << "Nobody";5117 }5118 else5119 {5120 sTemp << GET_PLAYER(GetHostMember()).getCivilizationShortDescriptionKey();5121 }5122 sTemp << GetName() << GetTurnsUntilSession();5123 s += sTemp.toUTF8();5124 }51255126 return s;5127}
Calls
- CvBaseInfo::GetDescriptionKey() const
- CvBaseInfo::GetHelp() const
- CvGlobals::getEraInfo(EraTypes)
- CvGlobals::getLeagueSpecialSessionInfo(LeagueSpecialSessionTypes)
- CvLeague::GetHostMember() const
- CvLeague::GetName()
- CvLeague::GetTurnsUntilSession() const
- CvLeague::HasHostMember() const
- CvLeagueSpecialSessionEntry::GetEraTrigger() const
- CvPlayer::getCivilizationShortDescriptionKey() const
- CvPlayerAI::getPlayer(PlayerTypes)
CvString::CvStringCvString::CvStringLocalization::LookupLocalization::String::toUTF8operator<<operator<<operator<<operator<<std::basic_string::operator+=