Bazaar developer reference

CvLuaPlayer::lIsPolicyBranchUnlocked(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 5111
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lIsPolicyBranchUnlocked

Hooks

static bool BeforeCvLuaPlayer_lIsPolicyBranchUnlocked(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsPolicyBranchUnlocked(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsPolicyBranchUnlocked(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsPolicyBranchUnlocked>(host, &BeforeCvLuaPlayer_lIsPolicyBranchUnlocked);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsPolicyBranchUnlocked>(host, &AfterCvLuaPlayer_lIsPolicyBranchUnlocked);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsPolicyBranchUnlocked>(host, &ReplaceCvLuaPlayer_lIsPolicyBranchUnlocked);

Code

5110//bool IsPolicyBranchUnlocked();5111int CvLuaPlayer::lIsPolicyBranchUnlocked(lua_State* L)5112{5113	CvPlayerAI* pkPlayer = GetInstance(L);5114	const PolicyBranchTypes eBranchType = (PolicyBranchTypes)lua_tointeger(L, 2);51155116	const bool bResult = pkPlayer->GetPlayerPolicies()->IsPolicyBranchUnlocked(eBranchType);5117	lua_pushboolean(L, bResult);5118	return 1;5119}

Calls

Called by