Bazaar developer reference

CvLuaPlayer::lIsPolicyBranchFinished(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 5421
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lIsPolicyBranchFinished

Hooks

static bool BeforeCvLuaPlayer_lIsPolicyBranchFinished(lua_State* L, int& result);static void AfterCvLuaPlayer_lIsPolicyBranchFinished(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lIsPolicyBranchFinished(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lIsPolicyBranchFinished>(host, &BeforeCvLuaPlayer_lIsPolicyBranchFinished);CivRegisterAfter<CivHooks::CvLuaPlayer_lIsPolicyBranchFinished>(host, &AfterCvLuaPlayer_lIsPolicyBranchFinished);CivRegisterReplace<CivHooks::CvLuaPlayer_lIsPolicyBranchFinished>(host, &ReplaceCvLuaPlayer_lIsPolicyBranchFinished);

Code

5420//int IsPolicyBranchFinished();5421int CvLuaPlayer::lIsPolicyBranchFinished(lua_State* L)5422{5423	CvPlayerAI* pkPlayer = GetInstance(L);5424	const int iID = lua_tointeger(L, 2);54255426	const bool iResult = pkPlayer->GetPlayerPolicies()->IsPolicyBranchFinished(PolicyBranchTypes(iID));5427	lua_pushboolean(L, iResult);5428	return 1;5429}

Calls

Called by