Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | |
|
| | | if (secondTypeDict != null)
|
| | | {
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0
|
| | | && curThirdType == 0)
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0)
|
| | | {
|
| | | cellCtrl.JumpIndex(curSecondType - 1);
|
| | | }
|
| | |
| | | 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);
|
| | |
| | | private void OnClickThirdType(int thirdType)
|
| | | {
|
| | | curThirdType = thirdType;
|
| | | CreateCell();
|
| | | //RefreshUI(thirdTypelist[0]);
|
| | | cellCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void RefreshUI(ItemCompoundConfig compoundModel)
|
| | |
| | | using Snxxz.UI;
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | |
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | this.transform.SetAsLastSibling();
|
| | | StartCoroutine(SetOffestPos());
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | |
| | |
|
| | | if (secondTypeDict != null)
|
| | | {
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0
|
| | | && curThirdType == 0)
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0)
|
| | | {
|
| | | cellCtrl.JumpIndex(curSecondType - 1);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private IEnumerator SetOffestPos()
|
| | | {
|
| | | yield return null;
|
| | | if (curThirdType != 0)
|
| | | {
|
| | | cellCtrl.JumpIndex(curThirdType*50, 0, EnhancedUI.EnhancedScroller.EnhancedScroller.TweenType.immediate);
|
| | | }
|
| | | }
|
| | | private void RefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | Image icon = cell.transform.Find("BtnIcon").GetComponent<Image>();
|
| | |
| | | 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);
|
| | |
| | | {
|
| | | if (thirdType != 0)
|
| | | {
|
| | |
|
| | | if (preSecondType == curSecondType)
|
| | | {
|
| | | curSecondType = 0;
|
| | |
| | | private void OnClickThirdType(int thirdType)
|
| | | {
|
| | | curThirdType = thirdType;
|
| | | CreateCell();
|
| | | //RefreshUI(thirdTypelist[0]);
|
| | | cellCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void RefreshUI(ItemCompoundConfig compoundModel)
|
| | |
| | | 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)
|
| | |
| | |
|
| | | if(secondTypeDict != null)
|
| | | {
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0
|
| | | && curThirdType == 0)
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0)
|
| | | {
|
| | | cellCtrl.JumpIndex(curSecondType - 1);
|
| | | }
|
| | |
| | | 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);
|
| | |
| | | private void OnClickThirdType(int thirdType)
|
| | | {
|
| | | curThirdType = thirdType;
|
| | | CreateCell();
|
| | | //RefreshUI(thirdTypelist[0]);
|
| | | cellCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | selectModel.ClearSelectModel();
|
| | | }
|
| | |
|
| | |
| | |
|
| | | static void OnShowBossLifeBar(uint _instanceId, int _npcId, bool _show)
|
| | | {
|
| | | int mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | if (ModelCenter.Instance.GetModel<DungeonModel>().GetDungeonDataIdByMapId(mapId) == DemonJarModel.DEMONJAR_MAPID)
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | var dataMapId = ModelCenter.Instance.GetModel<DungeonModel>().GetDungeonDataIdByMapId(mapId);
|
| | | if (dataMapId == DemonJarModel.DEMONJAR_MAPID)
|
| | | {
|
| | | if (_show)
|
| | | {
|
| | |
| | |
|
| | | static void OnRefreshBossLifeBar(uint _instanceId, int _npcId, ulong _hp, ulong _maxHp)
|
| | | {
|
| | | int mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | if (ModelCenter.Instance.GetModel<DungeonModel>().GetDungeonDataIdByMapId(mapId) == DemonJarModel.DEMONJAR_MAPID)
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | var dataMapId = ModelCenter.Instance.GetModel<DungeonModel>().GetDungeonDataIdByMapId(mapId);
|
| | | if (dataMapId == DemonJarModel.DEMONJAR_MAPID)
|
| | | {
|
| | | DemonJarBossLifeBarWin win;
|
| | | if (!WindowCenter.Instance.CheckOpen<DemonJarBossLifeBarWin>())
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.SelectTarget != null
|
| | | && PlayerDatas.Instance.hero.SelectTarget.ServerInstID == TargetBriefInfoWin.currentBossInstanceId)
|
| | | {
|
| | | TargetBriefInfoWin win;
|
| | | if (!WindowCenter.Instance.CheckOpen<TargetBriefInfoWin>())
|
| | | {
|
| | | win = WindowCenter.Instance.Open<TargetBriefInfoWin>(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | win = WindowCenter.Instance.Get<TargetBriefInfoWin>();
|
| | | }
|
| | |
|
| | | TargetBriefInfoWin win;
|
| | | if (!WindowCenter.Instance.CheckOpen<TargetBriefInfoWin>())
|
| | | {
|
| | | win = WindowCenter.Instance.Open<TargetBriefInfoWin>(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | win = WindowCenter.Instance.Get<TargetBriefInfoWin>();
|
| | | win.RefreshBossLifeBar(_instanceId, _npcId, _hp, _maxHp);
|
| | | }
|
| | |
|
| | | win.RefreshBossLifeBar(_instanceId, _npcId, _hp, _maxHp);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | static void OnHideBossLifeBar(uint _instanceId, int _npcId)
|
| | | {
|
| | | var win = WindowCenter.Instance.Get<TargetBriefInfoWin>();
|
| | | if (win != null)
|
| | | {
|
| | | win.HideBossLifeBar(_instanceId, _npcId);
|
| | | }
|
| | | }
|
| | |
|
| | | static void OnShowPlayerLifeBar(uint _instanceId, bool _show)
|
| | |
| | | [SerializeField] Transform m_ContainerPlayer;
|
| | | [SerializeField] PlayerLifeBar m_PlayerLifeBar;
|
| | |
|
| | | uint currentBossInstanceId = 0;
|
| | | uint currentPlayerInstanceId = 0;
|
| | | public static uint currentBossInstanceId = 0;
|
| | | public static uint currentPlayerInstanceId = 0;
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | }
|
| | |
|
| | | m_BossLifeBar.Show(_hp, _maxHp);
|
| | | }
|
| | |
|
| | | public void HideBossLifeBar(uint _instanceId, int _npcId)
|
| | | {
|
| | | if (_instanceId != currentBossInstanceId)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | currentBossInstanceId = 0;
|
| | | m_ContainerBoss.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | public void ShowPlayerLifeBar(uint _instanceId, bool _show)
|
| | |
| | | public List<int> dungeonCanUseMoneyIds { get; private set; }
|
| | |
|
| | | public Dictionary<int, int> dungeonRebornClientTimes { get; private set; }
|
| | | public int[] CompareEquipPlaces { get; private set;}
|
| | | public Dictionary<int,int> fairyGrabBossMapLines { get; private set; }
|
| | | public int[] CompareEquipPlaces { get; private set; }
|
| | | public Dictionary<int, int> fairyGrabBossMapLines { get; private set; }
|
| | |
|
| | | public Dictionary<int, List<int>> DropItemEffectMapID { get; private set; }
|
| | |
|
| | | public void Init()
|
| | | {
|
| | |
| | | {
|
| | | fairyGrabBossMapLines[_key] = fairyGrabBossMapLines[_key] - 1;
|
| | | }
|
| | |
|
| | | if (DropItemEffectMapID == null)
|
| | | {
|
| | | DropItemEffectMapID = new Dictionary<int, List<int>>();
|
| | | }
|
| | | DropItemEffectMapID.Clear();
|
| | | func = Config.Instance.Get<FuncConfigConfig>("DropItemEffectMapID");
|
| | | _data = LitJson.JsonMapper.ToObject(func.Numerical1);
|
| | | int _itemID;
|
| | | _keys.Clear();
|
| | | _keys.AddRange(_data.Keys);
|
| | | for (int j = 0; j < _keys.Count; ++j)
|
| | | {
|
| | | if (int.TryParse(_keys[j].ToString(), out _itemID))
|
| | | {
|
| | | if (!DropItemEffectMapID.ContainsKey(_itemID))
|
| | | {
|
| | | DropItemEffectMapID.Add(_itemID, new List<int>());
|
| | | }
|
| | | var _jsonMapIDs = _data[_keys[j]];
|
| | | foreach (var _jsonMapID in _jsonMapIDs)
|
| | | {
|
| | | var _mapID = ((LitJson.IJsonWrapper)_jsonMapID).GetInt();
|
| | | if (!DropItemEffectMapID[_itemID].Contains(_mapID))
|
| | | {
|
| | | DropItemEffectMapID[_itemID].Add(_mapID);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | SFXController _itemDropEffect = null;
|
| | | private void CheckPlayEffect(int id)
|
| | | {
|
| | | if (GeneralConfig.Instance.DropItemEffectMapID.ContainsKey(id))
|
| | | {
|
| | | if (!GeneralConfig.Instance.DropItemEffectMapID[id].Contains(PlayerDatas.Instance.baseData.MapID))
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | if (hasAppearCount < GeneralConfig.Instance.maxItemDropEffectCount)
|
| | | {
|
| | | var _itemConfig = Config.Instance.Get<ItemConfig>(id);
|
| | |
| | |
|
| | | 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 属性类型,属性ID
|
| | | public Dictionary<int, Dictionary<int, int>> legendAttrColorValuePreviewDict { get; private set; } // key 属性ID value 装备品质,属性数值
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | 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);
|
| | |
| | |
|
| | | 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);
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | prefab = InstanceResourcesLoader.LoadModelRes(secondaryId);
|
| | | if (prefab)
|
| | | {
|
| | | if (secondaryModel)
|
| | | {
|
| | | secondaryModel.SetActive(true);
|
| | | }
|
| | | pool = GameObjectPoolManager.Instance.RequestPool(prefab);
|
| | | pool.Release(secondaryModel);
|
| | | }
|
| | |
| | | weaponModel = pool.Request();
|
| | |
|
| | | LayerUtility.SetLayer(weaponModel, LayerUtility.Player, false);
|
| | | var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
|
| | | weaponModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | if (clothesModel)
|
| | | {
|
| | | var parent = clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.WeaponBindBoneName);
|
| | | weaponModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | }
|
| | | }
|
| | |
|
| | | weaponId = newWeapon;
|