Bazaar developer reference

CvLuaCity::lAddProductionExperience(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 1195
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lAddProductionExperience

Hooks

static bool BeforeCvLuaCity_lAddProductionExperience(lua_State* L, int& result);static void AfterCvLuaCity_lAddProductionExperience(lua_State* L, int& result);static int ReplaceCvLuaCity_lAddProductionExperience(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lAddProductionExperience>(host, &BeforeCvLuaCity_lAddProductionExperience);CivRegisterAfter<CivHooks::CvLuaCity_lAddProductionExperience>(host, &AfterCvLuaCity_lAddProductionExperience);CivRegisterReplace<CivHooks::CvLuaCity_lAddProductionExperience>(host, &ReplaceCvLuaCity_lAddProductionExperience);

Code

1194//void addProductionExperience(CyUnit* pUnit, bool bConscript = false);1195int CvLuaCity::lAddProductionExperience(lua_State* L)1196{1197	CvCity* pkCity = GetInstance(L);1198	CvUnit* pkUnit = CvLuaUnit::GetInstance(L, 2);1199	const bool bConscript = luaL_optint(L, 3, 0);1200	pkCity->addProductionExperience(pkUnit, bConscript);12011202	return 1;1203}

Calls

Called by