| Core/GameEngine/Model/TelPartialConfig/tagEquipWashConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Dungeon/DungeonAssistWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Dungeon/DungeonAssistWin.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/FindPrecious/FindPreciousBossRebornBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/FindPrecious/FindPreciousModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/ItemTipsModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/OpenServerActivity/OperationWishingWellInfo.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/OpenServerActivity/WishingPoolWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/EquipWashCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/EquipWashModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/WashProModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Strengthening/WashTips.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Model/TelPartialConfig/tagEquipWashConfig.cs
@@ -4,16 +4,19 @@ { public partial class EquipWashConfig : ConfigBase, IConfigPostProcess { private StringBuilder _washComposeID = new StringBuilder(); private static Dictionary<string, EquipWashConfig> equipWashDict = new Dictionary<string, EquipWashConfig>(); private static Dictionary<string,EquipWashData> equipWashDict = new Dictionary<string, EquipWashData>(); public void OnConfigParseCompleted() { _washComposeID.Length = 0; _washComposeID.Append(type); _washComposeID.Append(level); equipWashDict.Add(_washComposeID.ToString(), this); string key = StringUtility.Contact(type,level); EquipWashData washData = new EquipWashData(); washData.guid = key; washData.washConfig = this; washData.mustCosts = ConfigParse.GetMultipleStr<int>(costMoneyList); if(!equipWashDict.ContainsKey(key)) { equipWashDict.Add(key,washData); } } /// <summary> @@ -22,13 +25,19 @@ /// <param name="level"></param> /// <param name="type"></param> /// <returns></returns> public static EquipWashConfig GetCurrentWashEquipModel(int type, int level) public static EquipWashData GetEquipWashData(int type, int level) { string strId = type + level.ToString(); EquipWashConfig equipWash = null; string strId = StringUtility.Contact(type,level); EquipWashData equipWash = null; equipWashDict.TryGetValue(strId, out equipWash); return equipWash; } public class EquipWashData { public string guid; public EquipWashConfig washConfig; public int[] mustCosts; } } } System/Dungeon/DungeonAssistWin.cs
New file @@ -0,0 +1,69 @@ using System; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class DungeonAssistWin : Window { [SerializeField] ScrollerController resultCtrl; [SerializeField] Text assistNumText; [SerializeField] Text dayScoreText; [SerializeField] Text dungeonScoreText; [SerializeField] Button closeBtn; [SerializeField] Button storeBtn; [SerializeField] Button registerBtn; #region Built-in protected override void BindController() { resultCtrl.OnRefreshCell += RefreshResultCell; } protected override void AddListeners() { closeBtn.AddListener(CloseClick); storeBtn.AddListener(ClickStore); registerBtn.AddListener(ClickAssistRegister); } protected override void OnPreOpen() { } protected override void OnAfterOpen() { this.transform.SetAsLastSibling(); } protected override void OnPreClose() { } protected override void OnAfterClose() { } #endregion private void RefreshResultCell(ScrollerDataType type, CellView cell) { } private void ClickAssistRegister() { throw new NotImplementedException(); } private void ClickStore() { throw new NotImplementedException(); } } } System/Dungeon/DungeonAssistWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 89ce153767c4ccb40a9491efb780f620 timeCreated: 1542254377 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/FindPrecious/FindPreciousBossRebornBehaviour.cs
@@ -16,12 +16,14 @@ public class FindPreciousBossRebornBehaviour : MonoBehaviour { [SerializeField] RectTransform m_ContainerBossReborn; [SerializeField] Text m_BossRebornTimer; [SerializeField] Image m_BossIcon; [SerializeField] Text m_BossName; [SerializeField] Text m_BossLevel; [SerializeField] Button m_Goto; [SerializeField] Button m_Close; float timer = 0f; MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } } FindPreciousModel model { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } @@ -33,6 +35,18 @@ { m_Goto.AddListener(GotoKillBoss); m_Close.AddListener(ReportConfirmBossRebornNotify); timer = 0f; DisplayRebornCountDown(); } private void LateUpdate() { timer += Time.deltaTime; if (timer > 1f) { timer = 0f; DisplayRebornCountDown(); } } private void OnDisable() @@ -184,7 +198,7 @@ if (mapConfig.MapFBType == (int)MapType.OpenCountry) { EnterBossHome(config.FloorNum,_bossId); EnterBossHome(config.FloorNum, _bossId); } else { @@ -249,7 +263,7 @@ } } private void EnterBossHome(int _floor,int _bossId) private void EnterBossHome(int _floor, int _bossId) { var error = 0; if (TestEnterBossHomeDungeon(_floor, out error)) @@ -340,6 +354,32 @@ return true; } private void DisplayRebornCountDown() { var bossId = model.currentBossNotify; if (model.IsBossAlive(bossId)) { m_BossRebornTimer.text = Language.Get("BossAlreadyReborn"); } else { FindPreciousModel.BossInfo bossInfo; if (model.TryGetBossInfo(bossId, out bossInfo)) { var rebornCountDown = (int)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds; if (rebornCountDown < 1) { m_BossRebornTimer.text = Language.Get("BossAlreadyReborn"); } else { m_BossRebornTimer.text = Language.Get("BossRebornCountDown", rebornCountDown); } } } } } } System/FindPrecious/FindPreciousModel.cs
@@ -10,7 +10,7 @@ [XLua.LuaCallCSharp] public class FindPreciousModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk, IMapInitOk, ISwitchAccount { public const int PREPOSE_SECONDS = 300; public const int PREPOSE_SECONDS = 120; public const int FINDPRECIOUS_REDPOINTID = 76000; public const int LOOTPRECIOUs_REDPOINTID = 77000; System/KnapSack/Logic/ItemTipsModel.cs
@@ -2283,7 +2283,7 @@ /// <param name="type"></param> /// <param name="lv"></param> /// <param name="values"></param> private EquipWashConfig tagWashModel; private EquipWashConfig.EquipWashData tagWashModel; public void SetWashModel(int type, int lv, int[] values) { washDataDict = null; @@ -2304,23 +2304,26 @@ } washDataDict = new Dictionary<int, int>(); this.tagWashModel = EquipWashConfig.GetCurrentWashEquipModel(type, lv); for (i = 0; i < values.Length; i++) this.tagWashModel = EquipWashConfig.GetEquipWashData(type, lv); if(this.tagWashModel != null) { switch (i) for (i = 0; i < values.Length; i++) { case 0: washDataDict.Add(tagWashModel.attType1, values[0]); break; case 1: washDataDict.Add(tagWashModel.attType2, values[1]); break; case 2: washDataDict.Add(tagWashModel.attType3, values[2]); break; switch (i) { case 0: washDataDict.Add(tagWashModel.washConfig.attType1, values[0]); break; case 1: washDataDict.Add(tagWashModel.washConfig.attType2, values[1]); break; case 2: washDataDict.Add(tagWashModel.washConfig.attType3, values[2]); break; } } } } //设置弹框的宝石数据 System/OpenServerActivity/OperationWishingWellInfo.cs
@@ -37,9 +37,37 @@ public int GetActivityDay() { int dayIndex = IndexOfDays(TimeUtility.ServerNow); if(resetType == 0) { return dayIndex + 1; } else if(resetType == 1) { if(IsLastDay) { return dayIndex; } else { return dayIndex + 1; } } return dayIndex + 1; } public int GetActivitySumDay() { if(resetType == 0) { return totalDays + 1; } else if(resetType == 1) { return totalDays; } return totalDays; } public void ParsePackage(HAA19_tagMCActWishingWellInfo package) { for (int i = 0; i < package.Count; i++) System/OpenServerActivity/WishingPoolWin.cs
@@ -91,7 +91,7 @@ UpdateActivityState(); UpdateDayRemainTime(); activityDayText.text = Language.Get("WishingPool103", operation.GetActivityDay()); totalDayText.text = Language.Get("WishingPool101", Language.Get(StringUtility.Contact("Num_CHS_", operation.totalDays + 1))); totalDayText.text = Language.Get("WishingPool101", Language.Get(StringUtility.Contact("Num_CHS_", operation.GetActivitySumDay()))); handImg.gameObject.SetActive(false); playTimes = 0; handAlpha.DOKill(); System/Strengthening/EquipWashCell.cs
@@ -23,7 +23,7 @@ public void SetDisplayModel(WashProCount washPro, int repointId, int index, int selectIndex) { ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, washPro.EquipPlace); EquipWashConfig washModel = EquipWashConfig.GetCurrentWashEquipModel(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV); var washModel = EquipWashConfig.GetEquipWashData(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV); washRedpoint.redpointId = repointId; if (itemModel != null && washModel != null) { @@ -34,7 +34,7 @@ nameText.text = UIHelper.AppendStringColor(itemModel.chinItemModel.ItemColor, itemModel.chinItemModel.ItemName, true); //pdr ToDo itemCell.Init(itemModel); washLevelText.text = equipWashModel.GetCurWashLvStr(washPro, washModel); washLevelText.text = equipWashModel.GetCurWashLvStr(washPro, washModel.washConfig); } else { System/Strengthening/EquipWashModel.cs
@@ -93,6 +93,7 @@ public override void Init() { ParseFuncConfig(); _equipWashLimitDict.Clear(); FuncConfigConfig washGroup1Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup1"); FuncConfigConfig washGroup2Model = Config.Instance.Get<FuncConfigConfig>("EquipWashGroup2"); @@ -158,6 +159,15 @@ PlayerPrefs.DeleteKey(MasterGroup3RaiseKey); CheckIsMasterLv(); } #region 解析本地数据 public int mustWashMatId { get; private set;} private void ParseFuncConfig() { var equipWashMustID = Config.Instance.Get<FuncConfigConfig>("EquipWashMustID"); mustWashMatId = int.Parse(equipWashMustID.Numerical1); } #endregion public int[] washPlacelist { get; private set; } public List<WashProCount> washProlist { get; private set; } @@ -600,10 +610,12 @@ for (i = 0; i < orderWashProlist.Count; i++) { ItemModel model = playerPack.GetItemModelByIndex(PackType.rptEquip, orderWashProlist[i].EquipPlace); EquipWashConfig washModel = EquipWashConfig.GetCurrentWashEquipModel(OnGetWashType(orderWashProlist[i].EquipPlace), orderWashProlist[i].XLAttrLV); var washModel = EquipWashConfig.GetEquipWashData(OnGetWashType(orderWashProlist[i].EquipPlace), orderWashProlist[i].XLAttrLV); if (model != null && washModel != null) { if (IsCanWash(model) && IsEnoughMat(washModel) && !IsWashFull(model, orderWashProlist[i], washModel) if (IsCanWash(model) && IsEnoughMat(washModel.washConfig) && !IsWashFull(model, orderWashProlist[i], washModel.washConfig) && FuncOpen.Instance.IsFuncOpen(91)) { RedpointWashDict.Add(i, orderWashProlist[i]); System/Strengthening/WashProModel.cs
@@ -76,7 +76,8 @@ this.washPro = washPro; this.isPerfect = false; this.preViewStr = ""; this._preTagWashModel = EquipWashConfig.GetCurrentWashEquipModel(washModel.type, washPro.XLAttrLV -1); var equipWashData = EquipWashConfig.GetEquipWashData(washModel.type, washPro.XLAttrLV - 1); this._preTagWashModel = equipWashData == null ? null : equipWashData.washConfig; switch (attrType) { case WashAttrType.attack: System/Strengthening/WashTips.cs
@@ -47,9 +47,9 @@ #endregion private WashProCount _washProModel; private EquipWashConfig _tagWashModel; private EquipWashConfig.EquipWashData _tagWashModel; private ItemModel _itemModel; //洗练的装备 private List<string> _costMoneylist = null; private int[] _costMoneylist = null; private int _costmoney = 0; public int CostMoney { @@ -168,8 +168,10 @@ ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip,washPro.EquipPlace); if(itemModel != null) { EquipWashConfig washModel = EquipWashConfig.GetCurrentWashEquipModel(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV); if (equipWashModel.IsEnoughMat(washModel) && equipWashModel.IsCanWash(itemModel)) var washModel = EquipWashConfig.GetEquipWashData(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV); if (washModel!= null && equipWashModel.IsEnoughMat(washModel.washConfig) && equipWashModel.IsCanWash(itemModel)) { jumpToWashId = washPro.EquipPlace; isWash = true; @@ -269,13 +271,13 @@ } } ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, washPro.EquipPlace); EquipWashConfig washModel = EquipWashConfig.GetCurrentWashEquipModel(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV); var washModel = EquipWashConfig.GetEquipWashData(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV); _washProModel = washPro; _tagWashModel = washModel; _costMoneylist = GetToolsList(_tagWashModel.costMoneyList, _costMoneylist); washAttrModel.SetUIModel(washModel, washPro, WashAttrType.attack); washAttrModel.SetUIModel(washModel, washPro, WashAttrType.life); washAttrModel.SetUIModel(washModel, washPro, WashAttrType.ignoredefence); _costMoneylist = _tagWashModel.mustCosts; washAttrModel.SetUIModel(washModel.washConfig, washPro, WashAttrType.attack); washAttrModel.SetUIModel(washModel.washConfig, washPro, WashAttrType.life); washAttrModel.SetUIModel(washModel.washConfig, washPro, WashAttrType.ignoredefence); _attackWashPro.RefreshUI(WashAttrType.attack); _lifeWashPro.RefreshUI(WashAttrType.life); _ignoreDefenceWashPro.RefreshUI(WashAttrType.ignoredefence); @@ -289,12 +291,12 @@ _washLevelTitle.text = Language.Get("EquipWash108", washPro.XLAttrLV); } _costMatCell.gameObject.SetActive(true); ItemCellModel cellModel = new ItemCellModel(washModel.costItem); ItemCellModel cellModel = new ItemCellModel(washModel.washConfig.costItem); _costMatCell.Init(cellModel); _costMatCell.cellBtn.RemoveAllListeners(); _costMatCell.cellBtn.onClick.AddListener(() => { itemPathModel.SetChinItemModel(washModel.costItem); itemPathModel.SetChinItemModel(washModel.washConfig.costItem); }); #region 刷新物品UI @@ -336,11 +338,11 @@ return; _costMatCell.countText.gameObject.SetActive(true); int bagItemCount = singlePack.GetItemCountByID(_tagWashModel.costItem); if (bagItemCount >= _tagWashModel.costCount) _costMatCell.countText.text = UIHelper.AppendStringColor(TextColType.Green, bagItemCount.ToString(),true) + "/" + _tagWashModel.costCount; int bagItemCount = singlePack.GetItemCountByID(_tagWashModel.washConfig.costItem); if (bagItemCount >= _tagWashModel.washConfig.costCount) _costMatCell.countText.text = UIHelper.AppendStringColor(TextColType.Green, bagItemCount.ToString(),true) + "/" + _tagWashModel.washConfig.costCount; else _costMatCell.countText.text = UIHelper.AppendStringColor(TextColType.Red, bagItemCount.ToString()) + "/" + _tagWashModel.costCount; _costMatCell.countText.text = UIHelper.AppendStringColor(TextColType.Red, bagItemCount.ToString()) + "/" + _tagWashModel.washConfig.costCount; } @@ -351,11 +353,26 @@ contain_Default.SetActive(!isMustAdd); if (!isMustAdd) { UpdateItemCell(_tagWashModel.costItem,_costMatCell,_tagWashModel.costCount); UpdateItemCell(_tagWashModel.washConfig.costItem,_costMatCell,_tagWashModel.washConfig.costCount); } else { UpdateItemCell(_tagWashModel.costItem, contain_Cost_NormalItem, _tagWashModel.costCount); UpdateItemCell(_tagWashModel.washConfig.costItem, contain_Cost_NormalItem, _tagWashModel.washConfig.costCount); UpdateItemCell(equipWashModel.mustWashMatId, contain_Cost_MustAddItem, GetMustAddNum()); } } private void UpdateMustWashCostMoney() { int costMatId = equipWashModel.mustWashMatId; int costNum = GetMustAddCost(); int haveNum = playerPack.GetItemCountByID(PackType.rptItem,costMatId); var storeConfig = StoreConfig.GetStoreCfg(costMatId, 1); int matPrice = storeConfig == null ? 0 : storeConfig.MoneyNumber; int costMoney = 0; if(haveNum < costNum) { costMoney = (costNum - haveNum) * matPrice; } } @@ -382,6 +399,10 @@ }); } /// <summary> /// 获得勾选几条必增数量 /// </summary> /// <returns></returns> public int GetMustAddNum() { int needAddCount = 0; @@ -402,36 +423,23 @@ return needAddCount; } /// <summary> /// 获得必增消耗的数量 /// </summary> /// <returns></returns> public int GetMustAddCost() { if (_tagWashModel == null) return 0; int mustAddNum = GetMustAddNum(); int index = mustAddNum - 1; return mustAddNum > _tagWashModel.mustCosts.Length ? 0 : _tagWashModel.mustCosts[index]; } //刷新仙玉 public void RefreshCostMoney() { int needAddCount = 0; if (_attackWashPro.toggleIsOn) needAddCount += 1; if (_lifeWashPro.toggleIsOn) needAddCount += 1; if (_ignoreDefenceWashPro.toggleIsOn) needAddCount += 1; if (needAddCount == 0) { CostMoney = 0; } else if (needAddCount == 1) { CostMoney = int.Parse(GetCostMoneyList()[0]); } else if (needAddCount == 2) { CostMoney = int.Parse(GetCostMoneyList()[1]); } else if (needAddCount == 3) { CostMoney = int.Parse(GetCostMoneyList()[2]); } CostMoney = GetMustAddCost(); int goldCount = (int)PlayerDatas.Instance.baseData.Gold; if (goldCount >= CostMoney) { @@ -530,7 +538,7 @@ { if (equipWashModel.IsSaveWashValue(_washProModel)) { if (equipWashModel.IsWashFull(_itemModel, _washProModel, _tagWashModel)) if (equipWashModel.IsWashFull(_itemModel, _washProModel, _tagWashModel.washConfig)) { if(_washProModel.XLAttrLV >= equipWashModel.GetMaxWashLv(_itemModel.chinItemModel.EquipPlace) && _washProModel.XLAttrLV <= equipWashModel.GetWashFullLv(_itemModel.chinItemModel.EquipPlace, _itemModel.chinItemModel.LV)) @@ -613,7 +621,7 @@ { int goldCount = (int)PlayerDatas.Instance.baseData.Gold; if (equipWashModel.IsEnoughMat(_tagWashModel)) if (equipWashModel.IsEnoughMat(_tagWashModel.washConfig)) { if (CostMoney > 0) { @@ -658,7 +666,7 @@ } else { itemPathModel.SetChinItemModel(_tagWashModel.costItem); itemPathModel.SetChinItemModel(_tagWashModel.washConfig.costItem); } } else @@ -737,14 +745,6 @@ { } #endregion public List<string> GetCostMoneyList() { if (_costMoneylist != null) return _costMoneylist; else return null; } private List<string> GetToolsList(string tools, List<string> toolslist) {