CvLuaCity::lGetSellBuildingRefund(lua_State *)
- Defined in
- Lua/CvLuaCity.cpp, line 4033
- Class
- CvLuaCity
- Hook name
CivHooks::CvLuaCity_lGetSellBuildingRefund
Hooks
static bool BeforeCvLuaCity_lGetSellBuildingRefund(lua_State* L, int& result);static void AfterCvLuaCity_lGetSellBuildingRefund(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetSellBuildingRefund(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetSellBuildingRefund>(host, &BeforeCvLuaCity_lGetSellBuildingRefund);CivRegisterAfter<CivHooks::CvLuaCity_lGetSellBuildingRefund>(host, &AfterCvLuaCity_lGetSellBuildingRefund);CivRegisterReplace<CivHooks::CvLuaCity_lGetSellBuildingRefund>(host, &ReplaceCvLuaCity_lGetSellBuildingRefund);
Code
4032//int GetSellBuildingRefund(BuildingTypes iIndex);4033int CvLuaCity::lGetSellBuildingRefund(lua_State* L)4034{4035 CvCity* pkCity = GetInstance(L);4036 const BuildingTypes iIndex = toValue<BuildingTypes>(L, 2);4037 if(iIndex != NO_BUILDING)4038 {4039 const int iResult = pkCity->GetCityBuildings()->GetSellBuildingRefund(iIndex);4040 lua_pushinteger(L, iResult);4041 }4042 else4043 {4044 lua_pushinteger(L, 0);4045 }4046 return 1;4047}
Calls
- CvCity::GetCityBuildings() const
- CvCityBuildings::GetSellBuildingRefund(BuildingTypes) const
CvLuaArgs::toValueCvLuaScopedInstance::GetInstancelua_pushinteger