| System/Auction/AuctionShelfWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipGem/EquipStrengthFull.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipGem/EquipStrengthModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipGem/EquipStrengthRein.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipGem/EquipStrengthUpper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/EquipGem/EquipStrengthWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/New/BagWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/Auction/AuctionShelfWin.cs
@@ -54,9 +54,10 @@ private void OnClickUseBtn() { CloseImmediately(); itemTipsModel.SetItemTipsModel(PackType.Item, auctionHelpModel.ItemModel.guid, false, true); itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData); itemTipsModel.ShowUICtrl(); ItemOperateUtility.Instance.GotoUseItem(auctionHelpModel.ItemModel.itemInfo.index); //itemTipsModel.SetItemTipsModel(PackType.Item, auctionHelpModel.ItemModel.guid, false, true); //itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData); //itemTipsModel.ShowUICtrl(); } private void OnClickAuction() { System/EquipGem/EquipStrengthFull.cs
@@ -6,12 +6,94 @@ using System.Collections; using UnityEngine.UI; namespace Snxxz.UI { namespace Snxxz.UI { public class EquipStrengthFull:MonoBehaviour { public class EquipStrengthFull : MonoBehaviour { [SerializeField] ItemCell m_ItemEquip; [SerializeField] Text NeedMoney; [SerializeField] Text m_AttributesText1; [SerializeField] Text m_AttributesText2; [SerializeField] Text m_AttributesText3; PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } } public void SetEquipStrengthFull(string equipGuid, int level, int equipPlace) { //ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3)); int equipIndex = level * 10 + equipPlace; int equipLv = 0; EquipStrengthClass equipStrength = new EquipStrengthClass(); if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级 { equipLv = strengthModel.EquipStrengthDic[equipIndex].EquipPartStarLV; equipStrength = strengthModel.EquipStrengthDic[equipIndex]; } var itemPlus = strengthModel.GetEquipConfig(level, equipPlace); if (itemPlus == null) { DebugEx.LogError("没有索引到对应的强化表数据"); return; } NeedMoney.text = SetMoneyText(itemPlus); var item = packModel.GetItemByGuid(equipGuid); if (item != null) { m_ItemEquip.Init(item); } var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace); m_AttributesText1.gameObject.SetActive(false); m_AttributesText2.gameObject.SetActive(false); m_AttributesText3.gameObject.SetActive(false); for (int i = 0; i < 3; i++) { if (i < equipLvNowList.Count) { int type = i; var _equipLv = equipLvNowList[type]; switch (type) { case 0: m_AttributesText1.gameObject.SetActive(true); GameObject addText = m_AttributesText1.transform.Find("Number").gameObject; addText.SetActive(false); m_AttributesText1.text = _equipLv.StrName + ":" + _equipLv.AttValue; break; case 1: m_AttributesText2.gameObject.SetActive(true); GameObject addText1 = m_AttributesText2.transform.Find("Number").gameObject; addText1.SetActive(false); m_AttributesText2.text = _equipLv.StrName + ":" + _equipLv.AttValue; break; case 2: m_AttributesText3.gameObject.SetActive(true); GameObject addText2 = m_AttributesText3.transform.Find("Number").gameObject; addText2.SetActive(false); m_AttributesText3.text = _equipLv.StrName + ":" + _equipLv.AttValue; break; } } } } private string SetMoneyText(ItemPlusConfig itemPlusConfig) { string strMoneyText = string.Empty; ulong money = UIHelper.GetMoneyCnt(3); ulong needMoney = (ulong)itemPlusConfig.costCount; string MoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3)); string NeedMoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(needMoney); if (money >= needMoney) { strMoneyText = "<color=#fffaf0>" + NeedMoneyStr + "/" + MoneyStr + "</color>"; } else { strMoneyText = "<color=#ff0000>" + NeedMoneyStr + "/" + MoneyStr + "</color>"; } return strMoneyText; } } } System/EquipGem/EquipStrengthModel.cs
@@ -53,7 +53,6 @@ SelectLevelRefresh(); } } } } private int selectEquipPlace = -1;//装备部位 @@ -196,7 +195,6 @@ } EquipTypeList.Add(equipType); } } return EquipTypeList; System/EquipGem/EquipStrengthRein.cs
@@ -24,7 +24,7 @@ EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } } public void SetEquipStrengthRein(string equipGuid,int level,int equipPlace) { //ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3)); int equipIndex = level * 10 + equipPlace; int equipLv = 0; EquipStrengthClass equipStrength=new EquipStrengthClass(); @@ -44,6 +44,7 @@ { m_ItemEquip.Init(item); } NeedMoney.text = SetMoneyText(itemPlus); ItemCellModel cellModel = new ItemCellModel(2100, true, (ulong)1, 0); m_ItemMoney.Init(cellModel); var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace); @@ -100,6 +101,23 @@ } } private string SetMoneyText(ItemPlusConfig itemPlusConfig) { string strMoneyText = string.Empty; ulong money = UIHelper.GetMoneyCnt(3); ulong needMoney = (ulong)itemPlusConfig.costCount; string MoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3)); string NeedMoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(needMoney); if (money >= needMoney) { strMoneyText = "<color=#fffaf0>" + NeedMoneyStr + "/"+ MoneyStr + "</color>"; } else { strMoneyText = "<color=#ff0000>" + NeedMoneyStr + "/" + MoneyStr + "</color>"; } return strMoneyText; } } } System/EquipGem/EquipStrengthUpper.cs
@@ -6,12 +6,96 @@ using System.Collections; using UnityEngine.UI; namespace Snxxz.UI { namespace Snxxz.UI { public class EquipStrengthUpper:MonoBehaviour { public class EquipStrengthUpper : MonoBehaviour { [SerializeField] ItemCell m_ItemEquip; [SerializeField] Text NeedMoney; [SerializeField] Text m_AttributesText1; [SerializeField] Text m_AttributesText2; [SerializeField] Text m_AttributesText3; PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } } public void SetEquipStrengthUpper(string equipGuid, int level, int equipPlace) { //ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3)); int equipIndex = level * 10 + equipPlace; int equipLv = 0; EquipStrengthClass equipStrength = new EquipStrengthClass(); if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级 { equipLv = strengthModel.EquipStrengthDic[equipIndex].EquipPartStarLV; equipStrength = strengthModel.EquipStrengthDic[equipIndex]; } var itemPlus = strengthModel.GetEquipConfig(level, equipPlace); if (itemPlus == null) { DebugEx.LogError("没有索引到对应的强化表数据"); return; } NeedMoney.text = SetMoneyText(itemPlus); var item = packModel.GetItemByGuid(equipGuid); if (item != null) { m_ItemEquip.Init(item); } var equipLvNowList = strengthModel.GetEquipValueList(level, equipPlace); var equipAddLvList = strengthModel.GetEquipValueList(level, equipPlace, 1); m_AttributesText1.gameObject.SetActive(false); m_AttributesText2.gameObject.SetActive(false); m_AttributesText3.gameObject.SetActive(false); for (int i = 0; i < 3; i++) { if (i < equipLvNowList.Count) { int type = i; var _equipLv = equipLvNowList[type]; var _equipAddLv = equipAddLvList[type]; switch (type) { case 0: m_AttributesText1.gameObject.SetActive(true); Text addText = m_AttributesText1.transform.Find("Number").GetComponent<Text>(); m_AttributesText1.text = _equipLv.StrName + ":" + _equipLv.AttValue; addText.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue); break; case 1: m_AttributesText2.gameObject.SetActive(true); Text addText1 = m_AttributesText2.transform.Find("Number").GetComponent<Text>(); m_AttributesText2.text = _equipLv.StrName + ":" + _equipLv.AttValue; addText1.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue); break; case 2: m_AttributesText3.gameObject.SetActive(true); Text addText2 = m_AttributesText3.transform.Find("Number").GetComponent<Text>(); m_AttributesText3.text = _equipLv.StrName + ":" + _equipLv.AttValue; addText2.text = "+" + (_equipAddLv.AttValue - _equipLv.AttValue); break; } } } } private string SetMoneyText(ItemPlusConfig itemPlusConfig) { string strMoneyText = string.Empty; ulong money = UIHelper.GetMoneyCnt(3); ulong needMoney = (ulong)itemPlusConfig.costCount; string MoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(UIHelper.GetMoneyCnt(3)); string NeedMoneyStr = ItemLogicUtility.Instance.OnChangeCoinsUnit(needMoney); if (money >= needMoney) { strMoneyText = "<color=#fffaf0>" + NeedMoneyStr + "/" + MoneyStr + "</color>"; } else { strMoneyText = "<color=#ff0000>" + NeedMoneyStr + "/" + MoneyStr + "</color>"; } return strMoneyText; } } } System/EquipGem/EquipStrengthWin.cs
@@ -44,10 +44,12 @@ protected override void OnPreOpen() { OpenSelect();//默认选择 strengthModel.IsChangeBool = true; m_StopBtn.gameObject.SetActive(false); m_AutomaticBtn.gameObject.SetActive(true); DisplayEquips(); SetStrengthenedState(); strengthModel.SelectEquipRefresh += SelectEquipRefresh; strengthModel.SelectLevelRefresh += SelectLevelRefresh; strengthModel.EquipStrengthUpdate += EquipStrengthUpdate; @@ -62,7 +64,6 @@ strengthModel.SelectEquipRefresh -= SelectEquipRefresh; strengthModel.SelectLevelRefresh -= SelectLevelRefresh; strengthModel.EquipStrengthUpdate -= EquipStrengthUpdate; } @@ -128,6 +129,7 @@ private void SelectEquipRefresh() { m_Controller.m_Scorller.RefreshActiveCellViews(); strengthModel.IsChangeBool = true; SetStrengthenedState(); } @@ -167,7 +169,7 @@ if (equiped) { int equipIndex = equipLevel * 10 + equipPlace; int star= equipStarModel.GetEquipStarLevel(equipLevel, equipPlace); int star = equipStarModel.GetEquipStarLevel(equipLevel, equipPlace); int equipLv = 0; if (strengthModel.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级 { @@ -188,11 +190,13 @@ { m_BottomFrame.SetActive(false); m_EquipStrengthFull.gameObject.SetActive(true); m_EquipStrengthFull.SetEquipStrengthFull(equipGuid, equipLevel, equipPlace); } else if (maxLv > equipLv && equipLv >= itemPlusMaxConfig.levelMax)//强化上限 { m_BottomFrame.SetActive(false); m_EquipStrengthUpper.gameObject.SetActive(true); m_EquipStrengthUpper.SetEquipStrengthUpper(equipGuid, equipLevel, equipPlace); } else if (itemPlusMaxConfig.levelMax > equipLv)//可强化过 { @@ -207,8 +211,44 @@ m_NotEquipped.SetActive(true); } } } private void OpenSelect() { strengthModel.SelectLevel = -1; strengthModel.SelectEquipPlace = -1; var equipSets = equipModel.GetAllEquipSets(); foreach (var level in equipSets) { var equipSet = equipModel.GetEquipSet(level); if (equipSet == null) { continue; } if (equipSet.unLocked) { var slotCount = model.GetUnlockEquipSlotCount(level); if (slotCount > 0) { if (strengthModel.SelectLevel == -1) { strengthModel.SelectLevel = level; } if (strengthModel.SelectLevel == level) { var places = model.GetMosaicEquipPlaces(); foreach (var place in places) { if (strengthModel.SelectEquipPlace == -1) { strengthModel.SelectEquipPlace = place; } } } } } } } } } System/KnapSack/New/BagWin.cs
@@ -279,7 +279,7 @@ { gridCell.itemCellBtn.OnOneParaClick = (int info) => { if (itemModel.itemInfo.isBind!= 1) if (itemModel.itemInfo.isBind== 1) { AuctionHelpModel auctionHelpModel = ModelCenter.Instance.GetModel<AuctionHelpModel>(); auctionHelpModel.ItemModel = itemModel;