少年修仙传客户端代码仓库
client_Wu Xijin
2018-10-26 82931aabaaa3e479bc04e11630a77cd9c9dd5fe3
System/KnapSack/Logic/WashAttrPointWin.cs
@@ -2,6 +2,7 @@
using UnityEngine.UI;
using TableConfig;
using System;
using System.Collections.Generic;
namespace Snxxz.UI
{
@@ -109,22 +110,29 @@
        private void RefreshWashAttrDes()
        {
            //float initPoint = rolePointModel.GetPointCreate(PlayerDatas.Instance.baseData.Job)[(int)selectAttr];
            //switch (selectAttr)
            //{
            //    case AttrEnum.POWER:
            //        washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseSTR) - initPoint;
            //        break;
            //    case AttrEnum.AGILITY:
            //        washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePHY) - initPoint;
            //        break;
            //    case AttrEnum.PHYSIQUE:
            //        washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseCON) - initPoint;
            //        break;
            //    case AttrEnum.MENTALITY:
            //        washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePNE) - initPoint;
            //        break;
            //}
            var model = ModelCenter.Instance.GetModel<RolePointModel>();
            Dictionary<int, int> dict = null;
            bool isContain = model.TryGetPointInit(PlayerDatas.Instance.baseData.Job,out dict);
            float initPoint = 0;
            if(isContain && dict.ContainsKey((int)selectAttr))
            {
                initPoint = dict[(int)selectAttr];
            }
            switch (selectAttr)
            {
                case AttrEnum.POWER:
                    washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseSTR) - initPoint;
                    break;
                case AttrEnum.AGILITY:
                    washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePHY) - initPoint;
                    break;
                case AttrEnum.PHYSIQUE:
                    washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseCON) - initPoint;
                    break;
                case AttrEnum.MENTALITY:
                    washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePNE) - initPoint;
                    break;
            }
            PlayerPropertyConfig propertyConfig = Config.Instance.Get<PlayerPropertyConfig>((int)selectAttr);
            washAttrDesText.text = Language.Get("BagWin_Washpoint2", propertyConfig.Name, UIHelper.GetPropertyMapPlayerData(selectAttr), washPoint);