少年修仙传客户端代码仓库
client_linchunjie
2018-09-03 adec40e7f8774712eadb0c3845e18d5a16dbc792
3032【前端】宗门试练兑换界面优化
4个文件已修改
45 ■■■■ 已修改文件
Core/GameEngine/Model/Config/TrialExchangeConfig.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TrialExchangeConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialDungeonModel.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialExchangeBehaviour.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TrialExchangeConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Monday, August 20, 2018
//    [  Date ]:           Monday, September 03, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -18,6 +18,7 @@
        public int tokenId { get ; private set ; }
        public int tokenCount { get ; private set ; }
        public string description { get ; private set; } 
        public string chestDesc { get ; private set; }
        public override string getKey()
        {
@@ -45,6 +46,8 @@
                tokenCount=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; 
            
                description = rawContents[6].Trim();
                chestDesc = rawContents[7].Trim();
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/TrialExchangeConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 95c6c6944c394ac4381e86d9ce3006fb
timeCreated: 1534744580
timeCreated: 1535958653
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Dungeon/TrialDungeonModel.cs
@@ -209,17 +209,17 @@
            {
                NewBieCenter.Instance.RemoveNewBieGuide(TRIALEXCHANGE_GUIDE);
            }
            var tokenConfig = Config.Instance.Get<ItemConfig>(config.tokenId);
            ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
                Language.Get("TokenUseConfirm", config.tokenCount, tokenConfig.ItemName, config.description), (bool isOk) =>
                   {
                       if (isOk)
                       {
            //var tokenConfig = Config.Instance.Get<ItemConfig>(config.tokenId);
            //ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
            //    Language.Get("TokenUseConfirm", config.tokenCount, tokenConfig.ItemName, config.description), (bool isOk) =>
            //       {
            //           if (isOk)
            //           {
                           CA32F_tagCMTrialExchange pak = new CA32F_tagCMTrialExchange();
                           pak.ID = (uint)_id;
                           GameNetSystem.Instance.SendInfo(pak);
                       }
                   });
            //           }
            //       });
            return true;
        }
System/Dungeon/TrialExchangeBehaviour.cs
@@ -15,6 +15,7 @@
        [SerializeField] ItemCell m_Item;
        [SerializeField] Text m_Description;
        [SerializeField] Text m_SpecialDescription;
        [SerializeField] Text m_ChestDescription;
        [SerializeField] ItemBehaviour m_Token;
        [SerializeField] LongPressButton m_Exchange;
        [SerializeField] Image m_Redpoint;
@@ -37,16 +38,27 @@
            if (trialExchangeId != 0)
            {
                int error = 0;
                var config = Config.Instance.Get<TrialExchangeConfig>(trialExchangeId);
                if (config != null)
                {
                    var itemConfig = Config.Instance.Get<ItemConfig>(model.GetExchangeItemByJob(config));
                    ItemAttrData itemAttrData = new ItemAttrData(itemConfig.ID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind);
                    ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData, false);
                    ModelCenter.Instance.GetModel<ItemTipsModel>().curAttrData.SetTipsFuncBtn(ItemWinBtnType.exchange,
                        (ItemWinBtnType btnType, string value) =>
                     {
                         if (btnType == ItemWinBtnType.exchange)
                         {
                if (!model.TrialSendExchange(trialExchangeId, out error))
                {
                    if (error == 1)
                    {
                        var config = Config.Instance.Get<TrialExchangeConfig>(trialExchangeId);
                        if (config != null)
                        {
                            ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.tokenId);
                        }
                    }
                         }
                     });
                    ModelCenter.Instance.GetModel<ItemTipsModel>().ShowUICtrl();
                }
            }
        }
@@ -95,6 +107,10 @@
            {
                m_SpecialDescription.text = config.description;
            }
            if (m_ChestDescription != null)
            {
                m_ChestDescription.text = config.chestDesc;
            }
            m_Token.SetItem(config.tokenId, config.tokenCount);
            var count = model.GetTrialTokenCount(config.tokenId);
            m_Token.count.text = StringUtility.Contact(count >= config.tokenCount ? "<color=#35e112>" : string.Empty, count,