Bazaar developer reference

CvLuaCity::lGetCityPlotIndex(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 677
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lGetCityPlotIndex

Hooks

static bool BeforeCvLuaCity_lGetCityPlotIndex(lua_State* L, int& result);static void AfterCvLuaCity_lGetCityPlotIndex(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetCityPlotIndex(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetCityPlotIndex>(host, &BeforeCvLuaCity_lGetCityPlotIndex);CivRegisterAfter<CivHooks::CvLuaCity_lGetCityPlotIndex>(host, &AfterCvLuaCity_lGetCityPlotIndex);CivRegisterReplace<CivHooks::CvLuaCity_lGetCityPlotIndex>(host, &ReplaceCvLuaCity_lGetCityPlotIndex);

Code

676//int getCityPlotIndex(CyPlot* pPlot);677int CvLuaCity::lGetCityPlotIndex(lua_State* L)678{679	CvCity* pkCity = GetInstance(L);680	CvPlot* pkPlot = CvLuaPlot::GetInstance(L, 2);681	const int iResult = pkCity->GetCityCitizens()->GetCityIndexFromPlot(pkPlot);682683	lua_pushinteger(L, iResult);684	return 1;685}

Calls

Called by