Bazaar developer reference

CvLuaCity::lHasSpy(lua_State *)

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

Code

4246int CvLuaCity::lHasSpy(lua_State* L)4247{4248	bool bResult = false;4249	CvCity* pkCity = GetInstance(L);4250	const PlayerTypes iPlayer = toValue<PlayerTypes>(L, 2);4251	if(iPlayer != NO_PLAYER)4252	{4253		int iSpyIndex = pkCity->GetCityEspionage()->m_aiSpyAssignment[iPlayer];4254		bResult = (iSpyIndex != -1 && !GET_PLAYER(iPlayer).GetEspionage()->IsDiplomat(iSpyIndex));4255	}4256	lua_pushboolean(L, bResult);4257	return 1;4258}

Calls

Called by