#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 DemonJarConfigWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(DemonJarConfig); Utils.BeginObjectRegister(type, L, translator, 0, 0, 16, 0); Utils.RegisterFunc(L, Utils.GETTER_IDX, "NPCID", _g_get_NPCID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "LineID", _g_get_LineID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Time", _g_get_Time); Utils.RegisterFunc(L, Utils.GETTER_IDX, "MustItemID", _g_get_MustItemID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "MustItemDescriptions", _g_get_MustItemDescriptions); Utils.RegisterFunc(L, Utils.GETTER_IDX, "RareItemID", _g_get_RareItemID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "PortraitID", _g_get_PortraitID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "SpecialItemMark", _g_get_SpecialItemMark); Utils.RegisterFunc(L, Utils.GETTER_IDX, "CanEnterTimes", _g_get_CanEnterTimes); Utils.RegisterFunc(L, Utils.GETTER_IDX, "AutoAttention", _g_get_AutoAttention); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Job1", _g_get_Job1); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Job2", _g_get_Job2); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Job3", _g_get_Job3); Utils.RegisterFunc(L, Utils.GETTER_IDX, "KillHurtMin", _g_get_KillHurtMin); Utils.RegisterFunc(L, Utils.GETTER_IDX, "KillHurtMax", _g_get_KillHurtMax); Utils.RegisterFunc(L, Utils.GETTER_IDX, "RewardDescription", _g_get_RewardDescription); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 0); Utils.RegisterFunc(L, Utils.CLS_IDX, "Get", _m_Get_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetKeys", _m_GetKeys_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetValues", _m_GetValues_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "Has", _m_Has_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "inited", _g_get_inited); 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) { DemonJarConfig gen_ret = new DemonJarConfig(); translator.Push(L, gen_ret); return 1; } if(LuaAPI.lua_gettop(L) == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _input = LuaAPI.lua_tostring(L, 2); DemonJarConfig gen_ret = new DemonJarConfig(_input); 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 DemonJarConfig constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Get_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { int _id = LuaAPI.xlua_tointeger(L, 1); DemonJarConfig gen_ret = DemonJarConfig.Get( _id ); translator.Push(L, gen_ret); return 1; } if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) { string _id = LuaAPI.lua_tostring(L, 1); DemonJarConfig gen_ret = DemonJarConfig.Get( _id ); 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 DemonJarConfig.Get!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetKeys_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { System.Collections.Generic.List gen_ret = DemonJarConfig.GetKeys( ); translator.Push(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_GetValues_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { System.Collections.Generic.List gen_ret = DemonJarConfig.GetValues( ); translator.Push(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_Has_xlua_st_(RealStatePtr L) { try { int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) { int _id = LuaAPI.xlua_tointeger(L, 1); bool gen_ret = DemonJarConfig.Has( _id ); LuaAPI.lua_pushboolean(L, gen_ret); return 1; } if(gen_param_count == 1&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)) { string _id = LuaAPI.lua_tostring(L, 1); bool gen_ret = DemonJarConfig.Has( _id ); LuaAPI.lua_pushboolean(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 DemonJarConfig.Has!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init_xlua_st_(RealStatePtr L) { try { int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 1&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 1)) { bool _sync = LuaAPI.lua_toboolean(L, 1); DemonJarConfig.Init( _sync ); return 0; } if(gen_param_count == 0) { DemonJarConfig.Init( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to DemonJarConfig.Init!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_inited(RealStatePtr L) { try { LuaAPI.lua_pushboolean(L, DemonJarConfig.inited); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_NPCID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NPCID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_LineID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.LineID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Time(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.Time); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_MustItemID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.MustItemID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_MustItemDescriptions(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.MustItemDescriptions); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_RareItemID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.RareItemID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_PortraitID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.PortraitID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_SpecialItemMark(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.SpecialItemMark); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_CanEnterTimes(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.CanEnterTimes); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_AutoAttention(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.AutoAttention); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Job1(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Job1); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Job2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Job2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Job3(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.Job3); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_KillHurtMin(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.KillHurtMin); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_KillHurtMax(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.KillHurtMax); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_RewardDescription(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); DemonJarConfig gen_to_be_invoked = (DemonJarConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.RewardDescription); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } } }