Bazaar developer reference

CvLuaCity::lGetSecondaryReligion(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 2600
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lGetSecondaryReligion

Hooks

static bool BeforeCvLuaCity_lGetSecondaryReligion(lua_State* L, int& result);static void AfterCvLuaCity_lGetSecondaryReligion(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetSecondaryReligion(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetSecondaryReligion>(host, &BeforeCvLuaCity_lGetSecondaryReligion);CivRegisterAfter<CivHooks::CvLuaCity_lGetSecondaryReligion>(host, &AfterCvLuaCity_lGetSecondaryReligion);CivRegisterReplace<CivHooks::CvLuaCity_lGetSecondaryReligion>(host, &ReplaceCvLuaCity_lGetSecondaryReligion);

Code

2599//int GetSecondaryReligion() const;2600int CvLuaCity::lGetSecondaryReligion(lua_State* L)2601{2602	CvCity* pkCity = GetInstance(L);2603	const int iResult = (int)pkCity->GetCityReligions()->GetSecondaryReligion();2604	lua_pushinteger(L, iResult);2605	return 1;2606}

Calls

Called by