CvLuaLeague::lCanVote(lua_State *)
- Defined in
- Lua/CvLuaLeague.cpp, line 428
- Class
- CvLuaLeague
- Hook name
CivHooks::CvLuaLeague_lCanVote
Hooks
static bool BeforeCvLuaLeague_lCanVote(lua_State* L, int& result);static void AfterCvLuaLeague_lCanVote(lua_State* L, int& result);static int ReplaceCvLuaLeague_lCanVote(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaLeague_lCanVote>(host, &BeforeCvLuaLeague_lCanVote);CivRegisterAfter<CivHooks::CvLuaLeague_lCanVote>(host, &AfterCvLuaLeague_lCanVote);CivRegisterReplace<CivHooks::CvLuaLeague_lCanVote>(host, &ReplaceCvLuaLeague_lCanVote);
Code
427//bool CanVote(PlayerTypes ePlayer);428int CvLuaLeague::lCanVote(lua_State* L)429{430 CvLeague* pLeague = GetInstance(L);431 const PlayerTypes ePlayer = (PlayerTypes) lua_tointeger(L, 2);432433 const bool bValue = pLeague->CanVote(ePlayer);434 lua_pushboolean(L, bValue);435 return 1;436}
Calls
- CvLeague::CanVote(PlayerTypes)
CvLuaScopedInstance::GetInstancelua_pushbooleanlua_tointeger