Bazaar developer reference

CvDllDealAI::DoEqualizeDealWithHuman(ICvDeal1 *, PlayerTypes, bool, bool, bool &, bool &)

Defined in
CvDllDealAI.cpp, line 115
Class
CvDllDealAI
Hook name
CivHooks::CvDllDealAI_DoEqualizeDealWithHuman

Hooks

static bool BeforeCvDllDealAI_DoEqualizeDealWithHuman(CvDllDealAI* self, ICvDeal1* pDeal, PlayerTypes eOtherPlayer, bool bDontChangeMyExistingItems, bool bDontChangeTheirExistingItems, bool& bDealGoodToBeginWith, bool& bCantMatchOffer, bool& result);static void AfterCvDllDealAI_DoEqualizeDealWithHuman(CvDllDealAI* self, ICvDeal1* pDeal, PlayerTypes eOtherPlayer, bool bDontChangeMyExistingItems, bool bDontChangeTheirExistingItems, bool& bDealGoodToBeginWith, bool& bCantMatchOffer, bool& result);static bool ReplaceCvDllDealAI_DoEqualizeDealWithHuman(bool (*original)(CvDllDealAI*, ICvDeal1*, PlayerTypes, bool, bool, bool&, bool&), CvDllDealAI* self, ICvDeal1* pDeal, PlayerTypes eOtherPlayer, bool bDontChangeMyExistingItems, bool bDontChangeTheirExistingItems, bool& bDealGoodToBeginWith, bool& bCantMatchOffer);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllDealAI_DoEqualizeDealWithHuman::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllDealAI_DoEqualizeDealWithHuman);host->RegisterHook(host->pluginIndex, CivHooks::CvDllDealAI_DoEqualizeDealWithHuman::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllDealAI_DoEqualizeDealWithHuman);host->RegisterHook(host->pluginIndex, CivHooks::CvDllDealAI_DoEqualizeDealWithHuman::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllDealAI_DoEqualizeDealWithHuman);

Code

115bool CvDllDealAI::DoEqualizeDealWithHuman(ICvDeal1* pDeal, PlayerTypes eOtherPlayer, bool bDontChangeMyExistingItems, bool bDontChangeTheirExistingItems, bool& bDealGoodToBeginWith, bool& bCantMatchOffer)116{117	CvDeal* pkDeal = (NULL != pDeal)? static_cast<CvDllDeal*>(pDeal)->GetInstance() : NULL;118	return m_pDealAI->DoEqualizeDealWithHuman(pkDeal, eOtherPlayer, bDontChangeMyExistingItems, bDontChangeTheirExistingItems, bDealGoodToBeginWith, bCantMatchOffer);119}

Calls