Bazaar developer reference

CvLeague::GetLeagueSplashThisEraDetails(LeagueSpecialSessionTypes, bool)

Defined in
CvVotingClasses.cpp, line 5129
Class
CvLeague
Hook name
CivHooks::CvLeague_GetLeagueSplashThisEraDetails

Hooks

static bool BeforeCvLeague_GetLeagueSplashThisEraDetails(CvLeague* self, LeagueSpecialSessionTypes eGoverningSpecialSession, bool arg1, CvString& result);static void AfterCvLeague_GetLeagueSplashThisEraDetails(CvLeague* self, LeagueSpecialSessionTypes eGoverningSpecialSession, bool arg1, CvString& result);static CvString ReplaceCvLeague_GetLeagueSplashThisEraDetails(CvString (*original)(CvLeague*, LeagueSpecialSessionTypes, bool), CvLeague* self, LeagueSpecialSessionTypes eGoverningSpecialSession, bool arg1);CivRegisterBefore<CivHooks::CvLeague_GetLeagueSplashThisEraDetails>(host, &BeforeCvLeague_GetLeagueSplashThisEraDetails);CivRegisterAfter<CivHooks::CvLeague_GetLeagueSplashThisEraDetails>(host, &AfterCvLeague_GetLeagueSplashThisEraDetails);CivRegisterReplace<CivHooks::CvLeague_GetLeagueSplashThisEraDetails>(host, &ReplaceCvLeague_GetLeagueSplashThisEraDetails);

Code

5129CvString CvLeague::GetLeagueSplashThisEraDetails(LeagueSpecialSessionTypes eGoverningSpecialSession, bool /*bJustFounded*/)5130{5131	CvString s = "";5132	CvLeagueSpecialSessionEntry* pInfo = GC.getLeagueSpecialSessionInfo(eGoverningSpecialSession);51335134	s += Localization::Lookup("TXT_KEY_LEAGUE_SPLASH_MESSAGE_THIS_ERA").toUTF8();51355136	if (pInfo != NULL)5137	{5138		s += "[NEWLINE]";5139		Localization::String sTemp = Localization::Lookup("TXT_KEY_LEAGUE_SPLASH_MESSAGE_ERA_HOST_DELEGATES");5140		sTemp << pInfo->GetHostDelegates() + pInfo->GetCivDelegates();5141		s += sTemp.toUTF8();51425143		s += "[NEWLINE]";5144		sTemp = Localization::Lookup("TXT_KEY_LEAGUE_SPLASH_MESSAGE_ERA_CIV_DELEGATES");5145		sTemp << pInfo->GetCivDelegates();5146		s += sTemp.toUTF8();51475148		s += "[NEWLINE]";5149		sTemp = Localization::Lookup("TXT_KEY_LEAGUE_SPLASH_MESSAGE_ERA_CITYSTATE_DELEGATES");5150		sTemp << pInfo->GetCityStateDelegates();5151		s += sTemp.toUTF8();51525153		if (pInfo->IsUnitedNations())5154		{5155			VictoryTypes eDiploVictory = (VictoryTypes) GC.getInfoTypeForString("VICTORY_DIPLOMATIC", true);5156			if (eDiploVictory != NO_VICTORY)5157			{5158				if (GC.getGame().isVictoryValid(eDiploVictory))5159				{5160					s += "[NEWLINE]";5161					sTemp = Localization::Lookup("TXT_KEY_LEAGUE_SPLASH_MESSAGE_ERA_DIPLO_VICTORY_POSSIBLE");5162					s += sTemp.toUTF8();5163				}5164			}5165		}5166	}5167	else5168	{5169		s += "[NEWLINE]";5170		s += Localization::Lookup("TXT_KEY_LEAGUE_SPLASH_MESSAGE_ERA_NO_CHANGE").toUTF8();5171	}51725173	return s;5174}

Calls

Called by