Bazaar developer reference

CvDllDealAI::DoAcceptedDeal(PlayerTypes, ICvDeal1 *, int, int, int)

Defined in
CvDllDealAI.cpp, line 95
Class
CvDllDealAI
Hook name
CivHooks::CvDllDealAI_DoAcceptedDeal

Hooks

static bool BeforeCvDllDealAI_DoAcceptedDeal(CvDllDealAI* self, PlayerTypes eFromPlayer, ICvDeal1* pDeal, int iDealValueToMe, int iValueImOffering, int iValueTheyreOffering);static void AfterCvDllDealAI_DoAcceptedDeal(CvDllDealAI* self, PlayerTypes eFromPlayer, ICvDeal1* pDeal, int iDealValueToMe, int iValueImOffering, int iValueTheyreOffering);static void ReplaceCvDllDealAI_DoAcceptedDeal(void (*original)(CvDllDealAI*, PlayerTypes, ICvDeal1*, int, int, int), CvDllDealAI* self, PlayerTypes eFromPlayer, ICvDeal1* pDeal, int iDealValueToMe, int iValueImOffering, int iValueTheyreOffering);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllDealAI_DoAcceptedDeal::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllDealAI_DoAcceptedDeal);host->RegisterHook(host->pluginIndex, CivHooks::CvDllDealAI_DoAcceptedDeal::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllDealAI_DoAcceptedDeal);host->RegisterHook(host->pluginIndex, CivHooks::CvDllDealAI_DoAcceptedDeal::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllDealAI_DoAcceptedDeal);

Code

95void CvDllDealAI::DoAcceptedDeal(PlayerTypes eFromPlayer, ICvDeal1* pDeal, int iDealValueToMe, int iValueImOffering, int iValueTheyreOffering)96{97	CvDeal* pkDeal = (NULL != pDeal)? static_cast<CvDllDeal*>(pDeal)->GetInstance() : NULL;98	if(pkDeal != NULL)99		m_pDealAI->DoAcceptedDeal(eFromPlayer, *pkDeal, iDealValueToMe, iValueImOffering, iValueTheyreOffering);100}

Calls