Hooks
static bool BeforeCvLuaGame_lCityPushOrder(lua_State* L, int& result);static void AfterCvLuaGame_lCityPushOrder(lua_State* L, int& result);static int ReplaceCvLuaGame_lCityPushOrder(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lCityPushOrder>(host, &BeforeCvLuaGame_lCityPushOrder);CivRegisterAfter<CivHooks::CvLuaGame_lCityPushOrder>(host, &AfterCvLuaGame_lCityPushOrder);CivRegisterReplace<CivHooks::CvLuaGame_lCityPushOrder>(host, &ReplaceCvLuaGame_lCityPushOrder);
Code
549// void cityPushOrder(CyCity* pCity, OrderTypes eOrder, int iData, bool bAlt, bool bShift, bool bCtrl);550int CvLuaGame::lCityPushOrder(lua_State* L)551{552 CvCity* pkCity = CvLuaCity::GetInstance(L, 1);553 const OrderTypes eOrder = (OrderTypes)lua_tointeger(L, 2);554 const int iData = lua_tointeger(L, 3);555 const bool bAlt = luaL_optbool(L, 4, 0);556 const bool bShift = luaL_optbool(L, 5, 0);557 const bool bCtrl = luaL_optbool(L, 6, 0);558559 GetInstance()->cityPushOrder(pkCity, eOrder, iData, bAlt, bShift, bCtrl);560 return 0;561}