Hooks
static bool BeforeCvDllPlayer_AddNotification(CvDllPlayer* self, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData, int& result);static void AfterCvDllPlayer_AddNotification(CvDllPlayer* self, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData, int& result);static int ReplaceCvDllPlayer_AddNotification(int (*original)(CvDllPlayer*, NotificationTypes, const char*, const char*, int, int, int, int), CvDllPlayer* self, NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_AddNotification::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllPlayer_AddNotification);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_AddNotification::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllPlayer_AddNotification);host->RegisterHook(host->pluginIndex, CivHooks::CvDllPlayer_AddNotification::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllPlayer_AddNotification);
Code
420int CvDllPlayer::AddNotification(NotificationTypes eNotificationType, const char* strMessage, const char* strSummary, int iX, int iY, int iGameDataIndex, int iExtraGameData)421{422 return m_pPlayer->GetNotifications()->Add(eNotificationType, strMessage, strSummary, iX, iY, iGameDataIndex, iExtraGameData);423}