| Core/GameEngine/Model/Config/TrialExchangeConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/Config/TrialExchangeConfig.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Dungeon/TrialDungeonModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Dungeon/TrialExchangeBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Model/Config/TrialExchangeConfig.cs
@@ -1,16 +1,16 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, August 20, 2018 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class TrialExchangeConfig : ConfigBase { //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, September 03, 2018 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class TrialExchangeConfig : ConfigBase { public int id { get ; private set ; } public int[] exchangeItemID; public int exchangeItemCount { get ; private set ; } @@ -18,15 +18,16 @@ public int tokenId { get ; private set ; } public int tokenCount { get ; private set ; } public string description { get ; private set; } public override string getKey() { return id.ToString(); } public override void Parse() { try { public string chestDesc { get ; private set; } public override string getKey() { return id.ToString(); } public override void Parse() { try { id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; string[] exchangeItemIDStringArray = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); @@ -45,17 +46,19 @@ tokenCount=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; description = rawContents[6].Trim(); } catch (Exception ex) { DebugEx.Log(ex); } } } } chestDesc = rawContents[7].Trim(); } catch (Exception ex) { DebugEx.Log(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) { CA32F_tagCMTrialExchange pak = new CA32F_tagCMTrialExchange(); pak.ID = (uint)_id; GameNetSystem.Instance.SendInfo(pak); } }); //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; if (!model.TrialSendExchange(trialExchangeId, out error)) var config = Config.Instance.Get<TrialExchangeConfig>(trialExchangeId); if (config != null) { if (error == 1) { var config = Config.Instance.Get<TrialExchangeConfig>(trialExchangeId); if (config != null) { ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(config.tokenId); } } 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) { 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,