少年修仙传客户端代码仓库
client_linchunjie
2019-05-25 4e214acef80e8adb142ea25c71f2c7bfe34c9e66
6953 【2.0】【开发】灵根、强化红点优化
2个文件已修改
73 ■■■■■ 已修改文件
Lua/Gen/SnxxzUIEquipStrengthModelWrap.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipStrengthModel.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIEquipStrengthModelWrap.cs
@@ -50,8 +50,6 @@
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "SelectLevelRefresh", _e_SelectLevelRefresh);
            
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "equipPlaces", _g_get_equipPlaces);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "redpointLimitLevel", _g_get_redpointLimitLevel);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "redpointLimitMoney", _g_get_redpointLimitMoney);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsChangeBool", _g_get_IsChangeBool);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "SelectLevel", _g_get_SelectLevel);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "SelectEquipPlace", _g_get_SelectEquipPlace);
@@ -752,34 +750,6 @@
            
                Snxxz.UI.EquipStrengthModel gen_to_be_invoked = (Snxxz.UI.EquipStrengthModel)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.equipPlaces);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_redpointLimitLevel(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.EquipStrengthModel gen_to_be_invoked = (Snxxz.UI.EquipStrengthModel)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.redpointLimitLevel);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_redpointLimitMoney(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.EquipStrengthModel gen_to_be_invoked = (Snxxz.UI.EquipStrengthModel)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.redpointLimitMoney);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
System/EquipGem/EquipStrengthModel.cs
@@ -60,9 +60,7 @@
        public List<int> equipPlaces { get; private set; }
        public int redpointLimitLevel { get; private set; }
        public int redpointLimitMoney { get; private set; }
        public int redpointLimitMoneyLevel { get; private set; }
        public Int3[] redpointLimits;
        private bool isChangeBool = true;
        public bool IsChangeBool {
@@ -125,9 +123,12 @@
            GetEvolutionTypeMax();
            var funcConfig = FuncConfigConfig.Get("StrengthenRedPointLevel");
            redpointLimitLevel = int.Parse(funcConfig.Numerical1);
            redpointLimitMoney = int.Parse(funcConfig.Numerical2);
            redpointLimitMoneyLevel = int.Parse(funcConfig.Numerical3);
            var array = funcConfig.Numerical1.Split('|');
            redpointLimits = new Int3[array.Length];
            for (int i = 0; i < array.Length; i++)
            {
                Int3.TryParse(array[i], out redpointLimits[i]);
            }
            equipPlaces = new List<int>(12);
            for (int i = 1; i <= 12; i++)
@@ -614,7 +615,22 @@
                return;
            }
            if (PlayerDatas.Instance.baseData.LV >= redpointLimitLevel)
            Int3 limit = redpointLimits[0];
            var isLast = false;
            for (int i = redpointLimits.Length - 1; i >= 0; i--)
            {
                if (PlayerDatas.Instance.baseData.LV >= redpointLimits[i].x)
                {
                    limit = redpointLimits[i];
                    if (i == redpointLimits.Length - 1)
                    {
                        isLast = true;
                    }
                    break;
                }
            }
            if (isLast)
            {
                if (DayRemind.Instance.GetDayRemind(DayRemind.EQUIPSTRENGTH_REDPOINT))
                {
@@ -623,14 +639,11 @@
                }
            }
            if (PlayerDatas.Instance.baseData.LV >= redpointLimitMoneyLevel)
            var money = UIHelper.GetMoneyCnt(3);
            if (money < (ulong)limit.y)
            {
                var money = UIHelper.GetMoneyCnt(3);
                if (money < (ulong)redpointLimitMoney)
                {
                    RefreshRedpoint(Int2.zero, 0);
                    return;
                }
                RefreshRedpoint(Int2.zero, 0);
                return;
            }
            var equipSets = equipModel.GetAllEquipSets();
@@ -682,7 +695,7 @@
                    {
                        strengthLevel = EquipStrengthDic[serverPlace].StrengthLevel;
                    }
                    var stage = strengthLevel / 10;
                    var stage = strengthLevel / limit.z;
                    if (minStage > stage)
                    {