Bazaar developer reference

CvLuaGame::lIsUnitRecommended(lua_State *)

Defined in
Lua/CvLuaGame.cpp, line 2043
Class
CvLuaGame
Hook name
CivHooks::CvLuaGame_lIsUnitRecommended

Hooks

static bool BeforeCvLuaGame_lIsUnitRecommended(lua_State* L, int& result);static void AfterCvLuaGame_lIsUnitRecommended(lua_State* L, int& result);static int ReplaceCvLuaGame_lIsUnitRecommended(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lIsUnitRecommended>(host, &BeforeCvLuaGame_lIsUnitRecommended);CivRegisterAfter<CivHooks::CvLuaGame_lIsUnitRecommended>(host, &AfterCvLuaGame_lIsUnitRecommended);CivRegisterReplace<CivHooks::CvLuaGame_lIsUnitRecommended>(host, &ReplaceCvLuaGame_lIsUnitRecommended);

Code

2043int CvLuaGame::lIsUnitRecommended(lua_State* L)2044{2045	UnitTypes eUnit = (UnitTypes)lua_tointeger(L, 1);2046	AdvisorTypes eAdvisor = (AdvisorTypes)lua_tointeger(L, 2);2047	bool bResult = GC.getGame().GetAdvisorRecommender()->IsUnitRecommended(eUnit, eAdvisor);2048	lua_pushboolean(L, bResult);2049	return 1;2050}

Calls

Called by