CvLeague::NotifyProjectComplete(LeagueProjectTypes)
- Defined in
- CvVotingClasses.cpp, line 6044
- Class
- CvLeague
- Hook name
CivHooks::CvLeague_NotifyProjectComplete
Hooks
static bool BeforeCvLeague_NotifyProjectComplete(CvLeague* self, LeagueProjectTypes eProject);static void AfterCvLeague_NotifyProjectComplete(CvLeague* self, LeagueProjectTypes eProject);static void ReplaceCvLeague_NotifyProjectComplete(void (*original)(CvLeague*, LeagueProjectTypes), CvLeague* self, LeagueProjectTypes eProject);CivRegisterBefore<CivHooks::CvLeague_NotifyProjectComplete>(host, &BeforeCvLeague_NotifyProjectComplete);CivRegisterAfter<CivHooks::CvLeague_NotifyProjectComplete>(host, &AfterCvLeague_NotifyProjectComplete);CivRegisterReplace<CivHooks::CvLeague_NotifyProjectComplete>(host, &ReplaceCvLeague_NotifyProjectComplete);
Code
6044void CvLeague::NotifyProjectComplete(LeagueProjectTypes eProject)6045{6046 CvLeagueProjectEntry* pInfo = GC.getLeagueProjectInfo(eProject);6047 CvAssertMsg(pInfo, "Could not find League Project info when sending out a progress update. Please send Anton your save file and version.");6048 if (pInfo)6049 {6050 for (MemberList::iterator it = m_vMembers.begin(); it != m_vMembers.end(); ++it)6051 {6052 PlayerTypes eMember = it->ePlayer;6053 CvPlayer& kPlayer = GET_PLAYER(eMember);6054 if (kPlayer.isHuman())6055 {6056 if (kPlayer.isLocalPlayer() && !kPlayer.isObserver())6057 {6058 CvNotifications* pNotifications = kPlayer.GetNotifications();6059 if (pNotifications)6060 {6061 Localization::String sSummary = Localization::Lookup("TXT_KEY_NOTIFICATION_LEAGUE_PROJECT_COMPLETE");6062 sSummary << pInfo->GetDescriptionKey();60636064 Localization::String sMessage = Localization::Lookup("TXT_KEY_NOTIFICATION_LEAGUE_PROJECT_COMPLETE_TT");6065 sMessage << pInfo->GetDescriptionKey();60666067 pNotifications->Add((NotificationTypes)FString::Hash("NOTIFICATION_LEAGUE_PROJECT_COMPLETE"), sMessage.toUTF8(), sSummary.toUTF8(), -1, -1, GetID(), eProject);6068 }6069 }6070 }6071 }6072 }6073}
Calls
BaseVector::beginBaseVector::end- CvBaseInfo::GetDescriptionKey() const
- CvGlobals::getLeagueProjectInfo(LeagueProjectTypes)
- CvLeague::GetID() const
- CvNotifications::Add(NotificationTypes, const char *, const char *, int, int, int, int)
- CvPlayer::GetNotifications() const
- CvPlayer::isHuman() const
- CvPlayer::isLocalPlayer() const
- CvPlayer::isObserver() const
- CvPlayerAI::getPlayer(PlayerTypes)
FStringA::HashLocalization::LookupLocalization::String::toUTF8operator<<