Bazaar developer reference

CvLuaCity::lHasDiplomat(lua_State *)

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

Code

4232int CvLuaCity::lHasDiplomat(lua_State* L)4233{4234	bool bResult = false;4235	CvCity* pkCity = GetInstance(L);4236	const PlayerTypes iPlayer = toValue<PlayerTypes>(L, 2);4237	if(iPlayer != NO_PLAYER && pkCity->isCapital())4238	{4239		int iSpyIndex = pkCity->GetCityEspionage()->m_aiSpyAssignment[iPlayer];4240		bResult = (iSpyIndex != -1 && GET_PLAYER(iPlayer).GetEspionage()->IsDiplomat(iSpyIndex));4241	}4242	lua_pushboolean(L, bResult);4243	return 1;4244}

Calls

Called by