| | |
| | | public class DTCA309_tagMCEquipPartSuiteLVInfo : DtcBasic |
| | | { |
| | | |
| | | PlayerSuitModel _suitModel; |
| | | PlayerSuitModel SuitModel |
| | | { |
| | | get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); } |
| | | } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | |
| | | base.Done(vNetPack); |
| | | |
| | | HA309_tagMCEquipPartSuiteLVInfo vNetData = vNetPack as HA309_tagMCEquipPartSuiteLVInfo; |
| | | SuitModel.GetServerSuitModel(vNetData); |
| | | |
| | | GA_Hero _hero = PlayerDatas.Instance.hero; |
| | | if (_hero != null) |
| | | { |
| | |
| | | m_LastSyncTickTime = Time.realtimeSinceStartup;
|
| | | }
|
| | |
|
| | | private PlayerSuitModel _suitModel;
|
| | | private PlayerSuitModel SuitModel
|
| | | {
|
| | | get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
|
| | | }
|
| | |
|
| | | private PackModel m_PlayerBackModel;
|
| | | private PackModel PlayerBackModel
|
| | | {
|
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | if (SuitModel.suitModelDict.ContainsKey(i))
|
| | | {
|
| | | if (SuitModel.suitModelDict[i].ContainsKey(1)
|
| | | || SuitModel.suitModelDict[i].ContainsKey(2))
|
| | | {
|
| | | if (_itemModel.config.LV >= _rank)
|
| | | {
|
| | | _suitCount += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (m_SuitCount == _suitCount)
|
| | |
| | | public static void Goto3092(int _achievementId, SuccessConfig config) |
| | | { |
| | | if (config == null) return; |
| | | |
| | | guideAchievementId = _achievementId; |
| | | PlayerSuitModel suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>(); |
| | | int[] conditions = config.Condition; |
| | | if(conditions != null && conditions.Length > 1) |
| | | { |
| | | suitModel.SetJumpToModel((SuitType)conditions[1],conditions[2]); |
| | | } |
| | | |
| | | } |
| | | |
| | | public static void Goto3094(int _achievementId, SuccessConfig config) |
| | |
| | | _textBuilder.Append(",");
|
| | | }
|
| | | }
|
| | | _textBuilder.Append("|");
|
| | | var _dictSuitLv = ModelCenter.Instance.GetModel<PlayerSuitModel>().GetServerSuitModelByPlace(itemPlaceList[i].itemPlace);
|
| | | if (_dictSuitLv != null && equip)
|
| | | {
|
| | | foreach (int key in _dictSuitLv.Keys)
|
| | | {
|
| | | _textBuilder.Append(StringUtility.Contact("'", key, "_", _dictSuitLv[key]));
|
| | | }
|
| | | }
|
| | | _textBuilder.Append("|");
|
| | | var _dictSuitCnt = ModelCenter.Instance.GetModel<PlayerSuitModel>().GetServerSuitCntByPlace(itemPlaceList[i].itemPlace);
|
| | | if (_dictSuitCnt != null && equip)
|
| | | {
|
| | | foreach (int key in _dictSuitCnt.Keys)
|
| | | {
|
| | | _textBuilder.Append(StringUtility.Contact("'", key, "_", _dictSuitCnt[(SuitType)key]));
|
| | | }
|
| | | }
|
| | |
|
| | | _textBuilder.Append("|");
|
| | | _textBuilder.Append(itemPlaceList[i].itemPlace);
|
| | | _textBuilder.Append("|");
|
| | |
| | | public void InitModel(ItemAttrData attrData)
|
| | | {
|
| | | curAttrTypeNum = 0;
|
| | | suirAttrCtrl.OnRefreshCell += RefreshSuitProCell;
|
| | | KnapsackTimeCDMgr.Instance.RefreshItemOverdueTimeAct += RefreshRemainTime;
|
| | | itemAttrData = attrData;
|
| | | InitUI();
|
| | |
| | | yield return null;
|
| | | bottomPart.gameObject.SetActive(true);
|
| | | SetBottomUI();
|
| | | SetSuitAttrUI();
|
| | | StartCoroutine(SetPanelScale());
|
| | | }
|
| | |
|
| | |
| | | SetLegendAttrUI();
|
| | | SetWashAttrUI();
|
| | | SetGemAttrUI();
|
| | | SetSuitAttrUI();
|
| | | for (int i = 0; i < attrCutLinelist.Count; i++)
|
| | | {
|
| | | if (i == curAttrTypeNum - 1)
|
| | |
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | suirAttrCtrl.OnRefreshCell -= RefreshSuitProCell;
|
| | | KnapsackTimeCDMgr.Instance.RefreshItemOverdueTimeAct -= RefreshRemainTime;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void SetSuitAttrUI()
|
| | | {
|
| | | if(itemAttrData.suitAttrDataDict == null || itemAttrData.suitAttrDataDict.Count < 1)
|
| | | {
|
| | | suitAttr.SetActive(false);
|
| | | return; |
| | | }
|
| | |
|
| | | switch (itemAttrData.itemConfig.EquipPlace)
|
| | | {
|
| | | case 101:
|
| | | case 102:
|
| | | case 103:
|
| | | case 104:
|
| | | case 105:
|
| | | suitAttr.SetActive(false);
|
| | | return;
|
| | | }
|
| | | curAttrTypeNum = 6;
|
| | | suitAttr.SetActive(true);
|
| | | CreateSuitProCell();
|
| | |
|
| | | }
|
| | |
|
| | | private int length1 = 0;
|
| | | private int length2 = 0;
|
| | | private int length3 = 0;
|
| | |
|
| | | private void CreateSuitProCell()
|
| | | {
|
| | | suirAttrCtrl.Refresh();
|
| | | foreach(var type in itemAttrData.suitAttrDataDict.Keys)
|
| | | {
|
| | | int suitCnt = itemAttrData.GetSuitCntByType(type);
|
| | | |
| | | ItemSuitAttrData suitAttrData = itemAttrData.suitAttrDataDict[type];
|
| | | length1 = suitAttrData.firstSuitAttrs.Length;
|
| | | CellInfo info = new CellInfo()
|
| | | {
|
| | | infoInt1 = (int)type,
|
| | | };
|
| | | if (suitCnt > 0)
|
| | | {
|
| | | suirAttrCtrl.AddCell(ScrollerDataType.Header, (int)type);
|
| | | for (int i = 0; i < length1;i++)
|
| | | {
|
| | | if (i == 0)
|
| | | {
|
| | | suirAttrCtrl.AddCell(ScrollerDataType.Normal, i,null,info);
|
| | | }
|
| | | else
|
| | | {
|
| | | suirAttrCtrl.AddCell(ScrollerDataType.Tail, i,null,info);
|
| | | }
|
| | | }
|
| | | length2 = length1 + suitAttrData.secondSuitAttrs.Length;
|
| | | for (int i = length1; i < length2; i++)
|
| | | {
|
| | | if (i == length1)
|
| | | {
|
| | | suirAttrCtrl.AddCell(ScrollerDataType.Normal, i, null, info);
|
| | | }
|
| | | else
|
| | | {
|
| | | suirAttrCtrl.AddCell(ScrollerDataType.Tail, i, null, info);
|
| | | }
|
| | | }
|
| | | length3 = length2 + suitAttrData.thirdSuitAttrs.Length;
|
| | | for (int i = length2; i < length3; i++)
|
| | | {
|
| | | if (i == length2)
|
| | | {
|
| | | suirAttrCtrl.AddCell(ScrollerDataType.Normal, i, null, info);
|
| | | }
|
| | | else
|
| | | {
|
| | | suirAttrCtrl.AddCell(ScrollerDataType.Tail, i, null, info);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | |
| | | suirAttrCtrl.Restart();
|
| | | }
|
| | |
|
| | | private void RefreshSuitProCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | ItemSuitAttrData suitAttrData = default(ItemSuitAttrData);
|
| | | switch (type)
|
| | | {
|
| | | case ScrollerDataType.Header:
|
| | | Text titleName = cell.transform.Find("TitleTextCell").GetComponent<Text>();
|
| | | suitAttrData = itemAttrData.suitAttrDataDict[(SuitType)cell.index];
|
| | | titleName.text = StringUtility.Contact(suitAttrData.suitAttrConfig.name, "(", itemAttrData.GetSuitCntByType((SuitType)cell.index), "/", suitAttrData.suitAttrConfig.count3, ")");
|
| | | break;
|
| | | case ScrollerDataType.Normal:
|
| | | case ScrollerDataType.Tail:
|
| | | Text curNum = cell.transform.Find("FirstSuitATT").GetComponent<Text>();
|
| | | Text curPro = cell.transform.Find("ATTTxt").GetComponent<Text>();
|
| | | suitAttrData = itemAttrData.suitAttrDataDict[(SuitType)cell.info.Value.infoInt1];
|
| | | if (cell.index == 0)
|
| | | {
|
| | | curNum.text = Language.Get("EquipSuit111", suitAttrData.suitAttrConfig.count1.ToString());
|
| | | curNum.gameObject.SetActive(true);
|
| | | }
|
| | | else if (cell.index == length1)
|
| | | {
|
| | | curNum.text = Language.Get("EquipSuit111", suitAttrData.suitAttrConfig.count2.ToString());
|
| | | curNum.gameObject.SetActive(true);
|
| | | }
|
| | | else if (cell.index == length2)
|
| | | {
|
| | | curNum.text = Language.Get("EquipSuit111", suitAttrData.suitAttrConfig.count3.ToString());
|
| | | curNum.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | curNum.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | PlayerPropertyConfig playerProModel = null;
|
| | | if (cell.index < length1)
|
| | | {
|
| | | playerProModel = PlayerPropertyConfig.Get(suitAttrData.firstSuitAttrs[cell.index]);
|
| | | if (playerProModel.Name.Contains("%s"))
|
| | | {
|
| | | curPro.text = playerProModel.Name.Replace("%s", itemTipsModel.GetProValueTypeStr(playerProModel, suitAttrData.firstSuitAttrValues[cell.index]));
|
| | | }
|
| | | else
|
| | | {
|
| | | curPro.text = StringUtility.Contact(playerProModel.Name, "+", itemTipsModel.GetProValueTypeStr(playerProModel, suitAttrData.firstSuitAttrValues[cell.index]));
|
| | | }
|
| | | ChangeSuitAttrColor(curNum,curPro,itemAttrData.GetSuitCntByType((SuitType)cell.info.Value.infoInt1), suitAttrData.suitAttrConfig.count1);
|
| | | }
|
| | | else if (cell.index >= length1 && cell.index < length2)
|
| | | {
|
| | | playerProModel = PlayerPropertyConfig.Get(suitAttrData.secondSuitAttrs[cell.index - length1]);
|
| | | if (playerProModel.Name.Contains("%s"))
|
| | | {
|
| | | curPro.text = playerProModel.Name.Replace("%s", itemTipsModel.GetProValueTypeStr(playerProModel, suitAttrData.secondSuitAttrValues[cell.index - length1]));
|
| | | }
|
| | | else
|
| | | {
|
| | | curPro.text = StringUtility.Contact(playerProModel.Name, "+", itemTipsModel.GetProValueTypeStr(playerProModel, suitAttrData.secondSuitAttrValues[cell.index - length1]));
|
| | | }
|
| | | ChangeSuitAttrColor(curNum, curPro, itemAttrData.GetSuitCntByType((SuitType)cell.info.Value.infoInt1), suitAttrData.suitAttrConfig.count2);
|
| | | }
|
| | | else if (cell.index >= length2 && cell.index < length3)
|
| | | {
|
| | | playerProModel = PlayerPropertyConfig.Get(suitAttrData.thirdSuitAttrs[cell.index - length2]);
|
| | | if (playerProModel.Name.Contains("%s"))
|
| | | {
|
| | | curPro.text = playerProModel.Name.Replace("%s", itemTipsModel.GetProValueTypeStr(playerProModel, suitAttrData.thirdSuitAttrValues[cell.index - length2]));
|
| | | }
|
| | | else
|
| | | {
|
| | | curPro.text = StringUtility.Contact(playerProModel.Name, "+", itemTipsModel.GetProValueTypeStr(playerProModel, suitAttrData.thirdSuitAttrValues[cell.index - length2]));
|
| | | }
|
| | | ChangeSuitAttrColor(curNum, curPro, itemAttrData.GetSuitCntByType((SuitType)cell.info.Value.infoInt1), suitAttrData.suitAttrConfig.count3);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void ChangeSuitAttrColor(Text num,Text attr,int suitCnt,int needCnt)
|
| | | {
|
| | | if(suitCnt >= needCnt)
|
| | | {
|
| | | num.text = StringUtility.Contact("<color=#35e122>", num.text, "</color>");
|
| | | attr.text = StringUtility.Contact("<color=#35e122>", attr.text, "</color>");
|
| | | }
|
| | | else
|
| | | {
|
| | | num.text = StringUtility.Contact("<color=#9e8f73>", num.text, "</color>");
|
| | | attr.text = StringUtility.Contact("<color=#9e8f73>", attr.text, "</color>");
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetMidUIHeight(float midHeight)
|
| | | {
|
| | |
| | | BuffModel Buffmodel { get { return ModelCenter.Instance.GetModel<BuffModel>(); } } |
| | | FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } } |
| | | BoxGetItemModel BoxModel { get { return ModelCenter.Instance.GetModel<BoxGetItemModel>(); } } |
| | | PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } } |
| | | DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } } |
| | | |
| | | #region 装备 |
| | |
| | | return true; |
| | | } |
| | | |
| | | public void CheckSuitReplaceInfo(int equipPlace, ItemModel item) |
| | | { |
| | | if (item == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var replaceDic = suitModel.SetReplaceSuitModel(item.itemId, equipPlace); |
| | | var replaceTip = string.Empty; |
| | | var isReplace = false; |
| | | var equipPlaceName = UIHelper.GetEquipPlaceName(equipPlace); |
| | | var lowSuitResult = replaceDic[SuitType.LowSuit]; |
| | | var highSuitResult = replaceDic[SuitType.HighSuit]; |
| | | |
| | | if (lowSuitResult.isNoEffect && !highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt102", equipPlaceName, Language.Get("EquipSuitNormal2")); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.isPerfect && highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt102", equipPlaceName, Language.Get("EquipSuitHigh")); |
| | | isReplace = true; |
| | | return; |
| | | } |
| | | else if (lowSuitResult.isNoEffect && highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt104", equipPlaceName); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.effectLv > 0 && highSuitResult.effectLv <= 0 |
| | | && !highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt101", equipPlaceName, Language.Get("EquipSuitNormal2"), lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (highSuitResult.effectLv > 0 && lowSuitResult.effectLv <= 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt101", equipPlaceName, Language.Get("EquipSuitHigh"), lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (highSuitResult.isNoEffect && lowSuitResult.effectLv > 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt103", equipPlaceName, lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.effectLv > 0 && highSuitResult.effectLv > 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt105", equipPlaceName, highSuitResult.effectLv, lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | |
| | | if (isReplace) |
| | | { |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), replaceTip, |
| | | (bool ok) => |
| | | { |
| | | if (ok) |
| | | { |
| | | PutOnEquip(equipPlace, item.guid); |
| | | } |
| | | } |
| | | ); |
| | | } |
| | | else |
| | | { |
| | | PutOnEquip(equipPlace, item.guid); |
| | | } |
| | | } |
| | | |
| | | void PutOnEquip(int equipPlace, string guid) |
| | | { |
| | | var clientPlaceInfo = EquipSet.ServerPlaceToClientPlace(equipPlace); |
| | |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (suitModel.IsPerfectGetSuitLv(item.itemId, equipPlace)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("SwitchEquip_SuitPanel"); |
| | | } |
| | | |
| | | var washPro = equipWashModel.GetWashEquipInfo(equipPlace); |
| | |
| | | public Dictionary<int, int> wingsRefineMatDict { get; private set; }
|
| | | public Dictionary<ItemOperateType, Action<ItemOperateType, string>> tipsFuncBtnDic { get; private set; }
|
| | |
|
| | | public Dictionary<SuitType, ItemSuitAttrData> suitAttrDataDict { get; private set; }
|
| | | public Dictionary<SuitType, int> suitTypeCntDict { get; private set; }
|
| | |
|
| | | public bool isHavePutLimit { get; private set; }
|
| | |
|
| | | StrengthenModel strengthengmodel { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } }
|
| | | EquipWashModel washModel { get { return ModelCenter.Instance.GetModel<EquipWashModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | PlayerSuitModel SuitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | | RuneModel runeModel { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
|
| | | GodBeastModel beastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | |
|
| | |
| | | {
|
| | | SetWashModel(washModel.OnGetWashType(index), washPro.XLAttrLV, washModel.WashProValues(index));
|
| | | }
|
| | | SetSuitData(itemId, index);
|
| | | }
|
| | |
|
| | | switch (type)
|
| | |
| | | this.stones = stones;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 设置套装数据
|
| | | /// </summary>
|
| | | /// <param name="suitType"></param>
|
| | | public void SetSuitData(int itemId, int equipPlace)
|
| | | {
|
| | | suitAttrDataDict = null;
|
| | | suitTypeCntDict = null;
|
| | |
|
| | |
|
| | | Dictionary<int, int> suitTypeDict = SuitModel.GetServerSuitModelByPlace(index);
|
| | | if (suitTypeDict == null) return;
|
| | |
|
| | | suitAttrDataDict = new Dictionary<SuitType, ItemSuitAttrData>();
|
| | | suitTypeCntDict = new Dictionary<SuitType, int>();
|
| | | int groupType = SuitModel.GetGroupType(index);
|
| | | int equipJob = SuitModel.GetEquipJob(itemId);
|
| | | foreach (var type in suitTypeDict.Keys)
|
| | | {
|
| | | bool isMaker = SuitModel.IsMakerSuit((SuitType)type, itemConfig.ItemColor, itemConfig.StarLevel);
|
| | |
|
| | | if (suitTypeDict[type] > 0 && isMaker)
|
| | | {
|
| | |
|
| | | List<int> placelist = null;
|
| | | int suitCnt = 0;
|
| | | ItemSuitAttrData suitAttrData = default(ItemSuitAttrData);
|
| | | if (this.itemConfig.LV < suitTypeDict[type])
|
| | | {
|
| | | suitAttrData = new ItemSuitAttrData(groupType, type, this.itemConfig.LV, equipJob);
|
| | | suitCnt = SuitModel.GetSameSuitCnt((SuitType)type, equipPlace, this.itemConfig.LV, out placelist, equipJob);
|
| | | }
|
| | | else
|
| | | {
|
| | | suitAttrData = new ItemSuitAttrData(groupType, type, suitTypeDict[type], equipJob);
|
| | | suitCnt = SuitModel.GetSameSuitCnt((SuitType)type, equipPlace, suitTypeDict[type], out placelist, equipJob);
|
| | | }
|
| | | suitAttrDataDict.Add((SuitType)type, suitAttrData);
|
| | | suitTypeCntDict.Add((SuitType)type, suitCnt);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | //设置其他玩家的套装数据
|
| | | public void SetOtherSuitData(int itemId, int equipPlace, Dictionary<int, int> suitTypeDict, Dictionary<SuitType, int> suitCntDict)
|
| | | {
|
| | | this.suitAttrDataDict = null;
|
| | | this.suitTypeCntDict = null;
|
| | | if (suitTypeDict == null || suitCntDict == null) return;
|
| | |
|
| | | suitAttrDataDict = new Dictionary<SuitType, ItemSuitAttrData>();
|
| | | suitTypeCntDict = new Dictionary<SuitType, int>();
|
| | |
|
| | | int groupType = SuitModel.GetGroupType(equipPlace);
|
| | | int equipJob = SuitModel.GetEquipJob(itemId);
|
| | | ItemConfig curConfig = ItemConfig.Get(itemId);
|
| | | foreach (var type in suitTypeDict.Keys)
|
| | | {
|
| | | bool isMaker = SuitModel.IsMakerSuit((SuitType)type, curConfig.ItemColor, curConfig.StarLevel);
|
| | |
|
| | | if (suitTypeDict[type] > 0 && isMaker)
|
| | | {
|
| | |
|
| | | List<int> placelist = null;
|
| | | int suitCnt = 0;
|
| | | ItemSuitAttrData suitAttrData = default(ItemSuitAttrData);
|
| | | if (curConfig.LV < suitTypeDict[type])
|
| | | {
|
| | | suitAttrData = new ItemSuitAttrData(groupType, type, curConfig.LV, equipJob);
|
| | | suitCnt = SuitModel.GetSameSuitCnt((SuitType)type, equipPlace, curConfig.LV, out placelist, equipJob);
|
| | | }
|
| | | else
|
| | | {
|
| | | suitAttrData = new ItemSuitAttrData(groupType, type, suitTypeDict[type], equipJob);
|
| | | suitCnt = SuitModel.GetSameSuitCnt((SuitType)type, equipPlace, suitTypeDict[type], out placelist, equipJob);
|
| | | }
|
| | | suitAttrDataDict.Add((SuitType)type, suitAttrData);
|
| | | this.suitTypeCntDict = suitCntDict;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public int GetSuitCntByType(SuitType suitType)
|
| | | {
|
| | | int cnt = 0;
|
| | | if (this.suitTypeCntDict != null)
|
| | | {
|
| | | this.suitTypeCntDict.TryGetValue(suitType, out cnt);
|
| | | }
|
| | | return cnt;
|
| | | }
|
| | |
|
| | | public bool TryGetItemRemainTime(out double remainTime)
|
| | | {
|
| | | ItemCDCool cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(guid);
|
| | |
| | | SetLegendAttrUI();
|
| | | SetWashAttrUI();
|
| | | SetGemAttrUI();
|
| | | SetSuitAttrUI();
|
| | | for (int i = 0; i < attrCutLinelist.Count; i++)
|
| | | {
|
| | | if (i == curAttrTypeNum - 1)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetSuitAttrUI()
|
| | | {
|
| | | if (itemAttrData.suitAttrDataDict == null)
|
| | | {
|
| | | suitAttr.SetActive(false);
|
| | | return;
|
| | | }
|
| | | curAttrTypeNum = 6;
|
| | | }
|
| | |
|
| | | private void SetMidUIHeight(float midHeight)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | PlayerSuitModel _suitModel;
|
| | | PlayerSuitModel suitModel
|
| | | {
|
| | | get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
|
| | | }
|
| | |
|
| | | public RichTableEvent()
|
| | | {
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.TABLE, this);
|
| | |
| | | index = int.Parse(hrefInfo.mSplits["place"]);
|
| | | }
|
| | |
|
| | | equipSuitList.Clear();
|
| | | suitCountDict.Clear();
|
| | | if (hrefInfo.mSplits.ContainsKey("equippartsuite")
|
| | | && hrefInfo.mSplits["equippartsuite"] != string.Empty)
|
| | | {
|
| | |
| | | catch (Exception e)
|
| | | {
|
| | | DebugEx.Log(e.Message);
|
| | | }
|
| | | if (_json != null)
|
| | | {
|
| | | foreach (var _key in _json.Keys)
|
| | | {
|
| | | var _index = int.Parse(_key);
|
| | | RoleParticularModel.EquipSuit _suit = new RoleParticularModel.EquipSuit()
|
| | | {
|
| | | Index = _index,
|
| | | suitDict = new Dictionary<int, int>()
|
| | | };
|
| | | foreach (var _subKey in _json[_key].Keys)
|
| | | {
|
| | | var _type = int.Parse(_subKey);
|
| | | var _val = int.Parse(_json[_key][_subKey].ToJson());
|
| | | _suit.Add(_type, _val);
|
| | | }
|
| | | equipSuitList.Add(_suit);
|
| | | }
|
| | | for (int i = 0; i < equipSuitList.Count; i++)
|
| | | {
|
| | | var _suit = equipSuitList[i];
|
| | | Dictionary<SuitType, int> _dict = new Dictionary<SuitType, int>();
|
| | | suitCountDict.Add(_suit.Index, _dict);
|
| | | if (_suit.suitDict.ContainsKey((int)SuitType.HighSuit))
|
| | | {
|
| | | _dict.Add(SuitType.HighSuit, GetEquipSuitCount(SuitType.HighSuit, _suit.Index,
|
| | | _suit.suitDict[(int)SuitType.HighSuit]));
|
| | | }
|
| | | if (_suit.suitDict.ContainsKey((int)SuitType.LowSuit))
|
| | | {
|
| | | _dict.Add(SuitType.LowSuit, GetEquipSuitCount(SuitType.LowSuit, _suit.Index,
|
| | | _suit.suitDict[(int)SuitType.LowSuit]));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<SuitType, int> suitCntDict = null;
|
| | | if (hrefInfo.mSplits.ContainsKey("suitcnt"))
|
| | | {
|
| | | suitCntDict = new Dictionary<SuitType, int>();
|
| | | string suitCntData = hrefInfo.mSplits["suitcnt"];
|
| | | string[] split_data = suitCntData.Split('\'');
|
| | | for (int i = 0; i < split_data.Length; i++)
|
| | | {
|
| | | string[] split_value = split_data[i].Split('_');
|
| | | if (split_value.Length == 2)
|
| | | {
|
| | | int key = int.Parse(split_value[0]);
|
| | | suitCntDict.Add((SuitType)key, int.Parse(split_value[1]));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, false, (ulong)itemCount, -1, isBind, false, PackType.Deleted,
|
| | | "", userdatadic);
|
| | | attrData.SetGemModel(stone);
|
| | | attrData.SetStrengthData(strengthenLv, GetStrengthenType(itemId));
|
| | | if (equipSuitList.Count != 0)
|
| | | {
|
| | | var _suit = equipSuitList.Find((x) =>
|
| | | {
|
| | | return x.Index == index;
|
| | | });
|
| | | if (!_suit.Equals(default(RoleParticularModel.EquipSuit)))
|
| | | {
|
| | | attrData.SetOtherSuitData(itemId, index, _suit.suitDict,
|
| | | suitCountDict.ContainsKey(index) ? suitCountDict[index] : null);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | attrData.SetOtherSuitData(itemId, index, suitLvDict, suitCntDict);
|
| | | }
|
| | | if (!_equipWash.Equals(default(RoleParticularModel.EquipWash)))
|
| | | {
|
| | | attrData.SetWashModel(equipWashModel.OnGetWashType(index), _equipWash.LV, _equipWash.Value);
|
| | |
| | | }
|
| | |
|
| | | List<RoleParticularModel.EquipSuit> equipSuitList = new List<RoleParticularModel.EquipSuit>();
|
| | | Dictionary<int, Dictionary<SuitType, int>> suitCountDict = new Dictionary<int, Dictionary<SuitType, int>>();
|
| | | int[][] equipItems = null;
|
| | |
|
| | | public int GetItem(int _index)
|
| | |
| | | default:
|
| | | return Language.Get("EquipSuitWhite");
|
| | | }
|
| | | }
|
| | |
|
| | | public int GetEquipSuitCount(SuitType _type, int _index, int suitLv)
|
| | | {
|
| | | var _count = 0;
|
| | | for (int i = 0; i < equipSuitList.Count; i++)
|
| | | {
|
| | | var _suit = equipSuitList[i];
|
| | | if (suitModel.GetGroupType(_suit.Index) == suitModel.GetGroupType(_index))
|
| | | {
|
| | | if (_suit.suitDict.ContainsKey((int)_type) && _suit.suitDict[(int)_type] > 0)
|
| | | {
|
| | | var _suitLv = _suit.suitDict[(int)_type];
|
| | | int _item = GetItem(_suit.Index);
|
| | | var _itemCfg = ItemConfig.Get(_item);
|
| | | if (_itemCfg == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (suitModel.IsMakerSuit(_type, _itemCfg.ItemColor, _itemCfg.StarLevel))
|
| | | {
|
| | | if (_itemCfg.LV < _suit.suitDict[(int)_type])
|
| | | {
|
| | | _suitLv = _itemCfg.LV;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _suitLv = 0;
|
| | | }
|
| | | if (_suitLv == suitLv)
|
| | | {
|
| | | _count++;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return _count;
|
| | | }
|
| | |
|
| | | public static int GetStrengthenType(int _id)
|
| | |
| | |
|
| | | public DateTime getTime;
|
| | |
|
| | | Dictionary<int, Dictionary<SuitType, int>> suitCountDict = new Dictionary<int, Dictionary<SuitType, int>>();
|
| | | public void AnalysisEquipSuit()
|
| | | {
|
| | | if (itemDatas == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | suitCountDict.Clear();
|
| | | for (int i = 0; i < itemDatas.Length; i++)
|
| | | {
|
| | | EquipSuit _suit;
|
| | | if (rolePlusData.TryGetEquipSuit(itemDatas[i].ItemIndex, out _suit))
|
| | | {
|
| | | Dictionary<SuitType, int> _dict = new Dictionary<SuitType, int>();
|
| | | suitCountDict.Add(itemDatas[i].ItemIndex, _dict);
|
| | | if (_suit.suitDict.ContainsKey((int)SuitType.HighSuit))
|
| | | {
|
| | | _dict.Add(SuitType.HighSuit, rolePlusData.GetEquipSuitCount(SuitType.HighSuit, itemDatas[i].ItemIndex,
|
| | | _suit.suitDict[(int)SuitType.HighSuit]));
|
| | | }
|
| | | if (_suit.suitDict.ContainsKey((int)SuitType.LowSuit))
|
| | | {
|
| | | _dict.Add(SuitType.LowSuit, rolePlusData.GetEquipSuitCount(SuitType.LowSuit, itemDatas[i].ItemIndex,
|
| | | _suit.suitDict[(int)SuitType.LowSuit]));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public Dictionary<SuitType, int> GetEquipAllSuitCount(int _index)
|
| | | {
|
| | | Dictionary<SuitType, int> _dict = null;
|
| | | suitCountDict.TryGetValue(_index, out _dict);
|
| | | return _dict;
|
| | | }
|
| | |
|
| | | public int GetSuitTypeCount(SuitType _type)
|
| | | {
|
| | | return rolePlusData.GetEquipSuitCount(_type);
|
| | | }
|
| | |
|
| | | public int GetEquipSuitLevel()
|
| | | {
|
| | | int _suitCount = 0;
|
| | | var _rank = 0;
|
| | | if (rolePlusData != null)
|
| | | {
|
| | | var _list = rolePlusData.equipSuitList;
|
| | | ItemData _itemData = null;
|
| | | roleEquipDataDic.TryGetValue(RoleEquipType.Clothes, out _itemData);
|
| | | if (_itemData == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | var itemConfig = ItemConfig.Get(_itemData.ItemID);
|
| | | _rank = itemConfig.LV;
|
| | | for (int i = 0; i < _list.Count; i++)
|
| | | {
|
| | | var _suit = _list[i];
|
| | | if (_suit.Index >= (int)RoleEquipType.Hat
|
| | | && _suit.Index <= (int)RoleEquipType.Shoes
|
| | | && roleEquipDataDic.TryGetValue((RoleEquipType)_suit.Index, out _itemData))
|
| | | {
|
| | | itemConfig = ItemConfig.Get(_itemData.ItemID);
|
| | | if (itemConfig.SuiteiD <= 0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (_suit.suitDict != null && (_suit.suitDict.ContainsKey(1) || _suit.suitDict.ContainsKey(2)))
|
| | | {
|
| | | if (itemConfig.LV >= _rank)
|
| | | {
|
| | | _suitCount += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | if (_suitCount >= 5)
|
| | | {
|
| | | return _suitCount;
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public int AtkSpeed { get; private set; }
|
| | | public int Rune { get; private set; }
|
| | |
|
| | | PlayerSuitModel _suitModel;
|
| | | PlayerSuitModel suitModel
|
| | | {
|
| | | get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
|
| | | }
|
| | |
|
| | | RoleParticularModel m_Model;
|
| | | RoleParticularModel model
|
| | |
| | | return godWeaponDict[type];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetEquipSuitCount(SuitType _type)
|
| | | {
|
| | | var _count = 0;
|
| | | for (int i = 0; i < equipSuitList.Count; i++)
|
| | | {
|
| | | if (equipSuitList[i].suitDict != null && equipSuitList[i].suitDict.ContainsKey((int)_type))
|
| | | {
|
| | | _count++;
|
| | | }
|
| | | }
|
| | | return _count;
|
| | | }
|
| | |
|
| | | public int GetEquipSuitCount(SuitType _type, int _index, int suitLv)
|
| | | {
|
| | | var _count = 0;
|
| | | for (int i = 0; i < equipSuitList.Count; i++)
|
| | | {
|
| | | EquipSuit _suit = equipSuitList[i];
|
| | | if (suitModel.GetGroupType(_suit.Index) == suitModel.GetGroupType(_index))
|
| | | {
|
| | | if (_suit.suitDict.ContainsKey((int)_type) && _suit.suitDict[(int)_type] > 0)
|
| | | {
|
| | | var _suitLv = _suit.suitDict[(int)_type];
|
| | | ItemData _item = model.GetItemData((RoleEquipType)_suit.Index);
|
| | | if (_item == null)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var _itemCfg = ItemConfig.Get(_item.ItemID);
|
| | | if (suitModel.IsMakerSuit(_type, _itemCfg.ItemColor, _itemCfg.StarLevel))
|
| | | {
|
| | | if (_itemCfg.LV < _suit.suitDict[(int)_type])
|
| | | {
|
| | | _suitLv = _itemCfg.LV;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _suitLv = 0;
|
| | | }
|
| | | if (_suitLv == suitLv)
|
| | | {
|
| | | _count++;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return _count;
|
| | | }
|
| | |
|
| | | public bool TryGetEquipSuit(int _index, out EquipSuit _suit)
|
| | |
| | | [SerializeField] Text fightPowerTxt;
|
| | | [SerializeField] RawImage roleModel;
|
| | |
|
| | |
|
| | | RoleParticularModel m_Model;
|
| | | RoleParticularModel model {
|
| | | get {
|
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RoleParticularModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | FriendsModel m_FriendModel;
|
| | | FriendsModel friendsModel {
|
| | | get {
|
| | | return m_FriendModel ?? (m_FriendModel = ModelCenter.Instance.GetModel<FriendsModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | EquipWashModel m_EquipWashModel;
|
| | | EquipWashModel equipWashModel {
|
| | | get {
|
| | | return m_EquipWashModel ?? (m_EquipWashModel = ModelCenter.Instance.GetModel<EquipWashModel>());
|
| | | }
|
| | | }
|
| | | StrengthenModel m_StrengthengModel;
|
| | | StrengthenModel strengthengmodel {
|
| | | get {
|
| | | return m_StrengthengModel ?? (m_StrengthengModel = ModelCenter.Instance.GetModel<StrengthenModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel {
|
| | | get {
|
| | | return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
| | | }
|
| | | }
|
| | | RoleParticularModel model { get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); } }
|
| | | FriendsModel friendsModel { get { return ModelCenter.Instance.GetModel<FriendsModel>(); } }
|
| | | EquipWashModel equipWashModel { get { return ModelCenter.Instance.GetModel<EquipWashModel>(); } }
|
| | | StrengthenModel strengthengmodel { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | if (equipWash.HasValue)
|
| | | {
|
| | | attrData.SetWashModel(equipWashModel.OnGetWashType((int)type), equipWash.Value.LV, equipWash.Value.Value);
|
| | | }
|
| | | RoleParticularModel.EquipSuit _suit;
|
| | | if (viewPlayerData.rolePlusData.TryGetEquipSuit(itemData.ItemIndex, out _suit))
|
| | | {
|
| | | attrData.SetOtherSuitData(itemData.ItemID, itemData.ItemIndex, _suit.suitDict, viewPlayerData.GetEquipAllSuitCount(itemData.ItemIndex));
|
| | | }
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | PlayerSuitModel _suitModel;
|
| | | PlayerSuitModel SuitModel
|
| | | {
|
| | | get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
|
| | | }
|
| | |
|
| | | MountModel m_HorseModel;
|
| | | MountModel horsemodel
|
| | | {
|
| | |
| | | case FuncPowerType.Stone:
|
| | | targetValue = GetAllStoneLv(viewPlayerData.rolePlusData.GetAllEquipStone());
|
| | | selfValue = equipGemModel.GetAllGemsLevel();
|
| | | break;
|
| | | case FuncPowerType.Suit:
|
| | | handled = true;
|
| | | var _targetSuitCount0 = viewPlayerData.GetSuitTypeCount(SuitType.LowSuit);
|
| | | var _targetSuitCount1 = viewPlayerData.GetSuitTypeCount(SuitType.HighSuit);
|
| | | var _selfSuitCount0 = SuitModel.GetSameSuitCntByType(SuitType.LowSuit);
|
| | | var _selfSuitCount1 = SuitModel.GetSameSuitCntByType(SuitType.HighSuit);
|
| | | targetCompareTxt.text = UIHelper.ReplaceNewLine(Language.Get("ViewFuncSuit_0", _targetSuitCount0, _targetSuitCount1));
|
| | | selfCompareTxt.text = UIHelper.ReplaceNewLine(Language.Get("ViewFuncSuit_0", _selfSuitCount0, _selfSuitCount1));
|
| | | break;
|
| | | case FuncPowerType.Wing:
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | PlayerSuitModel _suitModel;
|
| | | PlayerSuitModel SuitModel
|
| | | {
|
| | | get { return _suitModel ?? (_suitModel = ModelCenter.Instance.GetModel<PlayerSuitModel>()); }
|
| | | }
|
| | |
|
| | | GemModel gemModel { get { return ModelCenter.Instance.GetModel<GemModel>(); } }
|
| | |
|
| | | BlastFurnaceModel blastFurnaceModel { get { return ModelCenter.Instance.GetModel<BlastFurnaceModel>(); } }
|
| | |
| | | SetLegendAttrUI();
|
| | | SetWashAttrUI();
|
| | | SetGemAttrUI();
|
| | | SetSuitAttrUI();
|
| | | for (int i = 0; i < attrCutLinelist.Count; i++)
|
| | | {
|
| | | if (i == curAttrTypeNum - 1)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetSuitAttrUI()
|
| | | {
|
| | | if (itemAttrData.suitAttrDataDict == null)
|
| | | {
|
| | | suitAttr.SetActive(false);
|
| | | return;
|
| | | }
|
| | | switch (itemAttrData.itemConfig.EquipPlace)
|
| | | {
|
| | | case 101:
|
| | | case 102:
|
| | | case 103:
|
| | | case 104:
|
| | | case 105:
|
| | | suitAttr.SetActive(false);
|
| | | return;
|
| | | }
|
| | | curAttrTypeNum = 6;
|
| | | }
|
| | |
|
| | | private void SetMidUIHeight(float midHeight)
|
| | |
| | | }
|
| | | private Button _closeBtn;
|
| | |
|
| | | private EquipSuitTips _suitTips;
|
| | | public EquipSuitTips SuitTips {
|
| | | get {
|
| | | if (_suitTips == null)
|
| | | _suitTips = transform.Find("CommonPanel/EquipSuitPanel").GetComponent<EquipSuitTips>();
|
| | | return _suitTips;
|
| | | }
|
| | | }
|
| | |
|
| | | private StrengtheningSripts _strengtheningPanel;
|
| | | public StrengtheningSripts StrengthenPnl {
|
| | | get {
|
| | |
| | | StrengthenPnl.gameObject.SetActive(false);
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | SuitTips.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | |
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | |
| | |
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(true);
|
| | | SuitTips.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | | functionOrder = _washTitle.order;
|
| | | }
|
| | |
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | | SuitTips.gameObject.SetActive(true);
|
| | | functionOrder = _equipSuitTitle.order;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | SuitTips.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(true);
|
| | | model.redPointStre.state = RedPointState.None;
|
| | | functionOrder = _wingsRefineTitle.order;
|
| | |
| | | }
|
| | | _InlaidGemPanel.gameObject.SetActive(true);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | SuitTips.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | | functionOrder = _inlayTitle.order;
|
| | | }
|
| | |
| | | StrengthenPnl.gameObject.SetActive(true);
|
| | | _InlaidGemPanel.gameObject.SetActive(false);
|
| | | WashTip.gameObject.SetActive(false);
|
| | | SuitTips.gameObject.SetActive(false);
|
| | | _wingsRefinePanel.SetActive(false);
|
| | | functionOrder = _strengthTitle.order;
|
| | | }
|
| | |
| | | [SerializeField] RectTransform m_ContainerHas;
|
| | | [SerializeField] List<PropertyBehaviour> properties;
|
| | |
|
| | | PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | | PackModel pack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | public StrengthenModel strengthengmodel
|
| | | {
|
| | |
| | | properties[_index].DisplayUpper(_key, _value);
|
| | | _index++;
|
| | | }
|
| | | break;
|
| | | case TreasurePrivilege.Suit:
|
| | | var percentSuit = (float)special.propertyDict[87] / 10000;
|
| | | var dict = suitModel.GetActiveSuitAttr();
|
| | | var _suitIndex = 0;
|
| | | foreach (var _key in dict.Keys)
|
| | | {
|
| | | var propertyConfig = PlayerPropertyConfig.Get(_key);
|
| | | if (propertyConfig == null || propertyConfig.type != 1)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | properties[_suitIndex].gameObject.SetActive(true);
|
| | | properties[_suitIndex].DisplayUpper(_key, (int)(percentSuit * dict[_key]));
|
| | | _suitIndex++;
|
| | | }
|
| | | m_ContainerHas.gameObject.SetActive(_suitIndex > 0);
|
| | | m_ContainerNone.gameObject.SetActive(_suitIndex == 0);
|
| | | break;
|
| | | case TreasurePrivilege.Wing:
|
| | | var percentWing = (float)special.propertyDict[86] / 10000;
|
| | |
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<TreasureSoulModel>());
|
| | | }
|
| | | }
|
| | | PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | | PackModel pack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | public StrengthenModel strengthengmodel
|
| | |
| | | m_PreviewPropretys[_index].DisplayUpper(_key, _value);
|
| | | _index++;
|
| | | }
|
| | | break;
|
| | | case TreasurePrivilege.Suit:
|
| | | var percentSuit = (float)special.propertyDict[87] / 10000;
|
| | | var dict = suitModel.GetActiveSuitAttr();
|
| | | var _suitIndex = 0;
|
| | | foreach (var _key in dict.Keys)
|
| | | {
|
| | | var propertyConfig = PlayerPropertyConfig.Get(_key);
|
| | | if (propertyConfig == null || propertyConfig.type != 1)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | m_PreviewPropretys[_suitIndex].gameObject.SetActive(true);
|
| | | m_PreviewPropretys[_suitIndex].DisplayUpper(_key, (int)(percentSuit * dict[_key]));
|
| | | _suitIndex++;
|
| | | }
|
| | | m_ContainerPreview.gameObject.SetActive(_suitIndex > 0);
|
| | | break;
|
| | | case TreasurePrivilege.Wing:
|
| | | var percentWing = (float)special.propertyDict[86] / 10000;
|
| | |
| | | {
|
| | | private Dictionary<int, List<FindTreasureInfo>> findTreasureDict = new Dictionary<int, List<FindTreasureInfo>>();
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | PlayerSuitModel playerSuit { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | |
|
| | | public List<int> treasureIdlist { get; set; }
|
| | |
| | | SetTreasureCellRedKey();
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += RefreshPlayerData;
|
| | | playerPack.refreshItemCountEvent += RefreshEquipInfo;
|
| | | playerSuit.RefreshSuitModelAct += RefreshSuitInfo;
|
| | | treasureModel.treasureStateChangeEvent += RefreshTreasureState;
|
| | | FuncConfigConfig SamboSpecialUnlock = FuncConfigConfig.Get("SamboSpecialUnlock");
|
| | | specEquipIds = ConfigParse.GetMultipleStr<int>(SamboSpecialUnlock.Numerical1);
|
| | |
| | | {
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= RefreshPlayerData;
|
| | | playerPack.refreshItemCountEvent -= RefreshEquipInfo;
|
| | | playerSuit.RefreshSuitModelAct -= RefreshSuitInfo;
|
| | | treasureModel.treasureStateChangeEvent -= RefreshTreasureState;
|
| | | }
|
| | |
|
| | |
| | | foreach(var condi in treasureInfo.needConditionsDict.Values)
|
| | | {
|
| | | progress = 0;
|
| | | foreach (var place in equipDict.Keys)
|
| | | {
|
| | | int serverSuitLv = playerSuit.GetServerSuitLv(equipDict[place].itemPlace,condi[1]);
|
| | | bool isMaker = playerSuit.IsMakerSuit((SuitType)condi[1], equipDict[place].config.ItemColor,
|
| | | equipDict[place].config.StarLevel);
|
| | |
|
| | | if (isMaker)
|
| | | {
|
| | | int realSuitLv = serverSuitLv;
|
| | | if (equipDict[place].config.LV < serverSuitLv)
|
| | | {
|
| | | realSuitLv = equipDict[place].config.LV;
|
| | | }
|
| | | if(realSuitLv >= condi[0])
|
| | | {
|
| | | progress += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | if(progress >= treasureInfo.targetNum)
|
| | | {
|
| | | return true;
|
| | |
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private void RefreshSuitInfo()
|
| | | {
|
| | | for(int i = 0; i < treasureIdlist.Count;i++)
|
| | | {
|
| | | if(i == 0)
|
| | | {
|
| | | RedPointStateCtrl(treasureIdlist[i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | Treasure treasure = null;
|
| | | treasureModel.TryGetTreasure(treasureIdlist[i-1], out treasure);
|
| | | if(treasure != null && treasure.state == TreasureState.Collected)
|
| | | {
|
| | | RedPointStateCtrl(treasureIdlist[i]);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshEquipInfo(PackType type, int index, int itemId)
|
| | |
| | | RegisterModel<ImpactRankModel>();
|
| | | RegisterModel<InSevenDayModel>();
|
| | | RegisterModel<LevelGiftModel>();
|
| | | RegisterModel<PlayerSuitModel>();
|
| | | RegisterModel<CapacityDelayModel>();
|
| | | RegisterModel<TreasureEffectModel>();
|
| | | RegisterModel<MonthlyInvestmentModel>();
|
| | |
| | | ImpactRankModel rankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
|
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | | MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
|
| | | PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | |
|
| | | #region 解析本地数据
|
| | | public Dictionary<int, WindowSearchData> windowSearchDataDict { get; private set; }
|
| | |
| | | break;
|
| | | case JumpUIType.EquipHighSuit:
|
| | | case JumpUIType.EquipLowSuit:
|
| | | int suitType = 0;
|
| | | int.TryParse(_tagWinSearchModel.SelectActive, out suitType);
|
| | | suitModel.SetJumpModel(suitType);
|
| | | SetJumpLogic<EquipReinforceWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.ComposeFunc1:
|
| | | case JumpUIType.ComposeFunc2:
|
| | |
| | | wingsId = resourceId;
|
| | | }
|
| | |
|
| | | PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | private void LoadClothesEffect()
|
| | |
| | | if (i == (int)RoleEquipType.Clothes)
|
| | | {
|
| | | _rank = _itemModel.config.LV;
|
| | | }
|
| | |
|
| | | if (suitModel.suitModelDict.ContainsKey(i))
|
| | | {
|
| | | if (suitModel.suitModelDict[i].ContainsKey(1)
|
| | | || suitModel.suitModelDict[i].ContainsKey(2))
|
| | | {
|
| | | if (_itemModel.config.LV >= _rank)
|
| | | {
|
| | | _suitCount += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|