CvLuaCity::lGetYieldRate(lua_State *)
- Defined in
- Lua/CvLuaCity.cpp, line 3305
- Class
- CvLuaCity
- Hook name
CivHooks::CvLuaCity_lGetYieldRate
Hooks
static bool BeforeCvLuaCity_lGetYieldRate(lua_State* L, int& result);static void AfterCvLuaCity_lGetYieldRate(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetYieldRate(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetYieldRate>(host, &BeforeCvLuaCity_lGetYieldRate);CivRegisterAfter<CivHooks::CvLuaCity_lGetYieldRate>(host, &AfterCvLuaCity_lGetYieldRate);CivRegisterReplace<CivHooks::CvLuaCity_lGetYieldRate>(host, &ReplaceCvLuaCity_lGetYieldRate);
Code
3304//int getYieldRate(YieldTypes eIndex);3305int CvLuaCity::lGetYieldRate(lua_State* L)3306{3307 CvCity* pkCity = GetInstance(L);3308 const YieldTypes eIndex = (YieldTypes)lua_tointeger(L, 2);3309 const bool bIgnoreTrade = luaL_optbool(L, 3, false);3310 const int iResult = pkCity->getYieldRate(eIndex, bIgnoreTrade);33113312 lua_pushinteger(L, iResult);3313 return 1;3314}
Calls
- CvCity::getYieldRate(YieldTypes, bool) const
CvLuaScopedInstance::GetInstancelua_pushintegerlua_tointeger- luaL_optbool(lua_State *, int, bool)