#if USE_UNI_LUA
|
using LuaAPI = UniLua.Lua;
|
using RealStatePtr = UniLua.ILuaState;
|
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
|
#else
|
using LuaAPI = XLua.LuaDLL.Lua;
|
using RealStatePtr = System.IntPtr;
|
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
|
#endif
|
|
using XLua;
|
using System.Collections.Generic;
|
|
|
namespace XLua.CSObjectWrap
|
{
|
using Utils = XLua.Utils;
|
public class SnxxzUIBoxGetItemModelWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(Snxxz.UI.BoxGetItemModel);
|
Utils.BeginObjectRegister(type, L, translator, 0, 11, 7, 1);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetGetBoxItemInfo", _m_SetGetBoxItemInfo);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUseCntByID", _m_GetUseCntByID);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetModel", _m_SetModel);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckOpenBoxCondi", _m_CheckOpenBoxCondi);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckOpenMoney", _m_CheckOpenMoney);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckOtherCondi", _m_CheckOtherCondi);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckOpenBoxCondition", _m_CheckOpenBoxCondition);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsSelectItemByID", _m_IsSelectItemByID);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshGetItemAct", _e_RefreshGetItemAct);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "guid", _g_get_guid);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "itemId", _g_get_itemId);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "showType", _g_get_showType);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "getItems", _g_get_getItems);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "getCoinsType", _g_get_getCoinsType);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "getCoinsCnt", _g_get_getCoinsCnt);
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectDict", _g_get_selectDict);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectDict", _s_set_selectDict);
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
null, null, null);
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
|
|
|
|
|
|
|
Utils.EndClassRegister(type, L, translator);
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int __CreateInstance(RealStatePtr L)
|
{
|
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
if(LuaAPI.lua_gettop(L) == 1)
|
{
|
|
Snxxz.UI.BoxGetItemModel gen_ret = new Snxxz.UI.BoxGetItemModel();
|
translator.Push(L, gen_ret);
|
|
return 1;
|
}
|
|
}
|
catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.BoxGetItemModel constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Init(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.Init( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_SetGetBoxItemInfo(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
HA810_tagMCNotifyUseItemGetItem _boxItemInfo = (HA810_tagMCNotifyUseItemGetItem)translator.GetObject(L, 2, typeof(HA810_tagMCNotifyUseItemGetItem));
|
|
gen_to_be_invoked.SetGetBoxItemInfo( _boxItemInfo );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_GetUseCntByID(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _itemId = LuaAPI.xlua_tointeger(L, 2);
|
|
int gen_ret = gen_to_be_invoked.GetUseCntByID( _itemId );
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_SetModel(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
string _guid = LuaAPI.lua_tostring(L, 2);
|
int _itemId = LuaAPI.xlua_tointeger(L, 3);
|
|
gen_to_be_invoked.SetModel( _guid, _itemId );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_CheckOpenBoxCondi(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
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))
|
{
|
string _guid = LuaAPI.lua_tostring(L, 2);
|
int _itemId = LuaAPI.xlua_tointeger(L, 3);
|
int _useCnt = LuaAPI.xlua_tointeger(L, 4);
|
|
gen_to_be_invoked.CheckOpenBoxCondi( _guid, _itemId, _useCnt );
|
|
|
|
return 0;
|
}
|
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))
|
{
|
string _guid = LuaAPI.lua_tostring(L, 2);
|
int _itemId = LuaAPI.xlua_tointeger(L, 3);
|
|
gen_to_be_invoked.CheckOpenBoxCondi( _guid, _itemId );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.BoxGetItemModel.CheckOpenBoxCondi!");
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_CheckOpenMoney(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
TableConfig.ChestsConfig _chestsConfig = (TableConfig.ChestsConfig)translator.GetObject(L, 2, typeof(TableConfig.ChestsConfig));
|
TableConfig.ItemConfig _boxConfig = (TableConfig.ItemConfig)translator.GetObject(L, 3, typeof(TableConfig.ItemConfig));
|
int _useCnt = LuaAPI.xlua_tointeger(L, 4);
|
|
gen_to_be_invoked.CheckOpenMoney( _chestsConfig, _boxConfig, _useCnt );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_CheckOtherCondi(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
TableConfig.ChestsConfig _chestsConfig = (TableConfig.ChestsConfig)translator.GetObject(L, 2, typeof(TableConfig.ChestsConfig));
|
TableConfig.ItemConfig _boxConfig = (TableConfig.ItemConfig)translator.GetObject(L, 3, typeof(TableConfig.ItemConfig));
|
int _useCnt = LuaAPI.xlua_tointeger(L, 4);
|
|
gen_to_be_invoked.CheckOtherCondi( _chestsConfig, _boxConfig, _useCnt );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_CheckOpenBoxCondition(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _itemId = LuaAPI.xlua_tointeger(L, 2);
|
bool _isBox;
|
|
bool gen_ret = gen_to_be_invoked.CheckOpenBoxCondition( _itemId, out _isBox );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
LuaAPI.lua_pushboolean(L, _isBox);
|
|
|
|
|
return 2;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_IsSelectItemByID(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _boxId = LuaAPI.xlua_tointeger(L, 2);
|
System.Collections.Generic.Dictionary<int, int> _selectDict;
|
|
bool gen_ret = gen_to_be_invoked.IsSelectItemByID( _boxId, out _selectDict );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
translator.Push(L, _selectDict);
|
|
|
|
|
return 2;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_UnInit(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
gen_to_be_invoked.UnInit( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_guid(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushstring(L, gen_to_be_invoked.guid);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_itemId(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.itemId);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_showType(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.showType);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_getItems(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.getItems);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_getCoinsType(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.getCoinsType);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_getCoinsCnt(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
LuaAPI.lua_pushint64(L, gen_to_be_invoked.getCoinsCnt);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _g_get_selectDict(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
translator.Push(L, gen_to_be_invoked.selectDict);
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 1;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _s_set_selectDict(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
gen_to_be_invoked.selectDict = (System.Collections.Generic.Dictionary<int, int>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary<int, int>));
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
return 0;
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _e_RefreshGetItemAct(RealStatePtr L)
|
{
|
try {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
Snxxz.UI.BoxGetItemModel gen_to_be_invoked = (Snxxz.UI.BoxGetItemModel)translator.FastGetCSObj(L, 1);
|
System.Action<int, int, Snxxz.UI.BoxGetItemInfo[]> gen_delegate = translator.GetDelegate<System.Action<int, int, Snxxz.UI.BoxGetItemInfo[]>>(L, 3);
|
if (gen_delegate == null) {
|
return LuaAPI.luaL_error(L, "#3 need System.Action<int, int, Snxxz.UI.BoxGetItemInfo[]>!");
|
}
|
|
if (gen_param_count == 3)
|
{
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
gen_to_be_invoked.RefreshGetItemAct += gen_delegate;
|
return 0;
|
}
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
gen_to_be_invoked.RefreshGetItemAct -= gen_delegate;
|
return 0;
|
}
|
|
}
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.BoxGetItemModel.RefreshGetItemAct!");
|
return 0;
|
}
|
|
|
|
}
|
}
|