Hooks
static bool BeforeCvLuaLeague_lCanProposeEnact(lua_State* L, int& result);static void AfterCvLuaLeague_lCanProposeEnact(lua_State* L, int& result);static int ReplaceCvLuaLeague_lCanProposeEnact(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaLeague_lCanProposeEnact>(host, &BeforeCvLuaLeague_lCanProposeEnact);CivRegisterAfter<CivHooks::CvLuaLeague_lCanProposeEnact>(host, &AfterCvLuaLeague_lCanProposeEnact);CivRegisterReplace<CivHooks::CvLuaLeague_lCanProposeEnact>(host, &ReplaceCvLuaLeague_lCanProposeEnact);
Code
203//bool CanProposeEnact(ResolutionTypes eResolution, PlayerTypes eProposer, int iChoice);204int CvLuaLeague::lCanProposeEnact(lua_State* L)205{206 CvLeague* pLeague = GetInstance(L);207 const ResolutionTypes eResolution = (ResolutionTypes) lua_tointeger(L, 2);208 const PlayerTypes eProposer = (PlayerTypes) lua_tointeger(L, 3);209 const int iChoice = lua_tointeger(L, 4);210211 const bool bValue = pLeague->CanProposeEnact(eResolution, eProposer, iChoice);212 lua_pushboolean(L, bValue);213 return 1;214}