Bazaar developer reference

CvDllGameContext::GetNetInitInfo(unsigned int)

Defined in
CvDllContext.cpp, line 1181
Class
CvDllGameContext
Hook name
CivHooks::CvDllGameContext_GetNetInitInfo

Hooks

static bool BeforeCvDllGameContext_GetNetInitInfo(CvDllGameContext* self, unsigned int index, ICvNetInitInfo1*& result);static void AfterCvDllGameContext_GetNetInitInfo(CvDllGameContext* self, unsigned int index, ICvNetInitInfo1*& result);static ICvNetInitInfo1* ReplaceCvDllGameContext_GetNetInitInfo(ICvNetInitInfo1* (*original)(CvDllGameContext*, unsigned int), CvDllGameContext* self, unsigned int index);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllGameContext_GetNetInitInfo::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllGameContext_GetNetInitInfo);host->RegisterHook(host->pluginIndex, CivHooks::CvDllGameContext_GetNetInitInfo::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllGameContext_GetNetInitInfo);host->RegisterHook(host->pluginIndex, CivHooks::CvDllGameContext_GetNetInitInfo::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllGameContext_GetNetInitInfo);

Code

1181ICvNetInitInfo1* CvDllGameContext::GetNetInitInfo(unsigned int index)1182{1183	for(std::vector<std::pair<uint, CvDllNetInitInfo*> >::iterator it = m_NetInitInfos.begin();1184	        it != m_NetInitInfos.end(); ++it)1185	{1186		if((*it).first == index)1187		{1188			(*it).second->IncrementReference();1189			return (*it).second;1190		}1191	}11921193	return NULL;1194}

Calls