| | |
| | | using System.Linq; |
| | | using LitJson; |
| | | using UnityEngine; |
| | | using LitJson; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | |
| | | private List<int> equipBaseProperties = new List<int>(); |
| | | private Dictionary<int, int> promptUseLimitDict; |
| | | private Dictionary<int, List<int>> betterEquipExceptDungeonDict; |
| | | Dictionary<int, int> equipSkillScores = new Dictionary<int, int>(); |
| | | |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | BuffModel buffDatas { get { return ModelCenter.Instance.GetModel<BuffModel>(); } } |
| | |
| | | PetModel petDatas { get { return ModelCenter.Instance.GetModel<PetModel>(); } } |
| | | StrengthenModel strengthDatas { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } } |
| | | MagicianModel magicianModel { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } } |
| | | TrialDungeonModel trialModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } } |
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | |
| | |
| | | var GSFormulaConfig = FuncConfigConfig.Get("EquipGSFormula"); |
| | | dogzGSFormula = GSFormulaConfig.Numerical3; |
| | | normalGSFormula = GSFormulaConfig.Numerical1; |
| | | |
| | | var equipSkillScoreJson = JsonMapper.ToObject(GSFormulaConfig.Numerical4); |
| | | foreach (var key in equipSkillScoreJson.Keys) |
| | | { |
| | | var skillId = 0; |
| | | int.TryParse(key, out skillId); |
| | | if (skillId != 0) |
| | | { |
| | | equipSkillScores[skillId] = (int)equipSkillScoreJson[key]; |
| | | } |
| | | } |
| | | |
| | | var baseAttr = JsonMapper.ToObject(GSFormulaConfig.Numerical2); |
| | | if (baseAttr.IsArray) |
| | |
| | | type = GeneralDefine.GetPackTypeByItemType(config.Type); |
| | | } |
| | | |
| | | var skillScore = 0; |
| | | if (config.AddSkill1 != 0 && equipSkillScores.ContainsKey(config.AddSkill1)) |
| | | { |
| | | skillScore += equipSkillScores[config.AddSkill1]; |
| | | } |
| | | |
| | | if (config.AddSkill2 != 0 && equipSkillScores.ContainsKey(config.AddSkill2)) |
| | | { |
| | | skillScore += equipSkillScores[config.AddSkill2]; |
| | | } |
| | | |
| | | switch (type) |
| | | { |
| | | case PackType.DogzEquip: |
| | | case PackType.DogzItem: |
| | | return Equation.Instance.Eval<int>(dogzGSFormula); |
| | | default: |
| | | return Equation.Instance.Eval<int>(normalGSFormula); |
| | | return skillScore + Equation.Instance.Eval<int>(normalGSFormula); |
| | | } |
| | | } |
| | | |