Bazaar developer reference

CvDllScriptSystemUtility::GetCvCityInstance(lua_State *, int, bool)

Defined in
CvDllScriptSystemUtility.cpp, line 79
Class
CvDllScriptSystemUtility
Hook name
CivHooks::CvDllScriptSystemUtility_GetCvCityInstance

Hooks

static bool BeforeCvDllScriptSystemUtility_GetCvCityInstance(CvDllScriptSystemUtility* self, lua_State* L, int index, bool bErrorOnFail, ICvCity1*& result);static void AfterCvDllScriptSystemUtility_GetCvCityInstance(CvDllScriptSystemUtility* self, lua_State* L, int index, bool bErrorOnFail, ICvCity1*& result);static ICvCity1* ReplaceCvDllScriptSystemUtility_GetCvCityInstance(ICvCity1* (*original)(CvDllScriptSystemUtility*, lua_State*, int, bool), CvDllScriptSystemUtility* self, lua_State* L, int index, bool bErrorOnFail);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllScriptSystemUtility_GetCvCityInstance::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllScriptSystemUtility_GetCvCityInstance);host->RegisterHook(host->pluginIndex, CivHooks::CvDllScriptSystemUtility_GetCvCityInstance::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllScriptSystemUtility_GetCvCityInstance);host->RegisterHook(host->pluginIndex, CivHooks::CvDllScriptSystemUtility_GetCvCityInstance::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllScriptSystemUtility_GetCvCityInstance);

Code

79ICvCity1* CvDllScriptSystemUtility::GetCvCityInstance(lua_State* L, int index, bool bErrorOnFail)80{81	CvCity* pkCity = CvLuaCity::GetInstance(L, index, bErrorOnFail);82	return (NULL != pkCity)? new CvDllCity(pkCity) : NULL;83}

Calls