| | |
| | | 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;
|
| | |
| | | {
|
| | | activateType = ActivateFunc.Realm;
|
| | | propertyCompares.Clear();
|
| | | propertyUpDict.Clear();
|
| | | currentPropertyDict.Clear();
|
| | | lastPropertyDict.Clear();
|
| | | beforeLv = _lv - 1;
|
| | | currentLv = _lv;
|
| | | var _beforeConfig = Config.Instance.Get<RealmConfig>(_lv - 1);
|
| | |
| | | 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++)
|
| | |
| | | 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],
|
| | |
| | | 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>())
|
| | |
| | | beforeLv = _beforeLv;
|
| | | skills.Clear();
|
| | | propertyCompares.Clear();
|
| | | propertyUpDict.Clear();
|
| | | lastPropertyDict.Clear();
|
| | | currentPropertyDict.Clear();
|
| | |
|
| | | var _model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | if (_model.godWeaponSkillDict.ContainsKey(_type))
|
| | |
| | | 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++)
|
| | |
| | | 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],
|
| | |
| | | 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++)
|
| | |
| | | {
|
| | | activateType = ActivateFunc.Stove;
|
| | | propertyCompares.Clear();
|
| | | propertyUpDict.Clear();
|
| | | currentPropertyDict.Clear();
|
| | | lastPropertyDict.Clear();
|
| | | skills.Clear();
|
| | | beforeLv = stoveLv - 1;
|
| | | currentLv = stoveLv;
|
| | |
| | | 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++)
|
| | |
| | | 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],
|
| | |
| | | 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>())
|
| | |
| | | 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))
|
| | |
| | | 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)
|
| | |
| | | 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],
|
| | |
| | | currentValue = config.attValue[i]
|
| | | });
|
| | | }
|
| | |
|
| | | currentPropertyDict.Add(config.attType[i], config.attValue[i]);
|
| | | }
|
| | | break;
|
| | | case TreasurePrivilege.DemonJarAtk:
|
| | |
| | | {
|
| | | 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,
|
| | |
| | | }
|
| | | break;
|
| | | }
|
| | | fightPower = UIHelper.GetFightPower(propertyUpDict);
|
| | | fightPower = UIHelper.GetFightPower(currentPropertyDict) - UIHelper.GetFightPower(lastPropertyDict);
|
| | | if (!WindowCenter.Instance.IsOpen<RealmPropertyUpWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmPropertyUpWin>();
|