#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 TaskFeedbackConfigWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(TaskFeedbackConfig); Utils.BeginObjectRegister(type, L, translator, 0, 0, 11, 0); Utils.RegisterFunc(L, Utils.GETTER_IDX, "taskId", _g_get_taskId); Utils.RegisterFunc(L, Utils.GETTER_IDX, "type", _g_get_type); Utils.RegisterFunc(L, Utils.GETTER_IDX, "condition", _g_get_condition); Utils.RegisterFunc(L, Utils.GETTER_IDX, "equips", _g_get_equips); Utils.RegisterFunc(L, Utils.GETTER_IDX, "items", _g_get_items); Utils.RegisterFunc(L, Utils.GETTER_IDX, "sideTasks", _g_get_sideTasks); Utils.RegisterFunc(L, Utils.GETTER_IDX, "reikiRoot", _g_get_reikiRoot); Utils.RegisterFunc(L, Utils.GETTER_IDX, "succGuide", _g_get_succGuide); Utils.RegisterFunc(L, Utils.GETTER_IDX, "jump", _g_get_jump); Utils.RegisterFunc(L, Utils.GETTER_IDX, "failFuncs", _g_get_failFuncs); Utils.RegisterFunc(L, Utils.GETTER_IDX, "remind", _g_get_remind); 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) { TaskFeedbackConfig gen_ret = new TaskFeedbackConfig(); 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); TaskFeedbackConfig gen_ret = new TaskFeedbackConfig(_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 TaskFeedbackConfig 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); TaskFeedbackConfig gen_ret = TaskFeedbackConfig.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); TaskFeedbackConfig gen_ret = TaskFeedbackConfig.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 TaskFeedbackConfig.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 = TaskFeedbackConfig.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 = TaskFeedbackConfig.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 = TaskFeedbackConfig.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 = TaskFeedbackConfig.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 TaskFeedbackConfig.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); TaskFeedbackConfig.Init( _sync ); return 0; } if(gen_param_count == 0) { TaskFeedbackConfig.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 TaskFeedbackConfig.Init!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_inited(RealStatePtr L) { try { LuaAPI.lua_pushboolean(L, TaskFeedbackConfig.inited); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_taskId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.taskId); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_type(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.type); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_condition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.condition); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_equips(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.equips); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_items(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.items); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_sideTasks(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.sideTasks); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_reikiRoot(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.reikiRoot); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_succGuide(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.succGuide); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_jump(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.jump); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_failFuncs(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.failFuncs); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_remind(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaskFeedbackConfig gen_to_be_invoked = (TaskFeedbackConfig)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.remind); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } } }