Hooks
static bool BeforeCvNotifications_AddToPlayer(PlayerTypes ePlayer, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData);static void AfterCvNotifications_AddToPlayer(PlayerTypes ePlayer, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData);static void ReplaceCvNotifications_AddToPlayer(void (*original)(PlayerTypes, NotificationTypes, const char*, const char*, int, int, int, int), PlayerTypes ePlayer, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData);CivRegisterBefore<CivHooks::CvNotifications_AddToPlayer>(host, &BeforeCvNotifications_AddToPlayer);CivRegisterAfter<CivHooks::CvNotifications_AddToPlayer>(host, &AfterCvNotifications_AddToPlayer);CivRegisterReplace<CivHooks::CvNotifications_AddToPlayer>(host, &ReplaceCvNotifications_AddToPlayer);
Code
2170// static2171void CvNotifications::AddToPlayer(PlayerTypes ePlayer, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX/*=-1*/, int iY/*=-1*/, int iGameDataIndex/*=-1*/, int iExtraGameData/*=-1*/)2172{2173 if(ePlayer != NO_PLAYER)2174 {2175 CvPlayer& kPlayer = GET_PLAYER(ePlayer);21762177 if(kPlayer.isLocalPlayer())2178 {2179 CvNotifications* pNotifications = kPlayer.GetNotifications();2180 if(pNotifications)2181 {2182 pNotifications->Add(eNotificationType, strMessage, strSummary, iX, iY, iGameDataIndex, iExtraGameData);2183 }2184 }2185 }2186}