Bazaar developer reference

CvLuaPlot::lGetOwner(lua_State *)

Defined in
Lua/CvLuaPlot.cpp, line 1345
Class
CvLuaPlot
Hook name
CivHooks::CvLuaPlot_lGetOwner

Hooks

static bool BeforeCvLuaPlot_lGetOwner(lua_State* L, int& result);static void AfterCvLuaPlot_lGetOwner(lua_State* L, int& result);static int ReplaceCvLuaPlot_lGetOwner(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlot_lGetOwner>(host, &BeforeCvLuaPlot_lGetOwner);CivRegisterAfter<CivHooks::CvLuaPlot_lGetOwner>(host, &AfterCvLuaPlot_lGetOwner);CivRegisterReplace<CivHooks::CvLuaPlot_lGetOwner>(host, &ReplaceCvLuaPlot_lGetOwner);

Code

1344//PlayerTypes getOwner();1345int CvLuaPlot::lGetOwner(lua_State* L)1346{1347#if defined(MOD_API_LUA_EXTENSIONS)1348	CvPlot* pkPlot = GetInstance(L);1349	const int iPlayer  = pkPlot->getOwner();1350	const int iCity = pkPlot->GetCityPurchaseID();13511352	lua_pushinteger(L, iPlayer);1353	lua_pushinteger(L, iCity);1354	return 2;1355#else1356	return BasicLuaMethod(L, &CvPlot::getOwner);1357#endif1358}

Calls

Called by