Bazaar developer reference

CvLuaCity::lCanBuyPlot(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 2012
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lCanBuyPlot

Hooks

static bool BeforeCvLuaCity_lCanBuyPlot(lua_State* L, int& result);static void AfterCvLuaCity_lCanBuyPlot(lua_State* L, int& result);static int ReplaceCvLuaCity_lCanBuyPlot(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lCanBuyPlot>(host, &BeforeCvLuaCity_lCanBuyPlot);CivRegisterAfter<CivHooks::CvLuaCity_lCanBuyPlot>(host, &AfterCvLuaCity_lCanBuyPlot);CivRegisterReplace<CivHooks::CvLuaCity_lCanBuyPlot>(host, &ReplaceCvLuaCity_lCanBuyPlot);

Code

2011//bool getCanBuyPlot();2012int CvLuaCity::lCanBuyPlot(lua_State* L)2013{2014	CvCity* pkCity = GetInstance(L);2015	CvPlot* pPlot = pkCity->GetNextBuyablePlot();2016	lua_pushboolean(L, pkCity->CanBuyPlot(pPlot->getX(), pPlot->getY()));2017	return 1;2018}

Calls

Called by