Bazaar developer reference

CvLuaPlayer::lHasReligionInMostCities(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 3075
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lHasReligionInMostCities

Hooks

static bool BeforeCvLuaPlayer_lHasReligionInMostCities(lua_State* L, int& result);static void AfterCvLuaPlayer_lHasReligionInMostCities(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lHasReligionInMostCities(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lHasReligionInMostCities>(host, &BeforeCvLuaPlayer_lHasReligionInMostCities);CivRegisterAfter<CivHooks::CvLuaPlayer_lHasReligionInMostCities>(host, &AfterCvLuaPlayer_lHasReligionInMostCities);CivRegisterReplace<CivHooks::CvLuaPlayer_lHasReligionInMostCities>(host, &ReplaceCvLuaPlayer_lHasReligionInMostCities);

Code

3074// bool HasReligionInMostCities() const3075int CvLuaPlayer::lHasReligionInMostCities(lua_State* L)3076{3077	CvPlayerAI* pkPlayer = GetInstance(L);3078	ReligionTypes eReligion = (ReligionTypes)lua_tointeger(L, 2);30793080	bool bResult = pkPlayer->GetReligions()->HasReligionInMostCities(eReligion);3081	lua_pushboolean(L, bResult);30823083	return 1;3084}

Calls

Called by