| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.ItemOperateUtility); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 21, 2, 1); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 20, 2, 1); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "PutOnItem", _m_PutOnItem); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "PutOffEquip", _m_PutOffEquip); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckIsMaxOfflineTime", _m_CheckIsMaxOfflineTime); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UseItem", _m_UseItem); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "CanUseItem", _m_CanUseItem); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UseItemMainServer", _m_UseItemMainServer); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UseItemCrossServer", _m_UseItemCrossServer); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnClickSplitBtn", _m_OnClickSplitBtn); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SplitItem", _m_SplitItem); |
| | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) |
| | | if(gen_param_count == 4&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | string _guid = LuaAPI.lua_tostring(L, 2); |
| | | int _useCnt = LuaAPI.xlua_tointeger(L, 3); |
| | | int _extra = LuaAPI.xlua_tointeger(L, 4); |
| | | |
| | | gen_to_be_invoked.UseItem( _index, _useCnt, _extra ); |
| | | gen_to_be_invoked.UseItem( _guid, _useCnt, _extra ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) |
| | | if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | string _guid = LuaAPI.lua_tostring(L, 2); |
| | | int _useCnt = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | gen_to_be_invoked.UseItem( _index, _useCnt ); |
| | | gen_to_be_invoked.UseItem( _guid, _useCnt ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | string _guid = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | gen_to_be_invoked.UseItem( _index ); |
| | | gen_to_be_invoked.UseItem( _guid ); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | string _guid = LuaAPI.lua_tostring(L, 2); |
| | | int _useCnt = LuaAPI.xlua_tointeger(L, 3); |
| | | int _error; |
| | | |
| | | bool gen_ret = gen_to_be_invoked.CanUseItem( _index, _useCnt, out _error ); |
| | | bool gen_ret = gen_to_be_invoked.CanUseItem( _guid, _useCnt, out _error ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | LuaAPI.xlua_pushinteger(L, _error); |
| | | |
| | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UseItemMainServer(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.ItemOperateUtility gen_to_be_invoked = (Snxxz.UI.ItemOperateUtility)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | int _useCnt = LuaAPI.xlua_tointeger(L, 3); |
| | | int _extra = LuaAPI.xlua_tointeger(L, 4); |
| | | |
| | | gen_to_be_invoked.UseItemMainServer( _index, _useCnt, _extra ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | |
| | | |
| | | |
| | | { |
| | | int _index = LuaAPI.xlua_tointeger(L, 2); |
| | | string _guid = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | gen_to_be_invoked.UseItemCrossServer( _index ); |
| | | gen_to_be_invoked.UseItemCrossServer( _guid ); |
| | | |
| | | |
| | | |