Bazaar developer reference

CvLuaGame::lGetFaithCost(lua_State *)

Defined in
Lua/CvLuaGame.cpp, line 1312
Class
CvLuaGame
Hook name
CivHooks::CvLuaGame_lGetFaithCost

Hooks

static bool BeforeCvLuaGame_lGetFaithCost(lua_State* L, int& result);static void AfterCvLuaGame_lGetFaithCost(lua_State* L, int& result);static int ReplaceCvLuaGame_lGetFaithCost(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lGetFaithCost>(host, &BeforeCvLuaGame_lGetFaithCost);CivRegisterAfter<CivHooks::CvLuaGame_lGetFaithCost>(host, &AfterCvLuaGame_lGetFaithCost);CivRegisterReplace<CivHooks::CvLuaGame_lGetFaithCost>(host, &ReplaceCvLuaGame_lGetFaithCost);

Code

1311//int GetFaithCost();1312int CvLuaGame::lGetFaithCost(lua_State* L)1313{1314	const UnitTypes eUnit = (UnitTypes) lua_tointeger(L, 1);1315	CvUnitEntry* pkUnitInfo = GC.getUnitInfo(eUnit);1316	const int iResult = GC.getGame().GetFaithCost(pkUnitInfo);1317	lua_pushinteger(L, iResult);1318	return 1;1319}

Calls

Called by