Bazaar developer reference

CvLuaPlayer::lGetPolicyBranchChosen(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 5158
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetPolicyBranchChosen

Hooks

static bool BeforeCvLuaPlayer_lGetPolicyBranchChosen(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetPolicyBranchChosen(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetPolicyBranchChosen(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetPolicyBranchChosen>(host, &BeforeCvLuaPlayer_lGetPolicyBranchChosen);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetPolicyBranchChosen>(host, &AfterCvLuaPlayer_lGetPolicyBranchChosen);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetPolicyBranchChosen>(host, &ReplaceCvLuaPlayer_lGetPolicyBranchChosen);

Code

5157//bool GetPolicyBranchChosen(PolicyTypes  iIndex);5158int CvLuaPlayer::lGetPolicyBranchChosen(lua_State* L)5159{5160	CvPlayerAI* pkPlayer = GetInstance(L);5161	const int iID = lua_tointeger(L, 2);51625163	const int iResult = pkPlayer->GetPlayerPolicies()->GetPolicyBranchChosen(iID);5164	lua_pushinteger(L, iResult);5165	return 1;5166}

Calls

Called by