From e8a98f2b0c3f7fcc614898aa7df7c01fa35f9e45 Mon Sep 17 00:00:00 2001
From: Client_PangDeRong <593317293@qq.com>
Date: 星期五, 31 八月 2018 11:39:19 +0800
Subject: [PATCH] 3128 物品表增加合成字段
---
System/Compose/New/ComposeToolsWin.cs | 8 +--
System/Compose/New/ComposeWinModel.cs | 81 ++++++++++++++++++----------------------
System/Compose/New/ComposeWingsWin.cs | 7 +--
System/KnapSack/Logic/ItemTipsModel.cs | 14 ++-----
System/Compose/New/ComposeTicketWin.cs | 7 +--
5 files changed, 49 insertions(+), 68 deletions(-)
diff --git a/System/Compose/New/ComposeTicketWin.cs b/System/Compose/New/ComposeTicketWin.cs
index eb6a3b0..8f6aaf0 100644
--- a/System/Compose/New/ComposeTicketWin.cs
+++ b/System/Compose/New/ComposeTicketWin.cs
@@ -219,8 +219,7 @@
if (secondTypeDict != null)
{
- if (secondTypeDict.Count >= 1 && curSecondType != 0
- && curThirdType == 0)
+ if (secondTypeDict.Count >= 1 && curSecondType != 0)
{
cellCtrl.JumpIndex(curSecondType - 1);
}
@@ -253,6 +252,7 @@
name.text = compoundModel.secondTypeName;
if (curSecondType == cell.index)
{
+ preSecondType = curSecondType;
arrowIcon.transform.localRotation = Quaternion.Euler(0, 0, -90);
icon.SetSprite("ComposeFirstClassChoosebtn");
secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Ticket, curSecondType);
@@ -334,8 +334,7 @@
private void OnClickThirdType(int thirdType)
{
curThirdType = thirdType;
- CreateCell();
- //RefreshUI(thirdTypelist[0]);
+ cellCtrl.m_Scorller.RefreshActiveCellViews();
}
private void RefreshUI(ItemCompoundConfig compoundModel)
diff --git a/System/Compose/New/ComposeToolsWin.cs b/System/Compose/New/ComposeToolsWin.cs
index 2eaf6f7..47c9526 100644
--- a/System/Compose/New/ComposeToolsWin.cs
+++ b/System/Compose/New/ComposeToolsWin.cs
@@ -242,8 +242,7 @@
if (secondTypeDict != null)
{
- if (secondTypeDict.Count >= 1 && curSecondType != 0
- && curThirdType == 0)
+ if (secondTypeDict.Count >= 1 && curSecondType != 0)
{
cellCtrl.JumpIndex(curSecondType - 1);
}
@@ -277,6 +276,7 @@
name.text = compoundModel.secondTypeName;
if (curSecondType == cell.index)
{
+ preSecondType = curSecondType;
arrowIcon.transform.localRotation = Quaternion.Euler(0, 0, -90);
icon.SetSprite("ComposeFirstClassChoosebtn");
secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Item, curSecondType);
@@ -326,7 +326,6 @@
{
if (thirdType != 0)
{
-
if (preSecondType == curSecondType)
{
curSecondType = 0;
@@ -369,8 +368,7 @@
private void OnClickThirdType(int thirdType)
{
curThirdType = thirdType;
- CreateCell();
- //RefreshUI(thirdTypelist[0]);
+ cellCtrl.m_Scorller.RefreshActiveCellViews();
}
private void RefreshUI(ItemCompoundConfig compoundModel)
diff --git a/System/Compose/New/ComposeWinModel.cs b/System/Compose/New/ComposeWinModel.cs
index 2993978..70f69fd 100644
--- a/System/Compose/New/ComposeWinModel.cs
+++ b/System/Compose/New/ComposeWinModel.cs
@@ -11,7 +11,6 @@
private Dictionary<int, Dictionary<int, List<ItemCompoundConfig>>> firstTypeDict = null;
private Dictionary<int, List<ItemCompoundConfig>> secondTypeDict = null;
private Dictionary<int, List<int>> composeJobLimitDict = new Dictionary<int, List<int>>();
- public ComposeFuncType funcType = ComposeFuncType.Wings;
private FuncConfigConfig addonsFormulaModel;
public event Action ResetModelEvent;
SelectEquipModel _selectModel;
@@ -796,57 +795,50 @@
#region 澶勭悊璺宠浆鐣岄潰鏁版嵁
- public bool CheckComposeItemById(int itemId)
+ public bool CheckComposeItemById(int itemId,out int jumpId)
{
+ jumpId = 0;
ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(itemId);
if (itemConfig == null) return false;
- switch(itemConfig.Type)
+ ItemCompoundConfig itemCompound = Config.Instance.Get<ItemCompoundConfig>(itemConfig.ComposeID);
+ if(itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
{
- case 25:
- case 35:
- funcType = ComposeFuncType.Item;
- break;
- case 39:
- funcType = ComposeFuncType.Wings;
- break;
- case 44:
- funcType = ComposeFuncType.Ticket;
- break;
- }
-
- firstTypeDict = ItemCompoundConfig.GetAllFirstComposeTypeDict((int)funcType);
- if (firstTypeDict != null)
- {
- foreach (var secondType in firstTypeDict.Keys)
+ switch (itemCompound.firstType)
{
- Dictionary<int, List<ItemCompoundConfig>> secondTypeDict = firstTypeDict[secondType];
- foreach(var thirdType in secondTypeDict.Keys)
- {
- for(int i = 0; i < secondTypeDict[thirdType].Count; i++)
- {
- ItemCompoundConfig compoundConfig = secondTypeDict[thirdType][i];
- int[] fixedIds = ConfigParse.GetMultipleStr<int>(compoundConfig.itemID);
- if(fixedIds.Contains(itemId))
- {
- if(compoundConfig.levelNeed <= PlayerDatas.Instance.baseData.LV)
- {
- this.secondType = secondType;
- this.thirdType = thirdType;
- return true;
- }
- else
- {
- SysNotifyMgr.Instance.ShowTip("TicketComposeUnlock",compoundConfig.levelNeed,compoundConfig.secondTypeName);
- return false;
- }
- }
- }
- }
+ case 1:
+ jumpId = (int)JumpUIType.ComposeFunc1;
+ break;
+ case 2:
+ jumpId = (int)JumpUIType.ComposeFunc2;
+ break;
+ case 3:
+ jumpId = (int)JumpUIType.ComposeFunc3;
+ break;
+ case 4:
+ jumpId = (int)JumpUIType.ComposeFunc4;
+ break;
+ case 5:
+ jumpId = (int)JumpUIType.ComposeFunc5;
+ break;
}
- }
+ this.secondType = itemCompound.secondType;
- return false;
+ if(itemConfig.ComposeID == 223)
+ {
+ this.thirdType = PlayerDatas.Instance.baseData.Job;
+ }
+ else
+ {
+ this.thirdType = itemCompound.thirdType;
+ }
+ return true;
+ }
+ else
+ {
+ SysNotifyMgr.Instance.ShowTip("TicketComposeUnlock", itemCompound.levelNeed, itemCompound.secondTypeName);
+ return false;
+ }
}
public int secondType { get; private set; }
@@ -855,7 +847,6 @@
{
this.secondType = secondType;
this.thirdType = thirdType;
- funcType = type;
GetFirstTypeModel((int)type);
Dictionary<int, List<ItemCompoundConfig>> dict = GetSecondTypeModel((int)type,secondType);
if(dict == null)
diff --git a/System/Compose/New/ComposeWingsWin.cs b/System/Compose/New/ComposeWingsWin.cs
index 0ac146f..64beeff 100644
--- a/System/Compose/New/ComposeWingsWin.cs
+++ b/System/Compose/New/ComposeWingsWin.cs
@@ -224,8 +224,7 @@
if(secondTypeDict != null)
{
- if (secondTypeDict.Count >= 1 && curSecondType != 0
- && curThirdType == 0)
+ if (secondTypeDict.Count >= 1 && curSecondType != 0)
{
cellCtrl.JumpIndex(curSecondType - 1);
}
@@ -257,6 +256,7 @@
name.text = compoundModel.secondTypeName;
if (curSecondType == cell.index)
{
+ preSecondType = curSecondType;
icon.SetSprite("ComposeFirstClassChoosebtn");
arrowIcon.transform.localRotation = Quaternion.Euler(0,0,-90);
secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Wings, curSecondType);
@@ -345,8 +345,7 @@
private void OnClickThirdType(int thirdType)
{
curThirdType = thirdType;
- CreateCell();
- //RefreshUI(thirdTypelist[0]);
+ cellCtrl.m_Scorller.RefreshActiveCellViews();
selectModel.ClearSelectModel();
}
diff --git a/System/KnapSack/Logic/ItemTipsModel.cs b/System/KnapSack/Logic/ItemTipsModel.cs
index 8df84eb..1a03469 100644
--- a/System/KnapSack/Logic/ItemTipsModel.cs
+++ b/System/KnapSack/Logic/ItemTipsModel.cs
@@ -14,11 +14,8 @@
FuncConfigConfig exhaustedFunc;
-
public Dictionary<int, List<int>> equipLegendAttrTypeDict { get; private set; }
public Dictionary<int, Dictionary<int, string>> wingsLegendAttrColorDict { get; private set; }
- private Dictionary<int, int> itemComposeTypeDict;
- public int[] NotComposeIds { get; private set;}
public Dictionary<string, Dictionary<LegendAttrType, int>> legendAttrCntPreviewDict { get; private set; } // key 鍝佽川+鏄熺骇 value 灞炴�ф潯鐩暟
public Dictionary<int, Dictionary<LegendAttrType, List<int>>> legendAttrIDPreviewDict { get; private set; } // key 瑁呭浣� value 灞炴�х被鍨嬶紝灞炴�D
public Dictionary<int, Dictionary<int, int>> legendAttrColorValuePreviewDict { get; private set; } // key 灞炴�D value 瑁呭鍝佽川锛屽睘鎬ф暟鍊�
@@ -115,10 +112,6 @@
}
}
}
-
- FuncConfigConfig itemComposeTypeFunc = Config.Instance.Get<FuncConfigConfig>("BagCompound");
- itemComposeTypeDict = ConfigParse.GetDic<int, int>(itemComposeTypeFunc.Numerical1);
- NotComposeIds = ConfigParse.GetMultipleStr<int>(itemComposeTypeFunc.Numerical2);
FuncConfigConfig legendAttrCountPreview = Config.Instance.Get<FuncConfigConfig>("LegendAttrCountPreview");
JsonData legendAttrCntData = JsonMapper.ToObject(legendAttrCountPreview.Numerical1);
@@ -621,13 +614,14 @@
if (!isOverdue)
{
- if (itemComposeTypeDict.ContainsKey(attrData.itemConfig.Type) && !NotComposeIds.Contains(attrData.itemId))
+ if(attrData.itemConfig.ComposeID != 0)
{
attrData.SetTipsFuncBtn(ItemWinBtnType.compose, (ItemWinBtnType, ItemAttrData) => {
- bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(attrData.itemId);
+ int jumpId = 0;
+ bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(attrData.itemId,out jumpId);
if (isUnlock)
{
- PackSendQuestMgr.Instance.ClickComposeBtn(ItemWinBtnType.compose, itemComposeTypeDict[attrData.itemConfig.Type]);
+ PackSendQuestMgr.Instance.ClickComposeBtn(ItemWinBtnType.compose,jumpId);
}
});
}
--
Gitblit v1.8.0