CvLuaDeal::lRemoveByType(lua_State *)
- Defined in
- Lua/CvLuaDeal.cpp, line 92
- Class
- CvLuaDeal
- Hook name
CivHooks::CvLuaDeal_lRemoveByType
Hooks
static bool BeforeCvLuaDeal_lRemoveByType(lua_State* L, int& result);static void AfterCvLuaDeal_lRemoveByType(lua_State* L, int& result);static int ReplaceCvLuaDeal_lRemoveByType(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaDeal_lRemoveByType>(host, &BeforeCvLuaDeal_lRemoveByType);CivRegisterAfter<CivHooks::CvLuaDeal_lRemoveByType>(host, &AfterCvLuaDeal_lRemoveByType);CivRegisterReplace<CivHooks::CvLuaDeal_lRemoveByType>(host, &ReplaceCvLuaDeal_lRemoveByType);
Code
92int CvLuaDeal::lRemoveByType(lua_State* L)93{94 CvDeal* pkDeal = GetInstance(L);95 int args = lua_gettop(L);9697 if(args == 1)98 pkDeal->RemoveByType((TradeableItems) lua_tointeger(L, 2), NO_PLAYER);99 else100 pkDeal->RemoveByType((TradeableItems) lua_tointeger(L, 2), (PlayerTypes) lua_tointeger(L, 3));101102 return 0;103}
Calls
- CvDeal::RemoveByType(TradeableItems, PlayerTypes)
CvLuaScopedInstance::GetInstancelua_gettoplua_tointeger