Bazaar developer reference

CvGameDeals::GetDeal(uint)

Defined in
CvDealClasses.cpp, line 4105
Class
CvGameDeals
Hook name
CivHooks::CvGameDeals_GetDeal

Hooks

static bool BeforeCvGameDeals_GetDeal(CvGameDeals* self, uint index, CvDeal*& result);static void AfterCvGameDeals_GetDeal(CvGameDeals* self, uint index, CvDeal*& result);static CvDeal* ReplaceCvGameDeals_GetDeal(CvDeal* (*original)(CvGameDeals*, uint), CvGameDeals* self, uint index);CivRegisterBefore<CivHooks::CvGameDeals_GetDeal>(host, &BeforeCvGameDeals_GetDeal);CivRegisterAfter<CivHooks::CvGameDeals_GetDeal>(host, &AfterCvGameDeals_GetDeal);CivRegisterReplace<CivHooks::CvGameDeals_GetDeal>(host, &ReplaceCvGameDeals_GetDeal);

Code

4105CvDeal* CvGameDeals::GetDeal(uint index)4106{4107	for(std::vector<std::pair<uint, CvDeal*> >::iterator it = m_Deals.begin();4108	        it != m_Deals.end(); ++it)4109	{4110		if((*it).first == index)4111			return (*it).second;4112	}41134114	return NULL;4115}

Calls

Called by