| System/EquipStar/EquipStarEffectTipModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipStar/EquipStarEffectTipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipStar/EquipStarWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/ItemTip/EquipTipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/ItemTip/ItemTipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/ItemTip/PetMountTipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/ItemTip/SpiritWeaponTipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/EquipStar/EquipStarEffectTipModel.cs
@@ -39,7 +39,7 @@ if (equipPosition.y >= 1 && equipPosition.y <= 8) { var effectInfos = new Dictionary<int, List<SuitEffectInfo>>(); var effectInfos = new Dictionary<int, List<SuitEffectInfo>>(); var configs = EquipSuitConfig.GetConfigs(PlayerDatas.Instance.baseData.Job, equipPosition.x, EquipSuitType.EightSuit); for (int i = 0; i < 10; i += 3) @@ -179,6 +179,128 @@ return effectInfos; } public List<string> GetNextTwoSpecialEffect(Int2 equipPosition) { var specialEffects = new List<string>(); var maxStarLevel = EquipStarModel.GetMaxStarLevel(equipPosition.x); var starLevel = starModel.GetStarLevel(equipPosition); if (starLevel == maxStarLevel) { var suitLevel = starLevel - starLevel % 3; specialEffects.Add(string.Format("【{0}星】{1}星套装效果(推荐)】", GetStarNumberCHS(starLevel), GetStarNumberCHS(suitLevel))); var equipStarConfig = EquipStarConfig.Get(equipPosition.x, equipPosition.y, starLevel); var property = equipStarConfig.StarAttrInfo[equipStarConfig.StarAttrInfo.Length - 1]; specialEffects.Add(string.Format("【{0}星】{1}", GetStarNumberCHS(starLevel), PlayerPropertyConfig.GetFullDescription(property.x, property.y) )); return specialEffects; } if (equipPosition.y >= 1 && equipPosition.y <= 8) { if (starLevel % 3 == 2) { var suitLevel = starLevel - starLevel % 3; specialEffects.Add(string.Format("【{0}星】{1}星套装效果(推荐)】", GetStarNumberCHS(starLevel + 1), GetStarNumberCHS(suitLevel))); } var nowStarConfig = EquipStarConfig.Get(equipPosition.x, equipPosition.y, starLevel); var nextStarConfig = EquipStarConfig.Get(equipPosition.x, equipPosition.y, starLevel + 1); if (nowStarConfig == null || nowStarConfig.StarAttrInfo.Length != nextStarConfig.StarAttrInfo.Length) { var property = nextStarConfig.StarAttrInfo[nextStarConfig.StarAttrInfo.Length - 1]; specialEffects.Add(string.Format("【{0}星】{1}", GetStarNumberCHS(starLevel + 1), PlayerPropertyConfig.GetFullDescription(property.x, property.y) )); } if (specialEffects.Count >= 2) { return specialEffects; } var strengthType = EquipStrengthModel.GetEquipStrengthType(equipPosition.y); var nowStrengthLevel = strengthModel.GetEquipLevelMax(strengthType, starLevel); var nextStrengthLevel = strengthModel.GetEquipLevelMax(strengthType, starLevel + 1); if (nowStrengthLevel != nextStrengthLevel) { specialEffects.Add(string.Format("【{0}星】{1}", GetStarNumberCHS(starLevel + 1), string.Format("强化等级提升至{0}", nextStrengthLevel) )); } if (specialEffects.Count >= 2) { return specialEffects; } if (starLevel == 1 || starLevel == 4) { specialEffects.Add(string.Format("【{0}星】{1}", GetStarNumberCHS(starLevel + 1), string.Format("解锁宝石孔{0}", GetStarNumberCHS(starLevel == 1 ? 1 : 2)) )); } if (specialEffects.Count >= 2) { return specialEffects; } var type = EquipTrainModel.GetTrainType(equipPosition.y); var nowConfig = WashLevelMaxConfig.Get(type, starLevel); var nowTrainLevel = nowConfig.levelMax; var nextConfig = WashLevelMaxConfig.Get(type, starLevel + 1); var nextTrainLevel = nextConfig.levelMax; if (nowTrainLevel != nextTrainLevel) { specialEffects.Add(string.Format("【{0}星】{1}", GetStarNumberCHS(starLevel + 1), string.Format("洗炼等级提升至{0}", nextTrainLevel) )); } } return specialEffects; } public static string GetStarNumberCHS(int star) { switch (star) { case 0: return "零"; case 1: return "一"; case 2: return "二"; case 3: return "三"; case 4: return "四"; case 5: return "五"; case 6: return "六"; case 7: return "七"; case 8: return "八"; case 9: return "九"; default: return ""; } } public struct SuitEffectInfo { public int star; System/EquipStar/EquipStarEffectTipWin.cs
@@ -90,7 +90,10 @@ { var info = effectInfos[i]; var property = PlayerPropertyConfig.GetFullDescription(info.property.x, info.property.y); descriptions[i] = StringUtility.Contact("【{0}星】 {1}", GetStarNumberCHS(info.star), property); descriptions[i] = string.Format("【{0}星】 {1}", EquipStarEffectTipModel.GetStarNumberCHS(info.star), property); descriptions[i] = info.actived ? UIHelper.AppendColor(TextColType.Green, descriptions[i]) : UIHelper.AppendColor(TextColType.White, descriptions[i]); } @@ -105,7 +108,10 @@ for (var i = 0; i < descriptions.Length; i++) { var info = effectInfos[i]; descriptions[i] = StringUtility.Contact("【{0}星】 解锁宝石孔{1}", GetStarNumberCHS(info.star), GetStarNumberCHS(info.index)); descriptions[i] = string.Format("【{0}星】 解锁宝石孔{1}", EquipStarEffectTipModel.GetStarNumberCHS(info.star), EquipStarEffectTipModel.GetStarNumberCHS(info.index)); descriptions[i] = info.actived ? UIHelper.AppendColor(TextColType.Green, descriptions[i]) : UIHelper.AppendColor(TextColType.White, descriptions[i]); } @@ -120,7 +126,9 @@ for (var i = 0; i < descriptions.Length; i++) { var info = effectInfos[i]; descriptions[i] = StringUtility.Contact("【{0}星】 提升至{1}", GetStarNumberCHS(info.star), info.level); descriptions[i] = string.Format("【{0}星】 提升至{1}", EquipStarEffectTipModel.GetStarNumberCHS(info.star), info.level); descriptions[i] = info.actived ? UIHelper.AppendColor(TextColType.Green, descriptions[i]) : UIHelper.AppendColor(TextColType.White, descriptions[i]); } @@ -130,37 +138,19 @@ private void DisplayTrainLimit() { } private string GetStarNumberCHS(int star) { switch (star) var effectInfos = model.GetTrainLevelInfos(model.equipPosition); var descriptions = new string[effectInfos.Count]; for (var i = 0; i < descriptions.Length; i++) { case 0: return "零"; case 1: return "一"; case 2: return "二"; case 3: return "三"; case 4: return "四"; case 5: return "五"; case 6: return "六"; case 7: return "七"; case 8: return "八"; case 9: return "九"; default: return ""; var info = effectInfos[i]; descriptions[i] = string.Format("【{0}星】 提升至{1}", EquipStarEffectTipModel.GetStarNumberCHS(info.star), info.level); descriptions[i] = info.actived ? UIHelper.AppendColor(TextColType.Green, descriptions[i]) : UIHelper.AppendColor(TextColType.White, descriptions[i]); } m_TrainLimit.text = string.Join("\n", descriptions); } [System.Serializable] System/EquipStar/EquipStarWin.cs
@@ -41,6 +41,7 @@ EquipStarModel model { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } EquipStarEffectTipModel starEffectTipModel { get { return ModelCenter.Instance.GetModel<EquipStarEffectTipModel>(); } } #region Built-in protected override void BindController() @@ -51,6 +52,11 @@ protected override void AddListeners() { m_StarUpgrade.SetListener(StarUpgrade); m_Preview.SetListener(() => { var equipStarEffectTipModel = ModelCenter.Instance.GetModel<EquipStarEffectTipModel>(); equipStarEffectTipModel.Preview(new Int2(model.selectedLevel.value, model.selectedPlace.value)); }); } protected override void OnPreOpen() @@ -314,30 +320,14 @@ private void DisplayLevelUpProperty(Int2 equipPosition, int currentStar, int nextStar) { var configs = EquipStarConfig.GetConfigs(equipPosition.x, equipPosition.y); var levelUpProperties = new Dictionary<int, Int2>(); var prePropertiesCount = 0; foreach (var config in configs) { if (config.StarAttrInfo.Length > prePropertiesCount) { var length = config.StarAttrInfo.Length; levelUpProperties[config.Star] = config.StarAttrInfo[length - 1]; prePropertiesCount = config.StarAttrInfo.Length; } } var keys = new List<int>(levelUpProperties.Keys); var descriptions = starEffectTipModel.GetNextTwoSpecialEffect(equipPosition); for (var i = 0; i < m_LevelUpPropertys.Length; i++) { var behaviour = m_LevelUpPropertys[i]; if (i < keys.Count) if (i < descriptions.Count) { var star = keys[i]; var property = levelUpProperties[star]; behaviour.gameObject.SetActive(true); behaviour.text = string.Format("【{0}星】{1}", star, PlayerPropertyConfig.GetFullDescription(property)); behaviour.color = UIHelper.GetUIColor(currentStar >= star ? TextColType.Green : TextColType.Gray); behaviour.text = descriptions[i]; } else { @@ -508,7 +498,7 @@ { public RectTransform container; public Text current; public Image arrow; public RectTransform arrow; public Text next; public void Display(int propertyId, int currentValue, int nextValue) System/ItemTip/EquipTipWin.cs
@@ -261,7 +261,7 @@ auctionTipWidget.gameObject.SetActive(data.baseInfo.isAuction); if (data.baseInfo.isAuction) { var overdueTime = DateTime.Now.AddSeconds((double)data.baseInfo.auctionSurplusTime); var overdueTime = TimeUtility.ServerNow.AddSeconds((double)data.baseInfo.auctionSurplusTime); auctionTipWidget.Display(overdueTime); } System/ItemTip/ItemTipWin.cs
@@ -120,7 +120,7 @@ m_AuctionWidget.gameObject.SetActive(data.baseInfo.isAuction); if (data.baseInfo.isAuction) { var overdueTime = DateTime.Now.AddSeconds((double)data.baseInfo.auctionSurplusTime); var overdueTime = TimeUtility.ServerNow.AddSeconds((double)data.baseInfo.auctionSurplusTime); m_AuctionWidget.Display(overdueTime); } } System/ItemTip/PetMountTipWin.cs
@@ -113,7 +113,7 @@ m_AuctionWidget.gameObject.SetActive(baseInfo.isAuction); if (baseInfo.isAuction) { var overdueTime = DateTime.Now.AddSeconds((double)baseInfo.auctionSurplusTime); var overdueTime = TimeUtility.ServerNow.AddSeconds((double)baseInfo.auctionSurplusTime); m_AuctionWidget.Display(overdueTime); } } System/ItemTip/SpiritWeaponTipWin.cs
@@ -102,7 +102,7 @@ m_AuctionTipWidget.gameObject.SetActive(baseInfo.isAuction); if (baseInfo.isAuction) { var overdueTime = DateTime.Now.AddSeconds((double)baseInfo.auctionSurplusTime); var overdueTime = TimeUtility.ServerNow.AddSeconds((double)baseInfo.auctionSurplusTime); m_AuctionTipWidget.Display(overdueTime); } }