少年修仙传客户端代码仓库
client_Wu Xijin
2018-10-26 82931aabaaa3e479bc04e11630a77cd9c9dd5fe3
System/Realm/ActivateShow.cs
@@ -16,7 +16,8 @@
        public static int godWeaponType { get; private set; }
        public static int treasureSoulId { get; private set; }
        private static Dictionary<int, int> propertyUpDict = new Dictionary<int, int>();
        private static Dictionary<int, int> lastPropertyDict = new Dictionary<int, int>();
        private static Dictionary<int, int> currentPropertyDict = new Dictionary<int, int>();
        public static event Action<ActivateFunc, int> prepareFlySkillEvent;
        public static event Action<ActivateFunc> complelteFlySkillEvent;
@@ -25,7 +26,8 @@
        {
            activateType = ActivateFunc.Realm;
            propertyCompares.Clear();
            propertyUpDict.Clear();
            currentPropertyDict.Clear();
            lastPropertyDict.Clear();
            beforeLv = _lv - 1;
            currentLv = _lv;
            var _beforeConfig = Config.Instance.Get<RealmConfig>(_lv - 1);
@@ -33,6 +35,10 @@
            if (_beforeConfig != null)
            {
                _beforeProperties.AddRange(_beforeConfig.AddAttrType);
                for (int i = 0; i < _beforeConfig.AddAttrType.Length; i++)
                {
                    lastPropertyDict.Add(_beforeConfig.AddAttrType[i], _beforeConfig.AddAttrNum[i]);
                }
            }
            var config = Config.Instance.Get<RealmConfig>(_lv);
            for (int i = 0; i < config.AddAttrType.Length; i++)
@@ -40,8 +46,6 @@
                var _index = _beforeProperties.IndexOf(config.AddAttrType[i]);
                if (_index == -1 || config.AddAttrNum[i] > _beforeConfig.AddAttrNum[_index])
                {
                    propertyUpDict.Add(config.AddAttrType[i], config.AddAttrNum[i] -
                        (_index == -1 ? 0 : _beforeConfig.AddAttrNum[_index]));
                    propertyCompares.Add(new PropertyCompare()
                    {
                        key = config.AddAttrType[i],
@@ -49,8 +53,10 @@
                        currentValue = config.AddAttrNum[i]
                    });
                }
                currentPropertyDict.Add(config.AddAttrType[i], config.AddAttrNum[i]);
            }
            fightPower = UIHelper.GetFightPower(propertyUpDict);
            fightPower = UIHelper.GetFightPower(currentPropertyDict) - UIHelper.GetFightPower(lastPropertyDict);
            titleIconKey = "UI_JH_3";
            if (!WindowCenter.Instance.IsOpen<RealmPropertyUpWin>())
@@ -67,7 +73,8 @@
            beforeLv = _beforeLv;
            skills.Clear();
            propertyCompares.Clear();
            propertyUpDict.Clear();
            lastPropertyDict.Clear();
            currentPropertyDict.Clear();
            var _model = ModelCenter.Instance.GetModel<MagicianModel>();
            if (_model.godWeaponSkillDict.ContainsKey(_type))
@@ -92,6 +99,10 @@
            if (_beforeConfig != null)
            {
                _beforeProperties.AddRange(_beforeConfig.AttrType);
                for (int i = 0; i < _beforeConfig.AttrType.Length; i++)
                {
                    lastPropertyDict.Add(_beforeConfig.AttrType[i], _beforeConfig.AttrNum[i]);
                }
            }
            var config = GodWeaponConfig.GetGodWeaponCfgByTypeLv(_type, currentLv);
            for (int i = 0; i < config.AttrType.Length; i++)
@@ -99,8 +110,6 @@
                var _index = _beforeProperties.IndexOf(config.AttrType[i]);
                if (_index == -1 || config.AttrNum[i] > _beforeConfig.AttrNum[_index])
                {
                    propertyUpDict.Add(config.AttrType[i], config.AttrNum[i] -
                        (_index == -1 ? 0 : _beforeConfig.AttrNum[_index]));
                    propertyCompares.Add(new PropertyCompare()
                    {
                        key = config.AttrType[i],
@@ -108,9 +117,11 @@
                        currentValue = config.AttrNum[i]
                    });
                }
                currentPropertyDict.Add(config.AttrType[i], config.AttrNum[i]);
            }
            fightPower = UIHelper.GetFightPower(propertyUpDict);
            fightPower = UIHelper.GetFightPower(currentPropertyDict) - UIHelper.GetFightPower(lastPropertyDict);
            if (_beforeLv != 0)
            {
                for (int i = 0; i < skills.Count; i++)
@@ -132,7 +143,8 @@
        {
            activateType = ActivateFunc.Stove;
            propertyCompares.Clear();
            propertyUpDict.Clear();
            currentPropertyDict.Clear();
            lastPropertyDict.Clear();
            skills.Clear();
            beforeLv = stoveLv - 1;
            currentLv = stoveLv;
@@ -151,6 +163,10 @@
            if (_beforeConfig != null)
            {
                _beforeProperties.AddRange(_beforeConfig.AttrID);
                for (int i = 0; i < _beforeConfig.AttrID.Length; i++)
                {
                    lastPropertyDict.Add(_beforeConfig.AttrID[i], _beforeConfig.AttrValue[i]);
                }
            }
            var config = Config.Instance.Get<RefineStoveConfig>(stoveLv);
            for (int i = 0; i < config.AttrID.Length; i++)
@@ -158,8 +174,6 @@
                var _index = _beforeProperties.IndexOf(config.AttrID[i]);
                if (_index == -1 || config.AttrValue[i] > _beforeConfig.AttrValue[_index])
                {
                    propertyUpDict.Add(config.AttrID[i], config.AttrValue[i] -
                        (_index == -1 ? 0 : _beforeConfig.AttrValue[_index]));
                    propertyCompares.Add(new PropertyCompare()
                    {
                        key = config.AttrID[i],
@@ -167,8 +181,10 @@
                        currentValue = config.AttrValue[i]
                    });
                }
                currentPropertyDict.Add(config.AttrID[i], config.AttrValue[i]);
            }
            fightPower = UIHelper.GetFightPower(propertyUpDict);
            fightPower = UIHelper.GetFightPower(currentPropertyDict) - UIHelper.GetFightPower(lastPropertyDict);
            titleIconKey = "XT_LD_01";
            if (!WindowCenter.Instance.IsOpen<StoveUpgradWin>())
@@ -184,7 +200,8 @@
            treasureSoulId = id;
            titleIconKey = "XT_FBZH_11";
            propertyCompares.Clear();
            propertyUpDict.Clear();
            lastPropertyDict.Clear();
            currentPropertyDict.Clear();
            var model = ModelCenter.Instance.GetModel<TreasureSoulModel>();
            TreasureSpecialData special;
            if (model.TryGetTreasureSoul(treasureSoulId, out special))
@@ -215,6 +232,10 @@
                        if (_beforeConfig != null)
                        {
                            _beforeProperties.AddRange(_beforeConfig.attType);
                            for (int i = 0; i < _beforeConfig.attType.Length; i++)
                            {
                                lastPropertyDict.Add(_beforeConfig.attType[i], _beforeConfig.attValue[i]);
                            }
                        }
                        var config = (present < 0 || present >= configs.Count) ? null : configs[present];
                        if (config == null)
@@ -226,8 +247,6 @@
                            var _index = _beforeProperties.IndexOf(config.attType[i]);
                            if (_index == -1 || config.attValue[i] > _beforeConfig.attValue[_index])
                            {
                                propertyUpDict.Add(config.attType[i], config.attValue[i] -
                                    (_index == -1 ? 0 : _beforeConfig.attValue[_index]));
                                propertyCompares.Add(new PropertyCompare()
                                {
                                    key = config.attType[i],
@@ -235,6 +254,8 @@
                                    currentValue = config.attValue[i]
                                });
                            }
                            currentPropertyDict.Add(config.attType[i], config.attValue[i]);
                        }
                        break;
                    case TreasurePrivilege.DemonJarAtk:
@@ -245,7 +266,8 @@
                        {
                            var beforeValue = special.propertyDict[_key] * _beforeLevel / special.progress;
                            var nowValue = special.propertyDict[_key] * _currentLevel / special.progress;
                            propertyUpDict.Add(_key, nowValue - beforeValue);
                            lastPropertyDict.Add(_key, beforeValue);
                            currentPropertyDict.Add(_key, nowValue);
                            propertyCompares.Add(new PropertyCompare()
                            {
                                key = _key,
@@ -255,7 +277,7 @@
                        }
                        break;
                }
                fightPower = UIHelper.GetFightPower(propertyUpDict);
                fightPower = UIHelper.GetFightPower(currentPropertyDict) - UIHelper.GetFightPower(lastPropertyDict);
                if (!WindowCenter.Instance.IsOpen<RealmPropertyUpWin>())
                {
                    WindowCenter.Instance.Open<RealmPropertyUpWin>();