Bazaar developer reference

CvLuaPlayer::lSwapPolicy(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 5354
Class
CvLuaPlayer
Not a hook point
member without a separate declaration

Code

5353//void SwapPolicy(PolicyTypes iNewPolicy, PolicyTypes iOldPolicy);5354int CvLuaPlayer::lSwapPolicy(lua_State* L)5355{5356	CvPlayerAI* pkPlayer = GetInstance(L);5357	const PolicyTypes iPolicyNew = (PolicyTypes)lua_tointeger(L, 2);5358	const PolicyTypes iPolicyOld = (PolicyTypes)lua_tointeger(L, 3);53595360	const bool bResult = pkPlayer->swapPolicy(iPolicyNew, iPolicyOld);5361	lua_pushboolean(L, bResult);5362	return 1;5363}

Calls

Called by