Bazaar developer reference

CvLuaUnit::lCanFortify(lua_State *)

Defined in
Lua/CvLuaUnit.cpp, line 1063
Class
CvLuaUnit
Hook name
CivHooks::CvLuaUnit_lCanFortify

Hooks

static bool BeforeCvLuaUnit_lCanFortify(lua_State* L, int& result);static void AfterCvLuaUnit_lCanFortify(lua_State* L, int& result);static int ReplaceCvLuaUnit_lCanFortify(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lCanFortify>(host, &BeforeCvLuaUnit_lCanFortify);CivRegisterAfter<CivHooks::CvLuaUnit_lCanFortify>(host, &AfterCvLuaUnit_lCanFortify);CivRegisterReplace<CivHooks::CvLuaUnit_lCanFortify>(host, &ReplaceCvLuaUnit_lCanFortify);

Code

1062//bool canFortify(CyPlot* pPlot);1063int CvLuaUnit::lCanFortify(lua_State* L)1064{1065	CvUnit* pkUnit = GetInstance(L);1066	CvPlot* pkPlot = CvLuaPlot::GetInstance(L, 2);1067	const bool bResult = pkUnit->canFortify(pkPlot);10681069	lua_pushboolean(L, bResult);1070	return 1;1071}

Calls

Called by