少年修仙传客户端代码仓库
client_linchunjie
2019-07-08 701b1f216cca6c19924dafdef6f53709ad891180
7930 【前端】【主干】骑宠觉醒功能
7个文件已修改
2个文件已添加
482 ■■■■■ 已修改文件
Lua/Gen/MountModelWrap.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIPetModelWrap.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIPropertyBehaviourWrap.cs 359 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIPropertyBehaviourWrap.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/XLuaGenAutoRegister.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/link.xml 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Mount/MountModel.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PetModel.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/PropertyBehaviour.cs 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/MountModelWrap.cs
@@ -21,7 +21,7 @@
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            System.Type type = typeof(MountModel);
            Utils.BeginObjectRegister(type, L, translator, 0, 20, 17, 15);
            Utils.BeginObjectRegister(type, L, translator, 0, 21, 17, 15);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit);
@@ -44,6 +44,7 @@
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSkillUnlockLevel", _m_GetSkillUnlockLevel);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsHorseMaxLevel", _m_IsHorseMaxLevel);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "onHorseInfoUpdate", _e_onHorseInfoUpdate);
            
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "horseUpItemId", _g_get_horseUpItemId);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "horseUpItemCost", _g_get_horseUpItemCost);
@@ -1230,6 +1231,40 @@
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_onHorseInfoUpdate(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                int gen_param_count = LuaAPI.lua_gettop(L);
            MountModel gen_to_be_invoked = (MountModel)translator.FastGetCSObj(L, 1);
                System.Action gen_delegate = translator.GetDelegate<System.Action>(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.onHorseInfoUpdate += gen_delegate;
                        return 0;
                    }
                    if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
                        gen_to_be_invoked.onHorseInfoUpdate -= 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 MountModel.onHorseInfoUpdate!");
            return 0;
        }
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
Lua/Gen/SnxxzUIPetModelWrap.cs
@@ -21,7 +21,7 @@
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            System.Type type = typeof(Snxxz.UI.PetModel);
            Utils.BeginObjectRegister(type, L, translator, 0, 25, 18, 14);
            Utils.BeginObjectRegister(type, L, translator, 0, 26, 18, 14);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit);
@@ -49,6 +49,7 @@
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsPetMaxLevel", _m_IsPetMaxLevel);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "PlayerLoginOkData", _e_PlayerLoginOkData);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "onPetInfoUpdate", _e_onPetInfoUpdate);
            
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "isServerPrepare", _g_get_isServerPrepare);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "petLvNameDict", _g_get_petLvNameDict);
@@ -1393,6 +1394,40 @@
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_onPetInfoUpdate(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                int gen_param_count = LuaAPI.lua_gettop(L);
            Snxxz.UI.PetModel gen_to_be_invoked = (Snxxz.UI.PetModel)translator.FastGetCSObj(L, 1);
                System.Action gen_delegate = translator.GetDelegate<System.Action>(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.onPetInfoUpdate += gen_delegate;
                        return 0;
                    }
                    if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
                        gen_to_be_invoked.onPetInfoUpdate -= 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.PetModel.onPetInfoUpdate!");
            return 0;
        }
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
Lua/Gen/SnxxzUIPropertyBehaviourWrap.cs
New file
@@ -0,0 +1,359 @@
#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 SnxxzUIPropertyBehaviourWrap
    {
        public static void __Register(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            System.Type type = typeof(Snxxz.UI.PropertyBehaviour);
            Utils.BeginObjectRegister(type, L, translator, 0, 9, 0, 0);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Display", _m_Display);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayUpper", _m_DisplayUpper);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayAdd", _m_DisplayAdd);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayRealm", _m_DisplayRealm);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayGodWeaponAdd", _m_DisplayGodWeaponAdd);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayUp", _m_DisplayUp);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayGem", _m_DisplayGem);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayReiki", _m_DisplayReiki);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColor", _m_SetColor);
            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.PropertyBehaviour gen_ret = new Snxxz.UI.PropertyBehaviour();
                    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.PropertyBehaviour constructor!");
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Display(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    int __property = LuaAPI.xlua_tointeger(L, 2);
                    int __value = LuaAPI.xlua_tointeger(L, 3);
                    gen_to_be_invoked.Display( __property, __value );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisplayUpper(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    int __property = LuaAPI.xlua_tointeger(L, 2);
                    int __value = LuaAPI.xlua_tointeger(L, 3);
                    gen_to_be_invoked.DisplayUpper( __property, __value );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisplayAdd(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    int __property = LuaAPI.xlua_tointeger(L, 2);
                    int __value = LuaAPI.xlua_tointeger(L, 3);
                    int __add = LuaAPI.xlua_tointeger(L, 4);
                    gen_to_be_invoked.DisplayAdd( __property, __value, __add );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisplayRealm(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    int __property = LuaAPI.xlua_tointeger(L, 2);
                    int __value = LuaAPI.xlua_tointeger(L, 3);
                    int __add = LuaAPI.xlua_tointeger(L, 4);
                    gen_to_be_invoked.DisplayRealm( __property, __value, __add );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisplayGodWeaponAdd(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    int __property = LuaAPI.xlua_tointeger(L, 2);
                    int __value = LuaAPI.xlua_tointeger(L, 3);
                    int __add = LuaAPI.xlua_tointeger(L, 4);
                    gen_to_be_invoked.DisplayGodWeaponAdd( __property, __value, __add );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisplayUp(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    int __property = LuaAPI.xlua_tointeger(L, 2);
                    int __value = LuaAPI.xlua_tointeger(L, 3);
                    int __add = LuaAPI.xlua_tointeger(L, 4);
                    gen_to_be_invoked.DisplayUp( __property, __value, __add );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisplayGem(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    int __property = LuaAPI.xlua_tointeger(L, 2);
                    int __value = LuaAPI.xlua_tointeger(L, 3);
                    gen_to_be_invoked.DisplayGem( __property, __value );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_DisplayReiki(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    int __property = LuaAPI.xlua_tointeger(L, 2);
                    int __value = LuaAPI.xlua_tointeger(L, 3);
                    int __add = LuaAPI.xlua_tointeger(L, 4);
                    gen_to_be_invoked.DisplayReiki( __property, __value, __add );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_SetColor(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PropertyBehaviour gen_to_be_invoked = (Snxxz.UI.PropertyBehaviour)translator.FastGetCSObj(L, 1);
                {
                    TextColType _colorType;translator.Get(L, 2, out _colorType);
                    bool _bright = LuaAPI.lua_toboolean(L, 3);
                    gen_to_be_invoked.SetColor( _colorType, _bright );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
    }
}
Lua/Gen/SnxxzUIPropertyBehaviourWrap.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0b9b60b16321ccf4082e6a8fde7cc50b
timeCreated: 1562591230
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Lua/Gen/XLuaGenAutoRegister.cs
@@ -1413,6 +1413,9 @@
            translator.DelayWrapLoader(typeof(Snxxz.UI.MagicianModel), SnxxzUIMagicianModelWrap.__Register);
        
        
            translator.DelayWrapLoader(typeof(Snxxz.UI.PropertyBehaviour), SnxxzUIPropertyBehaviourWrap.__Register);
            translator.DelayWrapLoader(typeof(Snxxz.UI.ReikiRootModel), SnxxzUIReikiRootModelWrap.__Register);
        
        
@@ -1427,13 +1430,13 @@
        
            translator.DelayWrapLoader(typeof(Snxxz.UI.RoleParticularModel), SnxxzUIRoleParticularModelWrap.__Register);
        
            translator.DelayWrapLoader(typeof(Snxxz.UI.RolePromoteModel), SnxxzUIRolePromoteModelWrap.__Register);
        }
        
        static void wrapInit9(LuaEnv luaenv, ObjectTranslator translator)
        {
            translator.DelayWrapLoader(typeof(Snxxz.UI.RolePromoteModel), SnxxzUIRolePromoteModelWrap.__Register);
        
            translator.DelayWrapLoader(typeof(Snxxz.UI.RuneComposeModel), SnxxzUIRuneComposeModelWrap.__Register);
        
@@ -1584,13 +1587,13 @@
        
            translator.DelayWrapLoader(typeof(Snxxz.UI.SignInModel), SnxxzUISignInModelWrap.__Register);
        
            translator.DelayWrapLoader(typeof(Snxxz.UI.WelfareCenter), SnxxzUIWelfareCenterWrap.__Register);
        }
        
        static void wrapInit10(LuaEnv luaenv, ObjectTranslator translator)
        {
            translator.DelayWrapLoader(typeof(Snxxz.UI.WelfareCenter), SnxxzUIWelfareCenterWrap.__Register);
        
            translator.DelayWrapLoader(typeof(Snxxz.UI.ModelCenter), SnxxzUIModelCenterWrap.__Register);
        
@@ -1741,14 +1744,14 @@
        
            translator.DelayWrapLoader(typeof(PropertyType), PropertyTypeWrap.__Register);
        
            translator.DelayWrapLoader(typeof(TextColType), TextColTypeWrap.__Register);
        }
        
        static void wrapInit11(LuaEnv luaenv, ObjectTranslator translator)
        {
        
            translator.DelayWrapLoader(typeof(TextColType), TextColTypeWrap.__Register);
            translator.DelayWrapLoader(typeof(E_ModelResType), E_ModelResTypeWrap.__Register);
        
        
Lua/Gen/link.xml
@@ -432,6 +432,7 @@
        <type fullname="Snxxz.UI.RedpointCenter" preserve="all"/>
        <type fullname="Snxxz.UI.RidingPetBossModel" preserve="all"/>
        <type fullname="Snxxz.UI.MagicianModel" preserve="all"/>
        <type fullname="Snxxz.UI.PropertyBehaviour" preserve="all"/>
        <type fullname="Snxxz.UI.ReikiRootModel" preserve="all"/>
        <type fullname="Snxxz.UI.RoleModel" preserve="all"/>
        <type fullname="Snxxz.UI.TitleModel" preserve="all"/>
System/Mount/MountModel.cs
@@ -66,6 +66,7 @@
    public bool Wait = true;//等待回包(使用坐骑丹)
    public static Action<int, bool> MultipleEvent;
    public static event Action PlayerLoginOKData;
    public event Action onHorseInfoUpdate;
    private Dictionary<int, int> DicDefaultMount = new Dictionary<int, int>();
    Dictionary<SkillEffectGroup, int> integrationSkills = new Dictionary<SkillEffectGroup, int>();
@@ -666,6 +667,12 @@
                }
            }
        }
        if (onHorseInfoUpdate != null && IsOk)
        {
            onHorseInfoUpdate();
        }
        MountStoneRed();
        MountChangeRedPoint();
        MountDanRed();
System/Pet/PetModel.cs
@@ -71,6 +71,7 @@
        public bool hasSendAutoActive { get; private set; }
        public event Action PlayerLoginOkData;
        public event Action onPetInfoUpdate;
        private Dictionary<int, int> DicDefaultPet = new Dictionary<int, int>();
        List<PetInfoConfig> allPetConfigs = new List<PetInfoConfig>();
@@ -738,6 +739,12 @@
                    ScrollTip.ShowTip(Language.Get("Z1811"));//外观切换成功
                }
            }
            if (onPetInfoUpdate != null && isServerPrepare)
            {
                onPetInfoUpdate();
            }
            PetStoneRed();
            PetActivateRedPoint();
            GetCultivateRedPoint();
System/Role/PropertyBehaviour.cs
@@ -7,6 +7,7 @@
namespace Snxxz.UI
{
    [XLua.Hotfix]
    [XLua.LuaCallCSharp]
    public class PropertyBehaviour : MonoBehaviour
    {
        [SerializeField] Text m_PropertyName;