Bazaar developer reference

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

Defined in
CvMinorCivAI.cpp, line 3197
Class
CvMinorCivAI
Hook name
CivHooks::CvMinorCivAI_AddBuyoutNotification

Hooks

static bool BeforeCvMinorCivAI_AddBuyoutNotification(CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);static void AfterCvMinorCivAI_AddBuyoutNotification(CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);static void ReplaceCvMinorCivAI_AddBuyoutNotification(void (*original)(CvMinorCivAI*, CvString, CvString, PlayerTypes, int, int), CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);CivRegisterBefore<CivHooks::CvMinorCivAI_AddBuyoutNotification>(host, &BeforeCvMinorCivAI_AddBuyoutNotification);CivRegisterAfter<CivHooks::CvMinorCivAI_AddBuyoutNotification>(host, &AfterCvMinorCivAI_AddBuyoutNotification);CivRegisterReplace<CivHooks::CvMinorCivAI_AddBuyoutNotification>(host, &ReplaceCvMinorCivAI_AddBuyoutNotification);

Code

3196/// Buyout notifications3197void CvMinorCivAI::AddBuyoutNotification(CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY)3198{3199	if(iX == -1 && iY == -1)3200	{3201		CvCity* capCity = GetPlayer()->getCapitalCity();32023203		if(capCity != NULL)3204		{3205			iX = capCity->getX();3206			iY = capCity->getY();3207		}3208	}32093210	CvNotifications* pNotifications = GET_PLAYER(ePlayer).GetNotifications();3211	if(pNotifications)3212	{3213		pNotifications->Add(NOTIFICATION_MINOR_BUYOUT, sString, sSummaryString, iX, iY, GetPlayer()->GetID());3214	}3215}

Calls

Called by