Bazaar developer reference

CvMinorCivAI::AddNotification(CvString, CvString, PlayerTypes, int, int)

Defined in
CvMinorCivAI.cpp, line 3160
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_AddNotification

Hooks

static bool BeforeCvMinorCivAI_AddNotification(CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);static void AfterCvMinorCivAI_AddNotification(CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);static void ReplaceCvMinorCivAI_AddNotification(void (*original)(CvMinorCivAI*, CvString, CvString, PlayerTypes, int, int), CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);CivRegisterBefore<CivHooks::CvMinorCivAI_AddNotification>(host, &BeforeCvMinorCivAI_AddNotification);CivRegisterAfter<CivHooks::CvMinorCivAI_AddNotification>(host, &AfterCvMinorCivAI_AddNotification);CivRegisterReplace<CivHooks::CvMinorCivAI_AddNotification>(host, &ReplaceCvMinorCivAI_AddNotification);

Code

3159/// Notifications3160void CvMinorCivAI::AddNotification(CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY)3161{3162	if(iX == -1 && iY == -1)3163	{3164		CvCity* capCity = GetPlayer()->getCapitalCity();31653166		if(capCity != NULL)3167		{3168			iX = capCity->getX();3169			iY = capCity->getY();3170		}3171	}31723173	CvNotifications* pNotifications = GET_PLAYER(ePlayer).GetNotifications();3174	if(pNotifications)3175	{3176		pNotifications->Add(NOTIFICATION_MINOR, sString, sSummaryString, iX, iY, GetPlayer()->GetID());3177	}3178}

Calls

Called by