少年修仙传客户端代码仓库
Client_PangDeRong
2018-10-26 9a8b16b531e4a58ae4779eb0de33aeef7efd430b
2232 加点道具使用时,显示可洗点数为0点
2个文件已修改
43 ■■■■■ 已修改文件
System/KnapSack/Logic/PackSendQuestMgr.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/WashAttrPointWin.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/PackSendQuestMgr.cs
@@ -93,6 +93,7 @@
            get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
        }
        RolePointModel rolePointModel { get { return ModelCenter.Instance.GetModel<RolePointModel>(); } }
        DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
@@ -328,7 +329,7 @@
                                foreach (var key in sumOffsetlist.Keys)
                                {
                                    PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshFreePoint;
                                    //rolePointModel.SendAddPoint((int)key, (int)sumOffsetlist[key]);
                                    rolePointModel.SendAddPoint((int)key, (int)sumOffsetlist[key]);
                                }
                            }
                            else
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);