Bazaar developer reference

CvLuaPlayer::lCanCreatePantheon(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 2960
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lCanCreatePantheon

Hooks

static bool BeforeCvLuaPlayer_lCanCreatePantheon(lua_State* L, int& result);static void AfterCvLuaPlayer_lCanCreatePantheon(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lCanCreatePantheon(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lCanCreatePantheon>(host, &BeforeCvLuaPlayer_lCanCreatePantheon);CivRegisterAfter<CivHooks::CvLuaPlayer_lCanCreatePantheon>(host, &AfterCvLuaPlayer_lCanCreatePantheon);CivRegisterReplace<CivHooks::CvLuaPlayer_lCanCreatePantheon>(host, &ReplaceCvLuaPlayer_lCanCreatePantheon);

Code

2959//bool CanCreatePantheon();2960int CvLuaPlayer::lCanCreatePantheon(lua_State* L)2961{2962	CvPlayerAI* pkPlayer = GetInstance(L);2963	bool bCheckFaith = lua_toboolean(L, 2);29642965	const bool bResult = GC.getGame().GetGameReligions()->CanCreatePantheon(pkPlayer->GetID(), bCheckFaith) == CvGameReligions::FOUNDING_OK;2966	lua_pushboolean(L, bResult);29672968	return 1;2969}

Calls

Called by