#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 SnxxzUIMagicianModelWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Snxxz.UI.MagicianModel); Utils.BeginObjectRegister(type, L, translator, 0, 16, 8, 5); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnPlayerLoginOk", _m_OnPlayerLoginOk); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetLvUpItemByType", _m_GetLvUpItemByType); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateRedPoint", _m_UpdateRedPoint); Utils.RegisterFunc(L, Utils.METHOD_IDX, "CanTemperMagician", _m_CanTemperMagician); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetRedpointLightByType", _m_GetRedpointLightByType); Utils.RegisterFunc(L, Utils.METHOD_IDX, "TemperMagician", _m_TemperMagician); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnMagicianChange", _m_OnMagicianChange); Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetUnlockSkill", _m_TryGetUnlockSkill); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMagicianData", _m_GetMagicianData); Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGodWeaponMaxLevel", _m_IsGodWeaponMaxLevel); Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGodWeaponTemperItem", _m_IsGodWeaponTemperItem); Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsGodWeaponMaxLevelByItem", _m_IsGodWeaponMaxLevelByItem); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRefresh", _e_OnRefresh); Utils.RegisterFunc(L, Utils.GETTER_IDX, "magicianTypes", _g_get_magicianTypes); Utils.RegisterFunc(L, Utils.GETTER_IDX, "godWeaponIcons", _g_get_godWeaponIcons); Utils.RegisterFunc(L, Utils.GETTER_IDX, "magicianRedpoint", _g_get_magicianRedpoint); Utils.RegisterFunc(L, Utils.GETTER_IDX, "godWeaponSkillDict", _g_get_godWeaponSkillDict); Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectType", _g_get_selectType); Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectItemIndex", _g_get_selectItemIndex); Utils.RegisterFunc(L, Utils.GETTER_IDX, "gotoType", _g_get_gotoType); Utils.RegisterFunc(L, Utils.GETTER_IDX, "redpointDict", _g_get_redpointDict); Utils.RegisterFunc(L, Utils.SETTER_IDX, "godWeaponSkillDict", _s_set_godWeaponSkillDict); Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectType", _s_set_selectType); Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectItemIndex", _s_set_selectItemIndex); Utils.RegisterFunc(L, Utils.SETTER_IDX, "gotoType", _s_set_gotoType); Utils.RegisterFunc(L, Utils.SETTER_IDX, "redpointDict", _s_set_redpointDict); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 3, 0, 0); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MAGICAIN_REDPOINT", Snxxz.UI.MagicianModel.MAGICAIN_REDPOINT); Utils.RegisterObject(L, translator, Utils.CLS_IDX, "MAGICAIN_INTERVAL", Snxxz.UI.MagicianModel.MAGICAIN_INTERVAL); 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.MagicianModel gen_ret = new Snxxz.UI.MagicianModel(); 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.MagicianModel constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)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_UnInit(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)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 _m_OnBeforePlayerDataInitialize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.OnBeforePlayerDataInitialize( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_OnPlayerLoginOk(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.OnPlayerLoginOk( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetLvUpItemByType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { int _type = LuaAPI.xlua_tointeger(L, 2); int[] gen_ret = gen_to_be_invoked.GetLvUpItemByType( _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_UpdateRedPoint(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.UpdateRedPoint( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_CanTemperMagician(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { bool gen_ret = gen_to_be_invoked.CanTemperMagician( ); LuaAPI.lua_pushboolean(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_GetRedpointLightByType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { int __type = LuaAPI.xlua_tointeger(L, 2); bool gen_ret = gen_to_be_invoked.GetRedpointLightByType( __type ); LuaAPI.lua_pushboolean(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_TemperMagician(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { int _type = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.TemperMagician( _type ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_OnMagicianChange(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { HA31D_tagMCGodWeaponLVList _vNetData = (HA31D_tagMCGodWeaponLVList)translator.GetObject(L, 2, typeof(HA31D_tagMCGodWeaponLVList)); gen_to_be_invoked.OnMagicianChange( _vNetData ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_TryGetUnlockSkill(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { int __type = LuaAPI.xlua_tointeger(L, 2); int __beforeLv = LuaAPI.xlua_tointeger(L, 3); int __nowLv = LuaAPI.xlua_tointeger(L, 4); int __skillid; bool gen_ret = gen_to_be_invoked.TryGetUnlockSkill( __type, __beforeLv, __nowLv, out __skillid ); LuaAPI.lua_pushboolean(L, gen_ret); LuaAPI.xlua_pushinteger(L, __skillid); return 2; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetMagicianData(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { int _type = LuaAPI.xlua_tointeger(L, 2); Snxxz.UI.MagicianData gen_ret = gen_to_be_invoked.GetMagicianData( _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_IsGodWeaponMaxLevel(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { int __type = LuaAPI.xlua_tointeger(L, 2); bool gen_ret = gen_to_be_invoked.IsGodWeaponMaxLevel( __type ); LuaAPI.lua_pushboolean(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_IsGodWeaponTemperItem(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { int __type = LuaAPI.xlua_tointeger(L, 2); int __itemId = LuaAPI.xlua_tointeger(L, 3); bool gen_ret = gen_to_be_invoked.IsGodWeaponTemperItem( __type, __itemId ); LuaAPI.lua_pushboolean(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_IsGodWeaponMaxLevelByItem(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); { int __itemId = LuaAPI.xlua_tointeger(L, 2); bool gen_ret = gen_to_be_invoked.IsGodWeaponMaxLevelByItem( __itemId ); LuaAPI.lua_pushboolean(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_magicianTypes(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.magicianTypes); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_godWeaponIcons(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.godWeaponIcons); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_magicianRedpoint(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.magicianRedpoint); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_godWeaponSkillDict(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.godWeaponSkillDict); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_selectType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectType); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_selectItemIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.selectItemIndex); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_gotoType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.gotoType); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_redpointDict(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.redpointDict); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_godWeaponSkillDict(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.godWeaponSkillDict = (System.Collections.Generic.Dictionary>)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary>)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_selectType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.selectType = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_selectItemIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.selectItemIndex = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_gotoType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.gotoType = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_redpointDict(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.redpointDict = (System.Collections.Generic.Dictionary)translator.GetObject(L, 2, typeof(System.Collections.Generic.Dictionary)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnRefresh(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); Snxxz.UI.MagicianModel gen_to_be_invoked = (Snxxz.UI.MagicianModel)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(L, 3); if (gen_delegate == null) { return LuaAPI.luaL_error(L, "#3 need System.Action!"); } if (gen_param_count == 3) { if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { gen_to_be_invoked.OnRefresh += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.OnRefresh -= 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.MagicianModel.OnRefresh!"); return 0; } } }