Bazaar developer reference

CvDllGameContext::CreateRandomNumberGenerator()

Defined in
CvDllContext.cpp, line 1134
Class
CvDllGameContext
Hook name
CivHooks::CvDllGameContext_CreateRandomNumberGenerator

Hooks

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

Code

1134unsigned int CvDllGameContext::CreateRandomNumberGenerator()1135{1136	uint index = m_uiRngCounter++;1137	std::pair<uint, CvRandom*> entry(index, FNEW(CvRandom, c_eCiv5GameplayDLL, 0));11381139	m_RandomNumberGenerators.push_back(entry);1140	return index;1141}

Calls