Bazaar developer reference

CvGame::getMapRandNum(int, const char *)

Defined in
CvGame.cpp, line 9236
Class
CvGame
Hook name
CivHooks::CvGame_getMapRandNum

Hooks

static bool BeforeCvGame_getMapRandNum(CvGame* self, int iNum, const char* pszLog, int& result);static void AfterCvGame_getMapRandNum(CvGame* self, int iNum, const char* pszLog, int& result);static int ReplaceCvGame_getMapRandNum(int (*original)(CvGame*, int, const char*), CvGame* self, int iNum, const char* pszLog);CivRegisterBefore<CivHooks::CvGame_getMapRandNum>(host, &BeforeCvGame_getMapRandNum);CivRegisterAfter<CivHooks::CvGame_getMapRandNum>(host, &AfterCvGame_getMapRandNum);CivRegisterReplace<CivHooks::CvGame_getMapRandNum>(host, &ReplaceCvGame_getMapRandNum);

Code

9236int CvGame::getMapRandNum(int iNum, const char* pszLog)9237{9238#if defined(MOD_BUGFIX_RANDOM)9239	if (iNum > 0)9240		return m_mapRand.get(iNum, pszLog);92419242	return -(int)m_mapRand.get(-iNum, pszLog);9243#else9244	return m_mapRand.get(iNum, pszLog);9245#endif9246}

Calls

Called by