Bazaar developer reference

CvLuaPlayer::lGetNumPolicyBranchesAllowed(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 5147
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetNumPolicyBranchesAllowed

Hooks

static bool BeforeCvLuaPlayer_lGetNumPolicyBranchesAllowed(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetNumPolicyBranchesAllowed(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetNumPolicyBranchesAllowed(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetNumPolicyBranchesAllowed>(host, &BeforeCvLuaPlayer_lGetNumPolicyBranchesAllowed);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetNumPolicyBranchesAllowed>(host, &AfterCvLuaPlayer_lGetNumPolicyBranchesAllowed);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetNumPolicyBranchesAllowed>(host, &ReplaceCvLuaPlayer_lGetNumPolicyBranchesAllowed);

Code

5146//int GetNumPolicyBranchesAllowed();5147int CvLuaPlayer::lGetNumPolicyBranchesAllowed(lua_State* L)5148{5149	CvPlayerAI* pkPlayer = GetInstance(L);51505151	const int iResult = pkPlayer->GetPlayerPolicies()->GetNumPolicyBranchesAllowed();5152	lua_pushinteger(L, iResult);5153	return 1;5154}

Calls

Called by