| Lua/Gen/SnxxzUIEquipModelWrap.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/CandidateEquipWidget.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipLevelSelectBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/EquipSlotBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Equip/RealmEquipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/BetterItemGetBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/SinglePack.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Lua/Gen/SnxxzUIEquipModelWrap.cs
@@ -204,12 +204,6 @@ { Int2 _equipPosition;translator.Get(L, 2, out _equipPosition); gen_to_be_invoked.SelectSet( _equipPosition ); return 0; } @@ -871,10 +865,6 @@ static int _g_get_selectedPlace(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.selectedPlace); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } @@ -885,10 +875,6 @@ static int _g_get_selectedEquip(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.EquipModel gen_to_be_invoked = (Snxxz.UI.EquipModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.selectedEquip); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } System/Equip/CandidateEquipWidget.cs
@@ -11,26 +11,21 @@ [SerializeField] RectTransform m_CandidateNone; [SerializeField] RectTransform m_CandidateContainer; [SerializeField] CyclicScroll m_CandidateEquipScroll; [SerializeField] Button m_OneKey; int place = 0; public void Display(int place, List<CandidateEquip> candidates) EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } int level; public void Display( int level, List<CandidateEquip> candidates) { this.place = place; if (place == 0) { m_Title.text = "全部"; } else { m_Title.text = UIHelper.GetEquipPlaceName(place); } this.level = level; m_Title.text = "全部"; if (!candidates.IsNullOrEmpty()) { m_CandidateNone.gameObject.SetActive(false); m_CandidateContainer.gameObject.SetActive(true); m_CandidateEquipScroll.Init(candidates); m_OneKey.SetListener(OneKeyPutOn); } else { @@ -44,6 +39,11 @@ } private void OneKeyPutOn() { model.OneKeyPutOn(level); } } } System/Equip/EquipLevelSelectBehaviour.cs
@@ -70,7 +70,7 @@ { if (this.equipSet.unLocked) { model.SelectSet(new Int2(this.level, 0)); model.SelectSet(this.level); } else { System/Equip/EquipModel.cs
@@ -20,7 +20,6 @@ } public readonly LogicInt selectedLevel = new LogicInt(); public readonly LogicInt selectedPlace = new LogicInt(); public readonly LogicString selectedEquip = new LogicString(); public readonly LogicInt selectedStarLevel = new LogicInt(); public readonly LogicStruct<EquipAppearance> appearance = new LogicStruct<EquipAppearance>(); @@ -67,42 +66,69 @@ return 1; } public void SelectSet(Int2 equipPosition) public void OneKeyPutOn(int level) { selectedLevel.value = equipPosition.x; selectedPlace.value = equipPosition.y; var items = packModel.GetItems(PackType.Item, new SinglePack.FilterParams() { levels = level == 0 ? null : new List<int>() { level }, equipTypes = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, job = PlayerDatas.Instance.baseData.Job, }); items.Sort((x, y) => { return -x.score.CompareTo(y.score); }); var exceptEquips = new Dictionary<int, string>(); for (int i = 0; i < items.Count; i++) { var item = items[i]; if (!exceptEquips.ContainsKey(item.config.EquipPlace) && CompareToCurrent(item.guid) > 0) { exceptEquips[item.config.EquipPlace] = item.guid; } } if (exceptEquips.Count > 0) { foreach (var guid in exceptEquips.Values) { ItemOperateUtility.Instance.PutOnItem(guid); } } else { SysNotifyMgr.Instance.ShowTip(""); } } public void SelectSet(int level) { selectedLevel.value = level; if (selectedLevel.dirty) { selectedPlace.dirty = true; selectedStarLevel.value = 0; selectedStarLevel.dirty = true; appearance.value = GetAppearance(equipPosition.x); fightPoint.value = GetFightPoint(equipPosition.x); appearance.value = GetAppearance(level); fightPoint.value = GetFightPoint(level); } if (selectedLevel.dirty || selectedPlace.dirty) if (selectedLevel.dirty) { selectedEquip.value = string.Empty; RefreshCandidateEquips(equipPosition); RefreshCandidateEquips(level); } foreach (var item in equipSets.Values) { item.selected.value = item.level == selectedLevel.value; } if (equipSets.ContainsKey(equipPosition.x)) { equipSets[equipPosition.x].SelectPlace(equipPosition.y); } } public void ResetOperateParams() { selectedLevel.value = 0; selectedPlace.value = 0; selectedEquip.value = string.Empty; selectedStarLevel.value = 0; fightPoint.value = 0; appearance.value = default(EquipAppearance); @@ -110,23 +136,21 @@ getWays.Clear(); } private void RefreshCandidateEquips(Int2 equipPosition) private void RefreshCandidateEquips(int level) { candidateEquips.Clear(); var items = packModel.GetItems(PackType.Item, new SinglePack.FilterParams() { levels = equipPosition.x == 0 ? null : new List<int>() { equipPosition.x }, equipTypes = equipPosition.y == 0 ? new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 } : new List<int>() { equipPosition.y } levels = level == 0 ? null : new List<int>() { level }, equipTypes = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, job = PlayerDatas.Instance.baseData.Job, }); if (items != null) { foreach (var item in items) { if (ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId) && !item.isAuction) { candidateEquips.Add(new CandidateEquip(item.guid)); } candidateEquips.Add(new CandidateEquip(item.guid)); } candidateEquips.Sort((x, y) => @@ -457,7 +481,7 @@ { appearance.value = GetAppearance(selectedLevel.value); fightPoint.value = GetFightPoint(selectedLevel.value); RefreshCandidateEquips(new Int2(selectedLevel.value, selectedPlace.value)); RefreshCandidateEquips(selectedLevel.value); } break; default: @@ -507,7 +531,7 @@ if (dirty) { RefreshCandidateEquips(new Int2(selectedLevel.value, selectedPlace.value)); RefreshCandidateEquips(selectedLevel.value); } } System/Equip/EquipSlotBehaviour.cs
@@ -12,7 +12,6 @@ public class EquipSlotBehaviour : MonoBehaviour { [SerializeField] Button m_Select; [SerializeField] RectTransform m_SelectedContainer; [SerializeField] Text m_SlotName; [SerializeField] Image m_Icon; @@ -102,11 +101,6 @@ m_IconFrame.SetItemBackGround(equip.config.ItemColor); } } if (force || slot.selected.dirty) { m_SelectedContainer.gameObject.SetActive(slot.selected.Fetch()); } } private string GetDefaultEquipIcon(int place) @@ -118,26 +112,15 @@ { if (slot.unLocked) { if (slot.selected.value) if (!string.IsNullOrEmpty(slot.equip.value)) { if (!string.IsNullOrEmpty(slot.equip.value)) { tipModel.SetItemTipsModel(PackType.Equip, slot.equip.value, false); tipModel.SetPutOnTipsBtn(tipModel.curAttrData); tipModel.ShowUICtrl(); } else { model.RefreshGetWays(slot.equipPosition); } tipModel.SetItemTipsModel(PackType.Equip, slot.equip.value, false); tipModel.SetPutOnTipsBtn(tipModel.curAttrData); tipModel.ShowUICtrl(); } else { model.SelectSet(slot.equipPosition); if (string.IsNullOrEmpty(slot.equip.value) && model.candidateEquips.Count <= 0) { model.RefreshGetWays(slot.equipPosition); } model.RefreshGetWays(slot.equipPosition); } } } System/Equip/RealmEquipWin.cs
@@ -49,7 +49,7 @@ { if (model.selectedLevel.value == 0) { model.SelectSet(new Int2(model.GetLastestUnLockEquipSet(), 0)); model.SelectSet(model.GetLastestUnLockEquipSet()); } } @@ -103,11 +103,10 @@ DisplayFightPoint(model.fightPoint.Fetch()); } if (force || model.selectedPlace.dirty || model.candidateEquips.dirty) if (force || model.candidateEquips.dirty) { var place = model.selectedPlace.Fetch(); var candidates = model.candidateEquips.Fetch(); m_CandidateEquipWidget.Display(place, candidates); m_CandidateEquipWidget.Display(model.selectedLevel.value, candidates); } if (force || model.selectedStarLevel.dirty) System/KnapSack/BetterItemGetBehaviour.cs
@@ -111,7 +111,7 @@ { playerPack.SetLookIndex(betterEquip.guid); WindowCenter.Instance.Close<MainInterfaceWin>(); equipModel.SelectSet( new Int2(betterEquip.config.LV, betterEquip.config.EquipPlace)); equipModel.SelectSet(betterEquip.config.LV); WindowCenter.Instance.Open<RealmEquipWin>(); StartCoroutine(Co_Delay(model.currentEquipGuid)); } @@ -121,7 +121,7 @@ { playerPack.SetLookIndex(betterEquip.guid); WindowCenter.Instance.Close<MainInterfaceWin>(); equipModel.SelectSet(new Int2(betterEquip.config.LV, betterEquip.config.EquipPlace)); equipModel.SelectSet(betterEquip.config.LV); WindowCenter.Instance.Open<RealmEquipWin>(); StartCoroutine(Co_Delay(model.currentEquipGuid)); } System/KnapSack/Logic/SinglePack.cs
@@ -108,8 +108,10 @@ var qualityValid = filterParams.qualitys == null || filterParams.qualitys.Contains(item.config.ItemColor); var typeValid = filterParams.itemTypes == null || filterParams.itemTypes.Contains(item.config.Type); var equipTypeValid = filterParams.equipTypes == null || filterParams.equipTypes.Contains(item.config.EquipPlace); var jobValid = filterParams.job == 0 || filterParams.job == item.config.JobLimit / 100; var auctionValid = filterParams.isAuction == item.isAuction; if (levelValid && qualityValid && typeValid && equipTypeValid) if (levelValid && qualityValid && typeValid && equipTypeValid && jobValid && auctionValid) { list.Add(item); } @@ -203,6 +205,8 @@ public List<int> qualitys; public List<int> itemTypes; public List<int> equipTypes; public bool isAuction; public int job; } }