CvLuaPlayer::lIsPolicyBranchBlocked(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 5099
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lIsPolicyBranchBlocked
Hooks
static bool BeforeCvLuaPlayer_lIsPolicyBranchBlocked(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsPolicyBranchBlocked(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsPolicyBranchBlocked(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsPolicyBranchBlocked>(host, &BeforeCvLuaPlayer_lIsPolicyBranchBlocked);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsPolicyBranchBlocked>(host, &AfterCvLuaPlayer_lIsPolicyBranchBlocked);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsPolicyBranchBlocked>(host, &ReplaceCvLuaPlayer_lIsPolicyBranchBlocked);
Code
5098//bool IsPolicyBranchBlocked();5099int CvLuaPlayer::lIsPolicyBranchBlocked(lua_State* L)5100{5101 CvPlayerAI* pkPlayer = GetInstance(L);5102 const PolicyBranchTypes ePolicyBranch = (PolicyBranchTypes)lua_tointeger(L, 2);51035104 const bool bResult = pkPlayer->GetPlayerPolicies()->IsPolicyBranchBlocked(ePolicyBranch);5105 lua_pushboolean(L, bResult);5106 return 1;5107}
Calls
CvLuaScopedInstance::GetInstance- CvPlayer::GetPlayerPolicies() const
- CvPlayerPolicies::IsPolicyBranchBlocked(PolicyBranchTypes) const
lua_pushbooleanlua_tointeger