Bazaar developer reference

CvLuaCity::lCanBuyPlotAt(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 2022
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lCanBuyPlotAt

Hooks

static bool BeforeCvLuaCity_lCanBuyPlotAt(lua_State* L, int& result);static void AfterCvLuaCity_lCanBuyPlotAt(lua_State* L, int& result);static int ReplaceCvLuaCity_lCanBuyPlotAt(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lCanBuyPlotAt>(host, &BeforeCvLuaCity_lCanBuyPlotAt);CivRegisterAfter<CivHooks::CvLuaCity_lCanBuyPlotAt>(host, &AfterCvLuaCity_lCanBuyPlotAt);CivRegisterReplace<CivHooks::CvLuaCity_lCanBuyPlotAt>(host, &ReplaceCvLuaCity_lCanBuyPlotAt);

Code

2021//bool getCanBuyPlotAt();2022int CvLuaCity::lCanBuyPlotAt(lua_State* L)2023{2024	CvCity* pkCity = GetInstance(L);2025	const int iX = lua_tointeger(L, 2);2026	const int iY = lua_tointeger(L, 3);2027	const bool bIgnoreCost = lua_toboolean(L, 4);2028	lua_pushboolean(L, pkCity->CanBuyPlot(iX, iY, bIgnoreCost));2029	return 1;2030}

Calls

Called by