Core/GameEngine/Model/Config/EquipStarConfig.cs
@@ -1,6 +1,6 @@ //-------------------------------------------------------- // [Author]: Fish // [ Date ]: Wednesday, July 17, 2019 // [ Date ]: 2023年10月18日 //-------------------------------------------------------- using System.Collections.Generic; @@ -8,7 +8,6 @@ using System.Threading; using System; using UnityEngine; public partial class EquipStarConfig { @@ -23,7 +22,7 @@ public readonly int CostEquipCnt; public readonly int UnSuitRate; public readonly int SuitRate; public readonly Int2 CostItemDict; public readonly Int2[] CostItemDict; public readonly Int2[] StarAttrInfo; public readonly Int2[] BaseAttrInfo; @@ -67,7 +66,12 @@ int.TryParse(tables[9],out SuitRate); Int2.TryParse(tables[10],out CostItemDict); string[] CostItemDictStringArray = tables[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); CostItemDict = new Int2[CostItemDictStringArray.Length]; for (int i=0;i<CostItemDictStringArray.Length;i++) { Int2.TryParse(CostItemDictStringArray[i],out CostItemDict[i]); } string[] StarAttrInfoStringArray = tables[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); StarAttrInfo = new Int2[StarAttrInfoStringArray.Length]; @@ -132,9 +136,9 @@ values.AddRange(configs.Values); var keys = new List<string>(rawDatas.Keys); foreach (var key in keys) for (int i = 0; i < keys.Count; i++) { values.Add(Get(key)); values.Add(Get(keys[i])); } return values; Core/GameEngine/Model/Config/EquipStarConfig.cs.meta
@@ -1,8 +1,7 @@ fileFormatVersion: 2 guid: 1cb3a1eef8413e8449c98c1761d313d1 timeCreated: 1563348131 licenseType: Pro MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 System/Equip/EquipModel.cs
@@ -190,10 +190,9 @@ public int GetSuitRepoindStar(int level) { var StarList = new List<int> { 0, 3, 6, 9 }; var equipSet = GetEquipSet(level); int i = 0; foreach (int star in StarList) foreach (int star in EquipStarModel.StarList) { if (equipSet.suitRepoints[star].state == RedPointState.Simple) return i; System/Equip/EquipSet.cs
@@ -37,10 +37,10 @@ redpoint = new Redpoint(MainRedDot.RedPoint_BagFuncKey, 200100 + this.level); SuiteBtnRedpoint = new Redpoint(200100 + this.level, 6560 + this.level); //装备界面的 套装按钮 suitRepoints[0] = new Redpoint(6560 + this.level, (200100 + this.level) * 100 + 0); suitRepoints[3] = new Redpoint(6560 + this.level, (200100 + this.level) * 100 + 3); suitRepoints[6] = new Redpoint(6560 + this.level, (200100 + this.level) * 100 + 6); suitRepoints[9] = new Redpoint(6560 + this.level, (200100 + this.level) * 100 + 9); foreach (var star in EquipStarModel.StarList) { suitRepoints[star] = new Redpoint(6560 + this.level, (200100 + this.level) * 100 + star); } } public void UpdateEquipSlot(int place, string equipGuid) System/Equip/EquipSuitPropertyWidget.cs
@@ -28,10 +28,7 @@ [SerializeField] EquipSuitActiveHand m_SuitActive5; [SerializeField] EquipSuitActiveHand m_SuitActive8; [SerializeField] RedpointBehaviour redpoint0; [SerializeField] RedpointBehaviour redpoint3; [SerializeField] RedpointBehaviour redpoint6; [SerializeField] RedpointBehaviour redpoint9; [SerializeField] RedpointBehaviour[] redpointList; EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } @@ -41,17 +38,14 @@ { this.level = level; redpoint0.redpointId = (200100 + this.level) * 100 + 0; redpoint3.redpointId = (200100 + this.level) * 100 + 3; redpoint6.redpointId = (200100 + this.level) * 100 + 6; redpoint9.redpointId = (200100 + this.level) * 100 + 9; var maxLevel = EquipStarModel.GetMaxStarLevel(level); for (int i = 0; i < m_StarToggles.Length; i++) { redpointList[i].redpointId = (200100 + this.level) * 100 + m_StarToggles[i].star; m_StarToggles[i].SetActive(maxLevel >= m_StarToggles[i].star); } m_SuitName.text = EquipSuitConfig.GetConfigs(PlayerDatas.Instance.baseData.Job, level, EquipSuitType.TwoSuit)[0].name; var maxLevel = EquipStarModel.GetMaxStarLevel(level); m_StarToggles[3].SetActive(maxLevel >= 9); m_StarToggles[2].SetActive(maxLevel >= 6); m_StarToggles[1].SetActive(maxLevel >= 3); m_StarToggles[0].SetActive(true); int selectIndex = model.GetSuitRepoindStar(level); if (selectIndex != -1) @@ -60,21 +54,19 @@ return; } if (eightSuitLevel >= 6 && maxLevel >= 9) int jumpIndex = eightSuitLevel / 3 + 1; if (eightSuitLevel < 0) { m_StarToggles[3].Select(); jumpIndex = 0; } else if (eightSuitLevel >= 3 && maxLevel >= 6) if (jumpIndex >= m_StarToggles.Length) { m_StarToggles[2].Select(); } else if (eightSuitLevel >= 0 && maxLevel >= 3) { m_StarToggles[1].Select(); m_StarToggles[0].Select(); } else { m_StarToggles[0].Select(); m_StarToggles[jumpIndex].Select(); } } @@ -177,7 +169,7 @@ public void SetActive(bool active) { toggle.isOn = false; title.SetActive(active); toggle.SetActive(active); toggle.interactable = active; if (active) { System/EquipStar/EquipStarEffectTipModel.cs
@@ -42,7 +42,7 @@ 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) for (int i = 0; i < 19; i += 3) { if (maxStarLevel >= i) { @@ -308,31 +308,7 @@ public static string GetStarNumberCHS(int star) { switch (star) { case 0: return Language.Get("Num_CHS_0"); case 1: return Language.Get("Num_CHS_1"); case 2: return Language.Get("Num_CHS_2"); case 3: return Language.Get("Num_CHS_3"); case 4: return Language.Get("Num_CHS_4"); case 5: return Language.Get("Num_CHS_5"); case 6: return Language.Get("Num_CHS_6"); case 7: return Language.Get("Num_CHS_7"); case 8: return Language.Get("Num_CHS_8"); case 9: return Language.Get("Num_CHS_9"); default: return ""; } return Language.Get("Num_CHS_" + star); } public struct SuitEffectInfo System/EquipStar/EquipStarMaterialCandidate.cs
File was deleted System/EquipStar/EquipStarMaterialCandidate.cs.meta
File was deleted System/EquipStar/EquipStarMaterialCandidateCouple.cs
File was deleted System/EquipStar/EquipStarMaterialCandidateCouple.cs.meta
File was deleted System/EquipStar/EquipStarMaterialSelectButton.cs
File was deleted System/EquipStar/EquipStarMaterialSelectButton.cs.meta
File was deleted System/EquipStar/EquipStarMaterialSelectModel.cs
File was deleted System/EquipStar/EquipStarMaterialSelectModel.cs.meta
File was deleted System/EquipStar/EquipStarMaterialSelectWin.cs
File was deleted System/EquipStar/EquipStarMaterialSelectWin.cs.meta
File was deleted System/EquipStar/EquipStarModel.cs
@@ -12,13 +12,12 @@ public readonly LogicInt selectedPlace = new LogicInt(); public readonly LogicInt equipStarLevel = new LogicInt(); public readonly LogicInt equipMaxStarLevel = new LogicInt(); public readonly LogicInt starUpgradeProbability = new LogicInt(); public readonly LogicList<EquipStarUpgradeCandidate> candidatePlaces = new LogicList<EquipStarUpgradeCandidate>(); public readonly LogicList<Star> stars = new LogicList<Star>(); public readonly LogicList<string> normalMaterials = new LogicList<string>(); //已选择用于升星的装备 public readonly LogicInt specialMaterial = new LogicInt(); public readonly LogicInt specialMaterial2 = new LogicInt(); public readonly LogicInt starResultEffect = new LogicInt(); public readonly LogicInt autoBuy = new LogicInt(); public Int2 jumpEquipPos = Int2.zero; @@ -35,6 +34,8 @@ PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } public static List<int> StarList = new List<int> { 0, 3, 6, 9, 12, 15, 18 }; public override void Init() { @@ -102,7 +103,6 @@ { var equipPosition = new Int2(selectedLevel.value, selectedPlace.value); AutoAddMaterials(equipPosition); CalculateStarUpgradeProbability(equipPosition); if (info.Result == 1) { @@ -120,23 +120,6 @@ } } //查询自动购买状态 public void QueryAutoBuy() { var placeValue = selectedPlace.value; if (placeValue == 0) return; var equipPosition = new Int2(selectedLevel.value, placeValue); var currentStarLevel = GetEquipStarLevel(equipPosition); if (starUpgradeProbability.value >= 100) { autoBuy.value = GetItemsMoney(equipPosition, currentStarLevel + 1); return; } DoStarUpgrade(equipPosition, currentStarLevel + 1, 2); } //装备已填充100%后,客户端自己计算升星石价格 public int GetItemsMoney(Int2 equipPosition, int starLevel) @@ -146,13 +129,13 @@ { return 0; } int itemID = config.CostItemDict.x; int count = config.CostItemDict.y; int itemID = config.CostItemDict[0].x; int count = config.CostItemDict[0].y; if (itemID <= 0 || count <= 0) return 0; var shopConfig = StoreConfig.GetStoreCfg(itemID, 2, 5); if (shopConfig == null) return 0; int hasCnt = packModel.GetItemCountByID(PackType.Item, config.CostItemDict.x); int hasCnt = packModel.GetItemCountByID(PackType.Item, config.CostItemDict[0].x); int needCnt = count >= hasCnt ? count - hasCnt : 0; return needCnt * shopConfig.MoneyNumber; } @@ -190,30 +173,34 @@ return; } if (config.CostItemDict.x > 0 && specialMaterial.value == 0 && auto == 0) if (config.CostItemDict[0].x > 0 && specialMaterial.value == 0 && auto == 0) { SysNotifyMgr.Instance.ShowTip("StarLevelUp2", config.CostItemDict.x); SysNotifyMgr.Instance.ShowTip("StarLevelUp2", config.CostItemDict[0].x); return; } if (config.CostItemDict.x > 0 && packModel.GetItemCountByID(PackType.Item, config.CostItemDict.x) < config.CostItemDict.y && auto == 0) if (config.CostItemDict.Length > 1 && config.CostItemDict[1].x > 0 && specialMaterial2.value == 0 ) { SysNotifyMgr.Instance.ShowTip("StarLevelUp2", config.CostItemDict.x); SysNotifyMgr.Instance.ShowTip("StarLevelUp2", config.CostItemDict[1].x); return; } if (config.CostItemDict[0].x > 0 && packModel.GetItemCountByID(PackType.Item, config.CostItemDict[0].x) < config.CostItemDict[0].y && auto == 0) { SysNotifyMgr.Instance.ShowTip("StarLevelUp2", config.CostItemDict[0].x); return; } if (config.CostItemDict.Length > 1 && config.CostItemDict[1].x > 0 && packModel.GetItemCountByID(PackType.Item, config.CostItemDict[1].x) < config.CostItemDict[1].y) { SysNotifyMgr.Instance.ShowTip("StarLevelUp2", config.CostItemDict[1].x); return; } var materialIndexs = new List<ushort>(); var materialItemIds = new List<uint>(); for (var i = 0; i < normalMaterials.Count; i++) { var material = normalMaterials[i]; if (!string.IsNullOrEmpty(material)) { var item = packModel.GetItemByGuid(material); materialIndexs.Add((ushort)item.gridIndex); materialItemIds.Add((uint)item.itemId); } } Action sendInfo = () => { @@ -226,18 +213,7 @@ GameNetSystem.Instance.SendInfo(info); }; if (starUpgradeProbability.value < 50 && auto == 0) { ConfirmCancel.ShowPopConfirm( Language.Get("Mail101"), Language.Get("EquipStarUpgradePossibility"), () => { } ); } else { sendInfo(); } } public void ResetOperateParams() @@ -247,9 +223,7 @@ selectedPlace.value = 0; equipStarLevel.value = 0; equipMaxStarLevel.value = 0; starUpgradeProbability.value = -1; starResultEffect.value = 0; normalMaterials.Clear(); stars.Clear(); } @@ -337,10 +311,10 @@ UpdateSelelctedEquipStars(starLevel, starLevel, maxStarLevel); AutoAddMaterials(equipPosition); CalculateStarUpgradeProbability(equipPosition); } } //是否可升星 public bool IsEquipPlaceUpgradable(string equipGuid) { if (string.IsNullOrEmpty(equipGuid)) @@ -524,23 +498,6 @@ return materialGuids; } public void AddMaterial(string guid) { if (!normalMaterials.Contains(guid)) { normalMaterials.Add(guid); CalculateStarUpgradeProbability(new Int2(selectedLevel.value, selectedPlace.value)); } } public void RemoveMaterial(string guid) { if (normalMaterials.Contains(guid)) { normalMaterials.Remove(guid); CalculateStarUpgradeProbability(new Int2(selectedLevel.value, selectedPlace.value)); } } private void AutoAddMaterials(Int2 equipPosition) { @@ -549,68 +506,30 @@ if (upgradable) { normalMaterials.Clear(); var config = EquipStarConfig.Get(equipPosition.x, equipPosition.y, GetEquipStarLevel(equipPosition) + 1); if (config.CostItemDict.x > 0) if (config.CostItemDict.Length > 0 && config.CostItemDict[0].x > 0) { var itemId = config.CostItemDict.x; var itemId = config.CostItemDict[0].x; specialMaterial.value = itemId; } else { specialMaterial.value = 0; } if (config.CostItemDict.Length > 1) { var itemId = config.CostItemDict[1].x; specialMaterial2.value = itemId; } else { normalMaterials.Clear(); specialMaterial2.value = 0; } CalculateStarUpgradeProbability(new Int2(selectedLevel.value, selectedPlace.value)); } public void CalculateStarUpgradeProbability(Int2 equipPosition) { var probability = 0f; var equipGuid = equipModel.GetEquip(equipPosition); var upgradable = IsEquipPlaceUpgradable(equipGuid); if (upgradable) { var currentStarLevel = GetEquipStarLevel(equipPosition); var config = EquipStarConfig.Get(equipPosition.x, equipPosition.y, currentStarLevel + 1); if (config != null && config.CostEquipCnt == 0) { if (config.CostItemDict.x > 0) { var own = packModel.GetItemCountByID(PackType.Item, config.CostItemDict.x); probability = own >= config.CostItemDict.y ? 1f : 0f; } else { probability = 0f; } } else { for (int i = 0; i < normalMaterials.Count; i++) { var material = normalMaterials[i]; probability += GetMaterialSuccessRate(equipPosition, material); } } // 95%以上概率 则为100% int value = Mathf.RoundToInt(probability * 100); if (value >= 95 && value < 100) value = 100; starUpgradeProbability.value = value; starUpgradeProbability.dirty = true; } else { starUpgradeProbability.value = -1; } } public float GetMaterialSuccessRate(Int2 equipPosition, string guid) { @@ -733,7 +652,13 @@ } //固定材料不足 if (config.CostItemDict.x > 0 && packModel.GetItemCountByID(PackType.Item, config.CostItemDict.x) < config.CostItemDict.y) if (config.CostItemDict[0].x > 0 && packModel.GetItemCountByID(PackType.Item, config.CostItemDict[0].x) < config.CostItemDict[0].y) { continue; } if (config.CostItemDict.Length > 1 && config.CostItemDict[1].x > 0 && packModel.GetItemCountByID(PackType.Item, config.CostItemDict[1].x) < config.CostItemDict[1].y) { continue; } System/EquipStar/EquipStarSuccessWin.cs
@@ -119,27 +119,29 @@ var maxStarLevel = EquipStarModel.GetMaxStarLevel(model.equipPosition.x); var currentStar = model.star; for (int i = 0; i < m_Stars.Length; i++) var iconCnt = m_Stars.Length; for (int i = 0; i < iconCnt; i++) { var behaviour = m_Stars[i]; if (i < maxStarLevel) { if (i < currentStar) { behaviour.Display(true); if (i == currentStar - 1) var loopIndex = (currentStar / iconCnt * iconCnt + i < currentStar ? currentStar / iconCnt * iconCnt + i : i) / iconCnt; behaviour.Display(true, loopIndex); if (i == (currentStar - 1) % iconCnt) { behaviour.Display(false); behaviour.Display(false, loopIndex); Clock.AlarmAfter(1f, () => { behaviour.Display(true); behaviour.Display(true, loopIndex); behaviour.PlayScaleAnimation(); }); } } else { behaviour.Display(false); behaviour.Display(false, 0); } } else @@ -349,11 +351,12 @@ public Image imageBase; public Image imageStar; public void Display(bool active) public void Display(bool active, int loopIndex) { container.SetActive(true); imageStar.SetActive(active); imageStar.transform.localScale = Vector3.one; imageStar.SetSprite("ImgStar_" + loopIndex); } public void Hide() System/EquipStar/EquipStarUpgradeSpecialMaterialBehaviour.cs
@@ -12,8 +12,7 @@ public class EquipStarUpgradeSpecialMaterialBehaviour : MonoBehaviour { [SerializeField] RectTransform m_Empty; [SerializeField] ItemBehaviour m_Item; [SerializeField] Text m_Count; [SerializeField] ItemCell m_Item; [SerializeField] RectTransform m_Locked; PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } @@ -36,14 +35,17 @@ m_Locked.SetActive(!isUnLocked); m_Empty.SetActive(!isUnLocked); m_Item.SetActive(isUnLocked); m_Count.SetActive(isUnLocked); if (isUnLocked) { var own = packModel.GetItemCountByID(PackType.Item, itemId); m_Item.SetItem(itemId, 1); m_Count.text = StringUtility.Contact(own, "/", itemNeed); m_Count.color = UIHelper.GetUIColor(own >= itemNeed ? TextColType.Green : TextColType.Red); m_Item.Init(new ItemCellModel(itemId, false, 1)); m_Item.button.AddListener(() => { ItemTipUtility.Show(itemId); }); m_Item.countText.SetActive(true); m_Item.countText.text = StringUtility.Contact(own, "/", itemNeed); m_Item.countText.color = UIHelper.GetUIColor(own >= itemNeed ? TextColType.Green : TextColType.Red); } } } System/EquipStar/EquipStarWin.cs
@@ -21,10 +21,9 @@ [SerializeField] Star[] m_Stars; [SerializeField] ItemCell m_TargetEquip; [SerializeField] Text m_EquipStar; [SerializeField] EquipStarMaterialSelectButton m_MaterialSelect; [SerializeField] EquipStarUpgradeSpecialMaterialBehaviour m_SpecialMaterial; [SerializeField] EquipStarUpgradeSpecialMaterialBehaviour m_SpecialMaterial1; [SerializeField] EquipStarUpgradeSpecialMaterialBehaviour m_SpecialMaterial2; [SerializeField] Text m_SuccessRate; [SerializeField] RectTransform m_EmptyHint; [SerializeField] RectTransform m_PropertyDetails; [SerializeField] BaseProperty[] m_BasePropertys; @@ -32,14 +31,9 @@ [SerializeField] Button m_StarUpgrade; [SerializeField] RectTransform m_MaxStarLevelHint; [SerializeField] Button m_Preview; [SerializeField] UIEffect m_EffectStarFill; [SerializeField] UIEffect m_EffectSuccess; [SerializeField] UIEffect m_EffectFailed; [SerializeField] ToggleButton m_Auto; [SerializeField] Text m_AutoMoney; [SerializeField] RectTransform m_AutoTextContainer; [SerializeField] Text m_UnAutoText; [SerializeField] RectTransform m_AutoContainer; List<EquipStarLevelSelectBehaviour> levelBehaviours = new List<EquipStarLevelSelectBehaviour>(); @@ -72,22 +66,11 @@ private void ShowAuto() { m_Auto.isOn = !m_Auto.isOn; if (m_Auto.isOn) { model.QueryAutoBuy(); } else { model.autoBuy.value = -1; model.CalculateStarUpgradeProbability(new Int2(model.selectedLevel.value, model.selectedPlace.value)); } } public void ShowAutoText(int money) { //"8888自动提升至100%成功率(与全服拍卖同步)" //m_LevelLimit.colorType = var color = PlayerDatas.Instance.baseData.bindDiamond >= money ? TextColType.Green : TextColType.Red; m_AutoMoney.text = Language.Get("StartUpAutoBuy", UIHelper.AppendColor(color, money.ToString(), true)); @@ -165,12 +148,6 @@ private void OnItemCountRefresh(int index) { //var equipPosition = new Int2(model.selectedLevel.value, model.selectedPlace.value); //var currentStarLevel = model.GetEquipStarLevel(equipPosition); //model.normalMaterials.Fetch(); //DisplayMaterialSlots(equipPosition, currentStarLevel); model.normalMaterials.dirty = true; model.CalculateStarUpgradeProbability(new Int2(model.selectedLevel.value, model.selectedPlace.value)); } @@ -179,35 +156,6 @@ private void DisplayBaseInfo() { CreateLevelBehaviours(); } private void DisplayerAutoBuy() { //特殊四件和满星不需要自动购买 if (model.equipMaxStarLevel.value == model.equipStarLevel.value) { m_AutoContainer.SetActive(false); m_SuccessRate.text = string.Empty; return; } if (model.selectedPlace.value > 8 && model.selectedPlace.value <= 12) { m_AutoContainer.SetActive(false); model.autoBuy.value = -1; var equipPosition = new Int2(model.selectedLevel.value, model.selectedPlace.value); var equipGuid = equipModel.GetEquip(equipPosition); var equip = packModel.GetItemByGuid(equipGuid); if (equip == null) { m_SuccessRate.text = string.Empty; } return; } m_AutoContainer.SetActive(true); if (model.autoBuy.value != -1) { model.QueryAutoBuy(); } } @@ -273,15 +221,6 @@ DisplayStars(model.stars.Fetch()); } if (force || model.starUpgradeProbability.dirty) { if (model.selectedPlace.value > 8 && model.selectedPlace.value <= 12) { model.autoBuy.value = -1; } DisplaySuccessRate(model.starUpgradeProbability.Fetch()); DisplayerAutoBuy(); } if (force || model.starResultEffect.dirty) { @@ -290,22 +229,12 @@ PlayStarUpgradeEffect(result); } if (force || model.normalMaterials.dirty) { var equipPosition = new Int2(model.selectedLevel.value, model.selectedPlace.value); var currentStarLevel = model.GetEquipStarLevel(equipPosition); model.normalMaterials.Fetch(); DisplayMaterialSlots(equipPosition, currentStarLevel); } if (force || model.autoBuy.dirty) { if (model.equipMaxStarLevel.value == model.equipStarLevel.value) { m_AutoTextContainer.SetActive(false); m_UnAutoText.SetActive(false); m_SuccessRate.text = string.Empty; } else { @@ -314,27 +243,12 @@ { //不勾选自动购买 m_Auto.isOn = false; m_AutoTextContainer.SetActive(false); m_UnAutoText.SetActive(true); m_UnAutoText.text = Language.Get("StarAutoBuy1"); } else if (value == -2) { //勾选自动购买 但拍卖行装备不足 m_Auto.isOn = true; m_AutoTextContainer.SetActive(false); m_UnAutoText.SetActive(true); m_UnAutoText.text = Language.Get("StarAutoBuy2"); DisplaySuccessRate(100); ShowAutoText(value); } else { m_Auto.isOn = true; m_AutoTextContainer.SetActive(true); m_UnAutoText.SetActive(false); ShowAutoText(value); DisplaySuccessRate(100); } } @@ -410,31 +324,16 @@ if (!upgradable || isMax ) { m_MaterialSelect.Display(true, 0); m_SpecialMaterial.Display(false, 0, 0); m_SpecialMaterial1.Display(false, 0, 0); m_SpecialMaterial2.Display(false, 0, 0); } else { var starConfig = EquipStarConfig.Get(equipPosition.x, equipPosition.y, currentStarLevel + 1); var needEquip = starConfig.CostEquipCnt > 0; if (needEquip) { if (model.normalMaterials.Count > 0) { var item = packModel.GetItemByGuid(model.normalMaterials[0]); m_MaterialSelect.Display(false, item != null ? item.itemId : 0); } else { m_MaterialSelect.Display(false, 0); } } else { m_MaterialSelect.Display(true, 0); } m_SpecialMaterial.Display(starConfig.CostItemDict.x != 0, starConfig.CostItemDict.x, starConfig.CostItemDict.y); m_SpecialMaterial1.Display(starConfig.CostItemDict[0].x != 0, starConfig.CostItemDict[0].x, starConfig.CostItemDict[0].y); m_SpecialMaterial2.Display(starConfig.CostItemDict[1].x != 0, starConfig.CostItemDict[1].x, starConfig.CostItemDict[1].y); } } @@ -509,32 +408,7 @@ } } private void DisplaySuccessRate(int successRate) { if (model.autoBuy.value != -1) successRate = 100; //有勾选即100% if (successRate >= 0) { m_SuccessRate.text = Language.Get("EquipStar13", successRate); if (successRate < 50) { m_SuccessRate.color = UIHelper.GetUIColor(TextColType.Red, true); } else if (successRate < 80) { m_SuccessRate.color = UIHelper.GetUIColor(TextColType.NavyBrown, true); } else { m_SuccessRate.color = UIHelper.GetUIColor(TextColType.Green, true); } } else { m_SuccessRate.text = string.Empty; } } private void DisplayStarUpgradeButton(Int2 equipPosition, int currentStarLevel) { @@ -621,19 +495,19 @@ } } IEnumerator Co_PlaySuccessEffect() { m_EffectStarFill.Play(); yield return WaitingForSecondConst.WaitMS700; m_EffectSuccess.Play(); } //IEnumerator Co_PlaySuccessEffect() //{ // m_EffectStarFill.Play(); // yield return WaitingForSecondConst.WaitMS700; // m_EffectSuccess.Play(); //} IEnumerator Co_PlayFailedEffect() { m_EffectStarFill.Play(); yield return WaitingForSecondConst.WaitMS700; m_EffectFailed.Play(); } //IEnumerator Co_PlayFailedEffect() //{ // m_EffectStarFill.Play(); // yield return WaitingForSecondConst.WaitMS700; // m_EffectFailed.Play(); //} IEnumerator Co_DisplayStars(List<EquipStarModel.Star> stars) { System/FairyAu/ExchangeActiveTokenModel.cs
@@ -30,18 +30,18 @@ { ChoseEquips = new HashSet<ItemModel>(); ParseConfig(); m_PackModel.refreshItemCountEvent += RefreshRealmEquIsAllMaxStarDicAndRedPoint; //m_PackModel.refreshItemCountEvent += RefreshRealmEquIsAllMaxStarDicAndRedPoint; } public override void UnInit() { m_PackModel.refreshItemCountEvent -= RefreshRealmEquIsAllMaxStarDicAndRedPoint; //m_PackModel.refreshItemCountEvent -= RefreshRealmEquIsAllMaxStarDicAndRedPoint; } public void OnPlayerLoginOk() { UpdateExchangeBtnRedPoint(); //UpdateExchangeBtnRedPoint(); } #region 交换活跃度按钮红点 @@ -71,14 +71,14 @@ } int lv = ItemConfig.Get(itemId).LV; SetRealmEquIsAllMaxStar(lv); foreach (var value in m_RealmEquIsAllMaxStarDic.Values) { if (value) { UpdateExchangeBtnRedPoint(); break; } } //foreach (var value in m_RealmEquIsAllMaxStarDic.Values) //{ // if (value) // { // UpdateExchangeBtnRedPoint(); // break; // } //} } //某个境界的装备是否满级 public void SetRealmEquIsAllMaxStar(int Lv) System/FairyAu/FairyBasicFunctionWin.cs
@@ -90,10 +90,10 @@ private void OnExchangeBtnDown() { if (m_ExchangeActiveTokenModel.ExchangeBtnRedPoint.state != RedPointState.None) { m_ExchangeActiveTokenModel.ExchangeBtnRedPoint.state = RedPointState.None; } //if (m_ExchangeActiveTokenModel.ExchangeBtnRedPoint.state != RedPointState.None) //{ // m_ExchangeActiveTokenModel.ExchangeBtnRedPoint.state = RedPointState.None; //} WindowCenter.Instance.Open<ExchangeActiveTokenWin>(); } System/ItemTip/ItemTipUtility.cs
@@ -1446,39 +1446,31 @@ var eightSuits = new Dictionary<int, bool>(); var eightSuitLevel = equiped ? equipModel.GetSuitLevel(config.LV, EquipSuitType.EightSuit) : -1; var twoSuitProperties0 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.TwoSuit); var fiveSuitProperties0 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.FiveSuit); if (!equiped) { twoSuitProperties0.actived = false; fiveSuitProperties0.actived = false; } twoSuitProperties[0] = twoSuitProperties0; fiveSuitProperties[0] = fiveSuitProperties0; var suit2 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.TwoSuit); suit2.actived = false; var suit5 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.FiveSuit); suit5.actived = false; twoSuitProperties[0] = suit2; fiveSuitProperties[0] = suit5; eightSuits[0] = eightSuitLevel >= 0; if (maxSuitLevel >= 3) } else { twoSuitProperties[3] = equipModel.GetEquipSuitEntry(config.LV, 3, EquipSuitType.TwoSuit); fiveSuitProperties[3] = equipModel.GetEquipSuitEntry(config.LV, 3, EquipSuitType.FiveSuit); eightSuits[3] = eightSuitLevel >= 3; foreach (var star in EquipStarModel.StarList) { if (maxSuitLevel >= star) { twoSuitProperties[star] = equipModel.GetEquipSuitEntry(config.LV, star, EquipSuitType.TwoSuit); fiveSuitProperties[star] = equipModel.GetEquipSuitEntry(config.LV, star, EquipSuitType.FiveSuit); eightSuits[star] = eightSuitLevel >= star; } } } if (maxSuitLevel >= 6) { twoSuitProperties[6] = equipModel.GetEquipSuitEntry(config.LV, 6, EquipSuitType.TwoSuit); fiveSuitProperties[6] = equipModel.GetEquipSuitEntry(config.LV, 6, EquipSuitType.FiveSuit); eightSuits[6] = eightSuitLevel >= 3; } if (maxSuitLevel >= 9) { twoSuitProperties[9] = equipModel.GetEquipSuitEntry(config.LV, 9, EquipSuitType.TwoSuit); fiveSuitProperties[9] = equipModel.GetEquipSuitEntry(config.LV, 9, EquipSuitType.FiveSuit); eightSuits[9] = eightSuitLevel >= 9; } var suitInfo = new SuitInfo() { System/ItemTip/TipSuitPropertyWidget.cs
@@ -42,13 +42,9 @@ m_StarsContainer.SetActive(maxLevel >= 0); if (maxLevel >= 0) { m_StarToggles[0].SetActive(true, DisplaySuitInfo); m_StarToggles[1].SetActive(maxLevel >= 3, DisplaySuitInfo); m_StarToggles[2].SetActive(maxLevel >= 6, DisplaySuitInfo); m_StarToggles[3].SetActive(maxLevel >= 9, DisplaySuitInfo); for (int i = 0; i < m_StarToggles.Length; i++) { m_StarToggles[i].SetActive(m_StarToggles[i].star <= maxLevel, DisplaySuitInfo); m_StarToggles[i].toggle.isOn = i == highestEightSuitLevel / 3; } } System/KnapSack/Logic/EquipDevourWin.cs
@@ -34,6 +34,7 @@ [SerializeField] Image getMatBgImg; [SerializeField] Image getMatIcon; [SerializeField] Text getMatProgressText; [SerializeField] ButtonEx gotoShenfj; [SerializeField] int singleLineNum = 5; [SerializeField] int sumGridNum = 100; @@ -54,6 +55,10 @@ equipColorSelectBtn.AddListener(ClickColorSelectBtn); devourBtn.AddListener(ClickEquipDecomBtn); colorSpaceClick.AddListener(ClickColorSelectBtn); gotoShenfj.AddListener(() => { WindowCenter.Instance.Open("EquipShenDecomposeWin"); }); } protected override void OnPreOpen() @@ -419,10 +424,11 @@ var count = 0; foreach (var item in itemModels) { if (ItemLogicUtility.Instance.IsFightUp(item.itemId, item.score) == 1) if (item.isAuction || ItemLogicUtility.Instance.IsFightUp(item.itemId, item.score) == 1) { count += item.count; } } return count; } System/KnapSack/Logic/PackModel.cs
@@ -1338,7 +1338,7 @@ var eatEquipConfig = PetEatEquipConfig.GetEquipColorAndEquipClass(model.config.ItemColor, model.config.LV); if (eatEquipConfig == null) return false; if (ItemLogicUtility.Instance.IsFightUp(model.itemId, model.score) != 1) if (ItemLogicUtility.Instance.IsFightUp(model.itemId, model.score) != 1 && !model.isAuction) { if (model.config.ItemColor <= (int)colorType) { @@ -1589,19 +1589,19 @@ { for (int i = 0; i < getItems.Length; i++) { if (getItems[i].Count > 0) { for (int j = 0; j < getItems[i].Count; j++) { DecomposeGetMatInfo matInfo = new DecomposeGetMatInfo(); matInfo.ItemID = getItems[i].ItemID; matInfo.Count = 1; matInfo.IsSuite = getItems[i].IsSuite; matInfo.UserData = getItems[i].UserData; getMatInfos.Add(matInfo); } } else //if (getItems[i].Count > 0) //{ // for (int j = 0; j < getItems[i].Count; j++) // { // DecomposeGetMatInfo matInfo = new DecomposeGetMatInfo(); // matInfo.ItemID = getItems[i].ItemID; // matInfo.Count = 1; // matInfo.IsSuite = getItems[i].IsSuite; // matInfo.UserData = getItems[i].UserData; // getMatInfos.Add(matInfo); // } //} //else { getMatInfos.Add(getItems[i]); } System/TreasureFindHost/ReciveConditionCell.cs