| | |
| | | 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;
|
| | |
| | |
|
| | | #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; }
|
| | |
| | | {
|
| | | this.secondType = secondType;
|
| | | this.thirdType = thirdType;
|
| | | funcType = type;
|
| | | GetFirstTypeModel((int)type);
|
| | | Dictionary<int, List<ItemCompoundConfig>> dict = GetSecondTypeModel((int)type,secondType);
|
| | | if(dict == null)
|