Bazaar developer reference

CvLuaCity::lDoTask(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 655
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lDoTask

Hooks

static bool BeforeCvLuaCity_lDoTask(lua_State* L, int& result);static void AfterCvLuaCity_lDoTask(lua_State* L, int& result);static int ReplaceCvLuaCity_lDoTask(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lDoTask>(host, &BeforeCvLuaCity_lDoTask);CivRegisterAfter<CivHooks::CvLuaCity_lDoTask>(host, &AfterCvLuaCity_lDoTask);CivRegisterReplace<CivHooks::CvLuaCity_lDoTask>(host, &ReplaceCvLuaCity_lDoTask);

Code

654//void doTask(TaskTypes eTask, int iData1, int iData2, bool bOption);655int CvLuaCity::lDoTask(lua_State* L)656{657	CvCity* pkCity = GetInstance(L);658	const TaskTypes eTask = (TaskTypes)lua_tointeger(L, 2);659	const int iData1 = luaL_optint(L, 3, -1);660	const int iData2 = luaL_optint(L, 4, -1);661	const bool bOption = luaL_optint(L, 5, 0);662	pkCity->doTask(eTask, iData1, iData2, bOption);663664	return 1;665}

Calls

Called by