Hooks
static bool BeforeCvTeam_AddNotification(CvTeam* self, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData);static void AfterCvTeam_AddNotification(CvTeam* self, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData);static void ReplaceCvTeam_AddNotification(void (*original)(CvTeam*, NotificationTypes, const char*, const char*, int, int, int, int), CvTeam* self, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData);CivRegisterBefore<CivHooks::CvTeam_AddNotification>(host, &BeforeCvTeam_AddNotification);CivRegisterAfter<CivHooks::CvTeam_AddNotification>(host, &AfterCvTeam_AddNotification);CivRegisterReplace<CivHooks::CvTeam_AddNotification>(host, &ReplaceCvTeam_AddNotification);
Code
7699/// Wrapper for giving Players on this Team a notification message7700void CvTeam::AddNotification(NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData)7701{7702 PlayerTypes eLoopPlayer;77037704 for(int iI = 0; iI < MAX_MAJOR_CIVS; iI++)7705 {7706 eLoopPlayer = (PlayerTypes) iI;7707 CvPlayer& loopPlayer = GET_PLAYER(eLoopPlayer);77087709 if(!loopPlayer.isAlive())7710 continue;77117712 if(loopPlayer.getTeam() != GetID())7713 continue;77147715 if(!loopPlayer.GetNotifications())7716 continue;77177718 loopPlayer.GetNotifications()->Add(eNotificationType, strMessage, strSummary, iX, iY, iGameDataIndex, iExtraGameData);7719 }7720}