CvLuaGame::lGetActiveLeague(lua_State *)
- Defined in
- Lua/CvLuaGame.cpp, line 2719
- Class
- CvLuaGame
- Hook name
CivHooks::CvLuaGame_lGetActiveLeague
Hooks
static bool BeforeCvLuaGame_lGetActiveLeague(lua_State* L, int& result);static void AfterCvLuaGame_lGetActiveLeague(lua_State* L, int& result);static int ReplaceCvLuaGame_lGetActiveLeague(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lGetActiveLeague>(host, &BeforeCvLuaGame_lGetActiveLeague);CivRegisterAfter<CivHooks::CvLuaGame_lGetActiveLeague>(host, &AfterCvLuaGame_lGetActiveLeague);CivRegisterReplace<CivHooks::CvLuaGame_lGetActiveLeague>(host, &ReplaceCvLuaGame_lGetActiveLeague);
Code
2719int CvLuaGame::lGetActiveLeague(lua_State* L)2720{2721 CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetActiveLeague();2722 if (pLeague != NULL)2723 {2724 CvLuaLeague::Push(L, pLeague);2725 }2726 else2727 {2728 lua_pushnil(L);2729 }2730 return 1;2731}
Calls
- CvGame::GetGameLeagues()
- CvGameLeagues::GetActiveLeague()
- CvGlobals::getGame()
CvLuaScopedInstance::Pushlua_pushnil