From e925d587dbed71de9c0275cb31e15ecbc0265fdd Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 19 三月 2019 15:36:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Lua/Gen/SnxxzUIItemOperateUtilityWrap.cs | 59 ++++++++++++++---------------------------------------------
1 files changed, 14 insertions(+), 45 deletions(-)
diff --git a/Lua/Gen/SnxxzUIItemOperateUtilityWrap.cs b/Lua/Gen/SnxxzUIItemOperateUtilityWrap.cs
index 633877f..727b494 100644
--- a/Lua/Gen/SnxxzUIItemOperateUtilityWrap.cs
+++ b/Lua/Gen/SnxxzUIItemOperateUtilityWrap.cs
@@ -21,7 +21,7 @@
{
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);
@@ -34,7 +34,6 @@
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);
@@ -364,34 +363,34 @@
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 );
@@ -419,11 +418,11 @@
{
- 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);
@@ -431,36 +430,6 @@
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) {
@@ -482,9 +451,9 @@
{
- 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 );
--
Gitblit v1.8.0