#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 PlayerPropertyConfigWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(PlayerPropertyConfig); Utils.BeginObjectRegister(type, L, translator, 0, 1, 6, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnConfigParseCompleted", _m_OnConfigParseCompleted); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ID", _g_get_ID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Name", _g_get_Name); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ISPercentage", _g_get_ISPercentage); Utils.RegisterFunc(L, Utils.GETTER_IDX, "type", _g_get_type); Utils.RegisterFunc(L, Utils.GETTER_IDX, "desc", _g_get_desc); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Parameter", _g_get_Parameter); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 9, 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_IDX, "GetPropByType", _m_GetPropByType_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetFullDescription", _m_GetFullDescription_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetValueDescription", _m_GetValueDescription_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) { PlayerPropertyConfig gen_ret = new PlayerPropertyConfig(); 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); PlayerPropertyConfig gen_ret = new PlayerPropertyConfig(_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 PlayerPropertyConfig 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); PlayerPropertyConfig gen_ret = PlayerPropertyConfig.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); PlayerPropertyConfig gen_ret = PlayerPropertyConfig.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 PlayerPropertyConfig.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 = PlayerPropertyConfig.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 = PlayerPropertyConfig.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 = PlayerPropertyConfig.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 = PlayerPropertyConfig.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 PlayerPropertyConfig.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); PlayerPropertyConfig.Init( _sync ); return 0; } if(gen_param_count == 0) { PlayerPropertyConfig.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 PlayerPropertyConfig.Init!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_OnConfigParseCompleted(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PlayerPropertyConfig gen_to_be_invoked = (PlayerPropertyConfig)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.OnConfigParseCompleted( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetPropByType_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { int _type = LuaAPI.xlua_tointeger(L, 1); System.Collections.Generic.List gen_ret = PlayerPropertyConfig.GetPropByType( _type ); 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_GetFullDescription_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _id = LuaAPI.xlua_tointeger(L, 1); int _value = LuaAPI.xlua_tointeger(L, 2); string gen_ret = PlayerPropertyConfig.GetFullDescription( _id, _value ); LuaAPI.lua_pushstring(L, gen_ret); return 1; } if(gen_param_count == 1&& translator.Assignable(L, 1)) { Int2 _property;translator.Get(L, 1, out _property); string gen_ret = PlayerPropertyConfig.GetFullDescription( _property ); LuaAPI.lua_pushstring(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 PlayerPropertyConfig.GetFullDescription!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetValueDescription_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _id = LuaAPI.xlua_tointeger(L, 1); int _value = LuaAPI.xlua_tointeger(L, 2); string gen_ret = PlayerPropertyConfig.GetValueDescription( _id, _value ); LuaAPI.lua_pushstring(L, gen_ret); return 1; } if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4)) { int _id = LuaAPI.xlua_tointeger(L, 1); int _value = LuaAPI.xlua_tointeger(L, 2); int _decimalCount = LuaAPI.xlua_tointeger(L, 3); bool _largeValue = LuaAPI.lua_toboolean(L, 4); string gen_ret = PlayerPropertyConfig.GetValueDescription( _id, _value, _decimalCount, _largeValue ); LuaAPI.lua_pushstring(L, gen_ret); return 1; } if(gen_param_count == 1&& translator.Assignable(L, 1)) { Int2 _property;translator.Get(L, 1, out _property); string gen_ret = PlayerPropertyConfig.GetValueDescription( _property ); LuaAPI.lua_pushstring(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 PlayerPropertyConfig.GetValueDescription!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_inited(RealStatePtr L) { try { LuaAPI.lua_pushboolean(L, PlayerPropertyConfig.inited); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_ID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PlayerPropertyConfig gen_to_be_invoked = (PlayerPropertyConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Name(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PlayerPropertyConfig gen_to_be_invoked = (PlayerPropertyConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.Name); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_ISPercentage(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PlayerPropertyConfig gen_to_be_invoked = (PlayerPropertyConfig)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ISPercentage); } 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); PlayerPropertyConfig gen_to_be_invoked = (PlayerPropertyConfig)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_desc(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PlayerPropertyConfig gen_to_be_invoked = (PlayerPropertyConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.desc); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Parameter(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); PlayerPropertyConfig gen_to_be_invoked = (PlayerPropertyConfig)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.Parameter); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } } }