3335 删除诛仙装备,删除旧套装效果代码,添加装备洗练功能。
8 文件已复制
23个文件已删除
2 文件已重命名
8个文件已添加
57个文件已修改
| | |
| | | for (int i = 0; i < vNetData.EquipCount; i++) |
| | | { |
| | | HA3BC_tagMCStoneInfo.tagMCStoneMsg data = vNetData.InfoList[i]; |
| | | |
| | | if (data.EquipPlace >= (int)RoleEquipType.JadeDynasty_Cloak |
| | | && data.EquipPlace <= (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | {
|
| | | continue;
|
| | | } |
| | | |
| | | if (stoneDic.ContainsKey(data.EquipPlace)) |
| | | { |
| | | stoneDic[data.EquipPlace] = data.StoneInfo; |
| | |
| | | private int m_Tick;
|
| | | public uint crossServerTick;
|
| | |
|
| | | public event Action OnRoleAttrRefresh;
|
| | | public event Action worldLevelUpdateEvent;
|
| | | public event Action<E_AttackMode> OnSwitchAttackMode;
|
| | | public event Action InitPlayerInfoEvent;
|
| | | public event Action RefreshPlayerInfoEvent;
|
| | |
|
| | | public event Action playerDataUpdateEvent;
|
| | | public event Action<PlayerDataType> playerDataRefreshEvent;
|
| | | public event Action<PlayerDataType, int> attributePromoteEvent;
|
| | | public event Action<long> spNewGetEvent;
|
| | |
| | | {
|
| | | baseData.UpdateData(data);
|
| | | HangUpSetModel.Instance.SetOfflinePluginTime((int)baseData.hangTime);
|
| | | if (InitPlayerInfoEvent != null)
|
| | | if (playerDataUpdateEvent!=null)
|
| | | {
|
| | | InitPlayerInfoEvent();
|
| | | playerDataUpdateEvent();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | CameraController.Instance.Apply();
|
| | | }
|
| | |
|
| | | if (InitPlayerInfoEvent != null)
|
| | | if (playerDataUpdateEvent != null)
|
| | | {
|
| | | InitPlayerInfoEvent();
|
| | | playerDataUpdateEvent();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | RefreshProperty(false, PlayerDataType.HP, hp);
|
| | |
|
| | | if (RefreshPlayerInfoEvent != null)
|
| | | if (playerDataUpdateEvent != null)
|
| | | {
|
| | | RefreshPlayerInfoEvent();
|
| | | playerDataUpdateEvent();
|
| | | }
|
| | |
|
| | | if (playerDataRefreshEvent != null)
|
| | |
| | | {
|
| | | UpdatePlayerData(vNetData);
|
| | | StoreModel.RefreshTCBPlayerData(vNetData);
|
| | | if (RefreshPlayerInfoEvent != null)
|
| | | if (playerDataUpdateEvent != null)
|
| | | {
|
| | | RefreshPlayerInfoEvent();
|
| | | playerDataUpdateEvent();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | UpdatePlayerData(data);
|
| | | }
|
| | |
|
| | | if (RefreshPlayerInfoEvent != null)
|
| | | if (playerDataUpdateEvent != null)
|
| | | {
|
| | | RefreshPlayerInfoEvent();
|
| | | playerDataUpdateEvent();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | this.worldLv = worldLv;
|
| | | this.worldExpRate = worldExpRate;
|
| | | if (OnRoleAttrRefresh != null)
|
| | | if (worldLevelUpdateEvent != null)
|
| | | {
|
| | | OnRoleAttrRefresh();
|
| | | worldLevelUpdateEvent();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public partial class EquipWashConfig : IConfigPostProcess
|
| | | {
|
| | | private static Dictionary<string, EquipWashData> equipWashDict = new Dictionary<string, EquipWashData>();
|
| | | private static Dictionary<int, EquipWashData> equipWashDict = new Dictionary<int, EquipWashData>();
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | string key = StringUtility.Contact(type, level);
|
| | | EquipWashData washData = new EquipWashData();
|
| | | washData.guid = key;
|
| | | washData.washConfig = this;
|
| | | var key = type * 100 + level;
|
| | | var washData = new EquipWashData();
|
| | | washData.config = this;
|
| | | washData.mustCosts = ConfigParse.GetMultipleStr<int>(costMoneyList);
|
| | | if (!equipWashDict.ContainsKey(key))
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 根据洗练等级以及类型取到对应洗练数据
|
| | | /// </summary>
|
| | | /// <param name="level"></param>
|
| | | /// <param name="type"></param>
|
| | | /// <returns></returns>
|
| | | public static EquipWashData GetEquipWashData(int type, int level)
|
| | | public static EquipWashData Get(int type, int level)
|
| | | {
|
| | | string strId = StringUtility.Contact(type, level);
|
| | | EquipWashData equipWash = null;
|
| | | equipWashDict.TryGetValue(strId, out equipWash);
|
| | | return equipWash;
|
| | | var key = type * 100 + level;
|
| | | EquipWashData data = null;
|
| | | equipWashDict.TryGetValue(key, out data);
|
| | | return data;
|
| | | }
|
| | |
|
| | | public class EquipWashData
|
| | | {
|
| | | public string guid;
|
| | | public EquipWashConfig washConfig;
|
| | | public EquipWashConfig config;
|
| | | public int[] mustCosts;
|
| | | }
|
| | | }
|
copy from Core/NetworkPackage/DTCFile/ClientPack/ClientToGameServer/CB5_Bourse.meta
copy to Core/NetworkPackage/DTCFile/ClientPack.meta
| File was copied from Core/NetworkPackage/DTCFile/ClientPack/ClientToGameServer/CB5_Bourse.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: eda9144d4aff79c4792c7176165a25f8 |
| | | guid: 722e5e3d30096674e811f5bd191246a0 |
| | | folderAsset: yes |
| | | timeCreated: 1551063933 |
| | | timeCreated: 1539228128 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | |
| | | 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)
|
| | |
| | | int _type = LuaAPI.xlua_tointeger(L, 1); |
| | | int _level = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | EquipWashConfig.EquipWashData gen_ret = EquipWashConfig.GetEquipWashData( _type, _level ); |
| | | EquipWashConfig.EquipWashData gen_ret = EquipWashConfig.Get( _type, _level ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.OnRoleAttrRefresh += gen_delegate; |
| | | gen_to_be_invoked.worldLevelUpdateEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.OnRoleAttrRefresh -= gen_delegate; |
| | | gen_to_be_invoked.worldLevelUpdateEvent -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.InitPlayerInfoEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.InitPlayerInfoEvent -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.RefreshPlayerInfoEvent += gen_delegate; |
| | | gen_to_be_invoked.playerDataUpdateEvent += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.RefreshPlayerInfoEvent -= gen_delegate; |
| | | gen_to_be_invoked.playerDataUpdateEvent -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | |
| | | 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) |
| | |
| | | if (_places.Contains(item.config.EquipPlace))
|
| | | {
|
| | | if (!ItemLogicUtility.Instance.IsOverdue(item.guid, item.itemId)
|
| | | && (item.config.JobLimit == 0 || (item.config.JobLimit / 100) == job) && item.equipScore > score)
|
| | | && (ItemLogicUtility.Instance.IsJobCompatibleItem( item.itemId)) && item.equipScore > score)
|
| | | {
|
| | | guid = item.guid;
|
| | | }
|
| | |
| | | {
|
| | | var overdue = ItemLogicUtility.Instance.IsOverdue(item.guid, item.itemId, item.useDataDict);
|
| | |
|
| | | if (!overdue && _places.Contains(item.config.EquipPlace) && (item.config.JobLimit == 0 || (item.config.JobLimit / 100) == job))
|
| | | if (!overdue && _places.Contains(item.config.EquipPlace) && ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId))
|
| | | {
|
| | | var equipedItem = equipPackage.GetItemByIndex(item.config.EquipPlace);
|
| | | var equipdItemScore = equipedItem == null ? 0 : equipedItem.equipScore;
|
| | |
| | | var equipdItemScore = equipedItem == null ? 0 : equipedItem.equipScore;
|
| | | var overdue = ItemLogicUtility.Instance.IsOverdue(item.guid, item.itemId, item.useDataDict);
|
| | |
|
| | | if (!overdue && (item.config.JobLimit == 0 || (item.config.JobLimit / 100) == job) && item.equipScore > equipdItemScore && item.equipScore > score)
|
| | | if (!overdue && (ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId)) && item.equipScore > equipdItemScore && item.equipScore > score)
|
| | | {
|
| | | score = item.equipScore;
|
| | | guid = item.guid;
|
| | |
| | | case RoleEquipType.Neck:
|
| | | case RoleEquipType.FairyCan1:
|
| | | case RoleEquipType.FairyCan2:
|
| | | case RoleEquipType.Guard1:
|
| | | case RoleEquipType.JadeDynasty_Cloak:
|
| | | case RoleEquipType.JadeDynasty_FaceMask:
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | case RoleEquipType.JadeDynasty_Glove2:
|
| | | case RoleEquipType.JadeDynasty_Pendant:
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | case RoleEquipType.JadeDynasty_Ring2:
|
| | | case RoleEquipType.JadeDynasty_Ruyi:
|
| | | case RoleEquipType.JadeDynasty_Sword1:
|
| | | case RoleEquipType.JadeDynasty_Sword2:
|
| | | case RoleEquipType.JadeDynasty_Sword3:
|
| | | case RoleEquipType.JadeDynasty_Sword4:
|
| | | case RoleEquipType.Glove:
|
| | | case RoleEquipType.Jade:
|
| | | if (itemAttrData.itemConfig.LV < gemOpenLvs[0])
|
| | | {
|
| | | gemAttr.SetActive(false);
|
| | | return;
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.Guard1:
|
| | | case RoleEquipType.Guard2:
|
| | | case RoleEquipType.PeerlessWeapon1:
|
| | | case RoleEquipType.PeerlessWeapon2:
|
| | | case RoleEquipType.Wing:
|
| | | gemAttr.SetActive(false);
|
| | | return;
|
| | |
| | | _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("|");
|
| | |
| | | model.dungeonEnterCoolDownUpdate += DungeonEnterCoolDownUpdate;
|
| | | m_EnterCdContainer.OnCoolDowndComplete += DungeonEnterCoolDownUpdate;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshInfoEvent;
|
| | | PlayerDatas.Instance.OnRoleAttrRefresh += OnWorldLevelRefresh;
|
| | | PlayerDatas.Instance.worldLevelUpdateEvent += OnWorldLevelRefresh;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | |
| | | model.dungeonEnterCoolDownUpdate -= DungeonEnterCoolDownUpdate;
|
| | | m_EnterCdContainer.OnCoolDowndComplete -= DungeonEnterCoolDownUpdate;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshInfoEvent;
|
| | | PlayerDatas.Instance.OnRoleAttrRefresh -= OnWorldLevelRefresh;
|
| | | PlayerDatas.Instance.worldLevelUpdateEvent -= OnWorldLevelRefresh;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | |
| | | foreach (var itemModel in dict.Values)
|
| | | {
|
| | | if (itemModel.config.EquipPlace == config.EquipPlace
|
| | | && (itemModel.config.JobLimit / 100 == PlayerDatas.Instance.baseData.Job
|
| | | || itemModel.config.JobLimit == 0)
|
| | | && ItemLogicUtility.Instance.IsJobCompatibleItem(itemModel.itemId)
|
| | | && !ItemLogicUtility.Instance.IsOverdue(itemModel.guid, itemModel.itemId, itemModel.useDataDict))
|
| | | {
|
| | | var compare = EquipCompare(itemModel, config);
|
| | |
| | | var equip = packModel.GetItemByGuid(this.candidateEquip.guid); |
| | | m_ItemCell.Init(equip, true); |
| | | m_EquipName.text = equip.config.ItemName; |
| | | m_EquipName.color = UIHelper.GetUIColor(equip.config.ItemColor); |
| | | m_EquipName.color = UIHelper.GetUIColor(equip.config.ItemColor, true); |
| | | m_EquipSorce.text = string.Format("评分:{0}", equip.equipScore); |
| | | |
| | | var isBetter = model.CompareToCurrent(this.candidateEquip.guid) > 0; |
| | |
| | | |
| | | sortedLevels.Sort((int a, int b) => { return a.CompareTo(b); }); |
| | | } |
| | | |
| | | public static int GetItemServerEquipPlace(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | if (config == null) |
| | | { |
| | | return -1; |
| | | } |
| | | |
| | | var serverEquipPlace = -1; |
| | | switch ((RoleEquipType)config.EquipPlace) |
| | | { |
| | | case RoleEquipType.Weapon: |
| | | case RoleEquipType.Weapon2: |
| | | case RoleEquipType.Hat: |
| | | case RoleEquipType.Clothes: |
| | | case RoleEquipType.Belt: |
| | | case RoleEquipType.Trousers: |
| | | case RoleEquipType.Shoes: |
| | | case RoleEquipType.Neck: |
| | | case RoleEquipType.FairyCan1: |
| | | case RoleEquipType.FairyCan2: |
| | | case RoleEquipType.Glove: |
| | | case RoleEquipType.Jade: |
| | | EquipSet.ClientPlaceToServerPlace(config.LV, config.EquipPlace); |
| | | break; |
| | | case RoleEquipType.Wing: |
| | | case RoleEquipType.Guard1: |
| | | case RoleEquipType.Guard2: |
| | | case RoleEquipType.PeerlessWeapon1: |
| | | case RoleEquipType.PeerlessWeapon2: |
| | | EquipSet.ClientPlaceToServerPlace(0, config.EquipPlace); |
| | | break; |
| | | } |
| | | |
| | | return serverEquipPlace; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | public struct EquipSuitPropertyEntry |
| | |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | |
| | | int index; |
| | | int place; |
| | | EquipStarUpgradeCandidate candidate; |
| | | |
| | | public void Display(int index) |
| | | public void Display(int place) |
| | | { |
| | | this.index = index; |
| | | this.candidate = model.GetCandidatePlace(this.index); |
| | | this.place = place; |
| | | this.candidate = model.GetCandidatePlace(this.place); |
| | | |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| File was renamed from Core/NetworkPackage/DTCFile/ClientPack/ClientToGameServer/CB5_Bourse.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: eda9144d4aff79c4792c7176165a25f8 |
| | | guid: 9b2c46b2af8e83b45ac08cf3c215b8cd |
| | | folderAsset: yes |
| | | timeCreated: 1551063933 |
| | | timeCreated: 1552009611 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 08, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class EquipTrainSet |
| | | { |
| | | public readonly int level = 0; |
| | | Dictionary<int, EquipTrain> equipTrains = new Dictionary<int, EquipTrain>(); |
| | | |
| | | public EquipTrainSet(int level) |
| | | { |
| | | this.level = level; |
| | | for (int i = 1; i <= 12; i++) |
| | | { |
| | | equipTrains[i] = new EquipTrain(this.level, i, EquipTrainModel.GetTrainType(i)); |
| | | } |
| | | } |
| | | |
| | | public void UpdateEquipTrainLevel(int place, int trainLevel) |
| | | { |
| | | if (equipTrains.ContainsKey(place)) |
| | | { |
| | | equipTrains[place].trainLevel = trainLevel; |
| | | } |
| | | } |
| | | |
| | | public int GetTrainLevel(int place) |
| | | { |
| | | return equipTrains.ContainsKey(place) ? equipTrains[place].trainLevel : 0; |
| | | } |
| | | |
| | | public int GetTotalLevel() |
| | | { |
| | | var level = 0; |
| | | foreach (var item in equipTrains.Values) |
| | | { |
| | | level += item.trainLevel; |
| | | } |
| | | |
| | | return level; |
| | | } |
| | | |
| | | public void UpdateUnSavedProperties(int place, Int3 unSavedProperties) |
| | | { |
| | | if (equipTrains.ContainsKey(place)) |
| | | { |
| | | equipTrains[place].unSavedProperties = unSavedProperties; |
| | | } |
| | | } |
| | | |
| | | public void UpdateTrainedProperties(int place, Int3 trainedProperties) |
| | | { |
| | | if (equipTrains.ContainsKey(place)) |
| | | { |
| | | equipTrains[place].trainedProperties = trainedProperties; |
| | | } |
| | | } |
| | | |
| | | public Int3 GetUnSavedProperties(int place) |
| | | { |
| | | return equipTrains.ContainsKey(place) ? equipTrains[place].unSavedProperties : Int3.zero; |
| | | } |
| | | |
| | | public Int3 GetTrainedProperties(int place) |
| | | { |
| | | return equipTrains.ContainsKey(place) ? equipTrains[place].trainedProperties : Int3.zero; |
| | | } |
| | | |
| | | } |
| | | |
| | | public class EquipTrain |
| | | { |
| | | public readonly int level; |
| | | public readonly int place; |
| | | public readonly int trainType; |
| | | public int trainLevel { get; set; } |
| | | public Int3 unSavedProperties { get; set; } |
| | | public Int3 trainedProperties { get; set; } |
| | | |
| | | public EquipTrain(int level, int place, int trainType) |
| | | { |
| | | this.level = level; |
| | | this.place = place; |
| | | this.trainType = trainType; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| File was renamed from System/Strengthening/EquipSuitCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd4d1b9b42af79242a7b7de3b9aa0a7f |
| | | timeCreated: 1508579151 |
| | | guid: 74e52a6f86b4ae448ac321b9afa6b328 |
| | | timeCreated: 1552011210 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 08, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class EquipTrainCandidate |
| | | { |
| | | public readonly int level; |
| | | public readonly int place; |
| | | public readonly LogicBool selected = new LogicBool(); |
| | | |
| | | public EquipTrainCandidate(int level, int place) |
| | | { |
| | | this.level = level; |
| | | this.place = place; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Strengthening/EquipSuitCell.cs.meta
copy to System/EquipTrain/EquipTrainCandidate.cs.meta
| File was copied from System/Strengthening/EquipSuitCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd4d1b9b42af79242a7b7de3b9aa0a7f |
| | | timeCreated: 1508579151 |
| | | guid: 6985051ecd62d3f48aa8b817e54ef5aa |
| | | timeCreated: 1552009769 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 08, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class EquipTrainCandidateBehaviour : MonoBehaviour { |
| | | |
| | | [SerializeField] Image m_BackGround; |
| | | [SerializeField] Image m_EmptyItem; |
| | | [SerializeField] ItemCell m_ItemCell; |
| | | [SerializeField] Text m_Description1; |
| | | [SerializeField] Text m_Description2; |
| | | [SerializeField] Button m_Select; |
| | | |
| | | EquipStarModel model { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | |
| | | int place; |
| | | EquipStarUpgradeCandidate candidate; |
| | | |
| | | public void Display(int place) |
| | | { |
| | | this.place = place; |
| | | this.candidate = model.GetCandidatePlace(this.place); |
| | | |
| | | DisplayBaseInfo(); |
| | | DisplayDynamicInfo(true); |
| | | |
| | | m_Select.SetListener(() => { model.SelectPlace(this.candidate.level, this.candidate.place); }); |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | } |
| | | |
| | | private void LateUpdate() |
| | | { |
| | | DisplayDynamicInfo(false); |
| | | } |
| | | |
| | | private void DisplayBaseInfo() |
| | | { |
| | | var guid = equipModel.GetEquip(this.candidate.level, this.candidate.place); |
| | | var item = packModel.GetItemByGuid(guid); |
| | | if (item == null) |
| | | { |
| | | m_ItemCell.gameObject.SetActive(false); |
| | | m_EmptyItem.gameObject.SetActive(true); |
| | | var place = this.candidate.place; |
| | | m_Description1.text = string.Format("部位:{0}", UIHelper.GetEquipPlaceName(place)); |
| | | m_Description2.text = "未穿戴装备"; |
| | | } |
| | | else |
| | | { |
| | | m_ItemCell.gameObject.SetActive(true); |
| | | m_EmptyItem.gameObject.SetActive(false); |
| | | m_ItemCell.Init(item); |
| | | m_Description1.text = item.config.ItemName; |
| | | m_Description1.color = UIHelper.GetUIColor(item.config.ItemColor); |
| | | m_Description2.text = string.Empty; |
| | | } |
| | | } |
| | | |
| | | private void DisplayDynamicInfo(bool force) |
| | | { |
| | | if (force || this.candidate.selected.dirty) |
| | | { |
| | | var selected = this.candidate.selected.Fetch(); |
| | | m_BackGround.SetSprite(selected ? "Title_RightWindow" : "Title_PopupWindow"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | public class EquipTrainCandidateBehaviourPool |
| | | { |
| | | static GameObjectPool pool; |
| | | |
| | | public static EquipTrainCandidateBehaviour Get() |
| | | { |
| | | if (pool == null) |
| | | { |
| | | pool = new GameObjectPool(UILoader.LoadPrefab("EquipTrainCandidateBehaviour")); |
| | | } |
| | | |
| | | var instance = pool.Request(); |
| | | instance.gameObject.SetActive(true); |
| | | return instance.GetComponent<EquipTrainCandidateBehaviour>(); |
| | | } |
| | | |
| | | public static void Release(EquipTrainCandidateBehaviour behaviour) |
| | | { |
| | | if (pool == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (behaviour == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | behaviour.gameObject.SetActive(false); |
| | | behaviour.transform.SetParent(null); |
| | | pool.Release(behaviour.gameObject); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Strengthening/EquipSuitCell.cs.meta
copy to System/EquipTrain/EquipTrainCandidateBehaviour.cs.meta
| File was copied from System/Strengthening/EquipSuitCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd4d1b9b42af79242a7b7de3b9aa0a7f |
| | | timeCreated: 1508579151 |
| | | guid: de2fa56b410e8624587a8b8cafb1b578 |
| | | timeCreated: 1552009743 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 08, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class EquipTrainLevelBehaviour : MonoBehaviour { |
| | | |
| | | [SerializeField] Button m_Select; |
| | | [SerializeField] Image m_BackGround; |
| | | [SerializeField] Image m_Arrow; |
| | | [SerializeField] Text m_Title; |
| | | |
| | | readonly List<EquipTrainCandidateBehaviour> slotBehaviours = new List<EquipTrainCandidateBehaviour>(); |
| | | |
| | | EquipStarModel model { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | |
| | | public int level { get; private set; } |
| | | public void Init(int level) |
| | | { |
| | | var equipSet = equipModel.GetEquipSet(level); |
| | | var realmConfig = RealmConfig.Get(equipSet.realm); |
| | | this.m_Title.text = string.Format("{0}装备", realmConfig.Name); |
| | | |
| | | this.level = level; |
| | | m_Select.SetListener(Select); |
| | | } |
| | | |
| | | public void UnInit() |
| | | { |
| | | Dispose(); |
| | | |
| | | this.level = 0; |
| | | this.m_Select.RemoveAllListeners(); |
| | | } |
| | | |
| | | public void Display() |
| | | { |
| | | var siblingIndex = this.transform.GetSiblingIndex(); |
| | | var candidates = this.model.GetCandidatePlaces(); |
| | | for (var i = candidates.Count - 1; i >= 0; i--) |
| | | { |
| | | var behaviour = EquipTrainCandidateBehaviourPool.Get(); |
| | | behaviour.Display(candidates[i]); |
| | | behaviour.transform.SetParentEx(this.transform.parent, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | behaviour.transform.SetSiblingIndex(siblingIndex + 1); |
| | | slotBehaviours.Add(behaviour); |
| | | } |
| | | |
| | | m_BackGround.SetSprite(""); |
| | | m_Arrow.transform.localEulerAngles = new Vector3(0, 0, 180); |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | for (var i = slotBehaviours.Count - 1; i >= 0; i--) |
| | | { |
| | | EquipTrainCandidateBehaviourPool.Release(slotBehaviours[i]); |
| | | } |
| | | |
| | | slotBehaviours.Clear(); |
| | | m_BackGround.SetSprite(""); |
| | | m_Arrow.transform.localEulerAngles = Vector3.zero; |
| | | } |
| | | |
| | | private void Select() |
| | | { |
| | | if (model.selectedLevel.value == this.level) |
| | | { |
| | | model.SelectLevel(0); |
| | | } |
| | | else |
| | | { |
| | | model.SelectLevel(this.level); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Strengthening/EquipSuitCell.cs.meta
copy to System/EquipTrain/EquipTrainLevelBehaviour.cs.meta
| File was copied from System/Strengthening/EquipSuitCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd4d1b9b42af79242a7b7de3b9aa0a7f |
| | | timeCreated: 1508579151 |
| | | guid: 33945dd3601735b4c99801f01aded99c |
| | | timeCreated: 1552009677 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class EquipTrainModel : Model |
| | | { |
| | | |
| | | public readonly LogicInt selectedLevel = new LogicInt(); |
| | | public readonly LogicInt selectedPlace = new LogicInt(); |
| | | public readonly LogicInt equipTrainLevel = new LogicInt(); |
| | | public readonly LogicInt equipTrainMaxLevel = new LogicInt(); |
| | | public readonly LogicInt material = new LogicInt(); |
| | | public readonly LogicInt inevitableMaterialCount = new LogicInt(); |
| | | public readonly LogicEnum<TrainOperateType> operateType = new LogicEnum<TrainOperateType>(TrainOperateType.None); |
| | | public readonly List<EquipTrainCandidate> candidatePlaces = new List<EquipTrainCandidate>(); |
| | | public readonly List<EquipTrainPropertyBar> propertyBars = new List<EquipTrainPropertyBar>(); |
| | | |
| | | Dictionary<int, EquipTrainSet> equipTrains = new Dictionary<int, EquipTrainSet>(); |
| | | |
| | | static Dictionary<int, int> trainTypes = new Dictionary<int, int>(); |
| | | |
| | | EquipStarModel starModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | |
| | | public override void Init() |
| | | { |
| | | ParseConfig(); |
| | | } |
| | | |
| | | public override void UnInit() |
| | | { |
| | | } |
| | | |
| | | public void ResetOperateParams() |
| | | { |
| | | selectedLevel.value = 0; |
| | | selectedPlace.value = 0; |
| | | equipTrainLevel.value = 0; |
| | | equipTrainMaxLevel.value = 0; |
| | | material.value = 0; |
| | | inevitableMaterialCount.value = 0; |
| | | operateType.value = TrainOperateType.None; |
| | | candidatePlaces.Clear(); |
| | | propertyBars.Clear(); |
| | | } |
| | | |
| | | public void UpdateEquipTrainInfo(HA3BB_tagMCEquipPartXLAttrInfo info) |
| | | { |
| | | foreach (var item in info.InfoList) |
| | | { |
| | | var clientEquipPlace = EquipSet.ServerPlaceToClientPlace(item.EquipPlace); |
| | | var trainLevel = item.XLAttrLV; |
| | | if (equipTrains.ContainsKey(clientEquipPlace.x)) |
| | | { |
| | | var equipTrain = equipTrains[clientEquipPlace.x]; |
| | | var unSavedProperties = Int3.zero; |
| | | var trainedProperties = Int3.zero; |
| | | for (int i = 0; i < item.XLAttrList.Length; i++) |
| | | { |
| | | var property = item.XLAttrList[i]; |
| | | trainedProperties[i] = (int)property.XLAttrValue; |
| | | unSavedProperties[i] = (int)(property.XLAttrChange > 0 ? property.XLAttrChange - property.XLAttrValue : 0); |
| | | } |
| | | |
| | | equipTrain.UpdateEquipTrainLevel(clientEquipPlace.y, trainLevel); |
| | | equipTrain.UpdateTrainedProperties(clientEquipPlace.y, trainedProperties); |
| | | equipTrain.UpdateUnSavedProperties(clientEquipPlace.y, unSavedProperties); |
| | | |
| | | if (clientEquipPlace.x == selectedLevel.value && clientEquipPlace.y == selectedPlace.value) |
| | | { |
| | | equipTrainLevel.value = trainLevel; |
| | | for (int i = 0; i < propertyBars.Count; i++) |
| | | { |
| | | var bar = propertyBars[i]; |
| | | bar.deltaValue.value = unSavedProperties[i]; |
| | | bar.propertyValue.value = trainedProperties[i]; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void Train(int level, int place, bool[] inevitables) |
| | | { |
| | | var code = 0; |
| | | for (int i = 0; i < inevitables.Length; i++) |
| | | { |
| | | code += inevitables[i] ? 0 : MathUtility.Power(2, i); |
| | | } |
| | | |
| | | var equipWash = new CA325_tagCMEquipXLAttrChange(); |
| | | equipWash.EquipPlace = (byte)EquipSet.ClientPlaceToServerPlace(level, place); |
| | | equipWash.CheckUseGoldAttr = (byte)code; |
| | | GameNetSystem.Instance.SendInfo(equipWash); |
| | | } |
| | | |
| | | public void Save(int level, int place) |
| | | { |
| | | var result = new CA326_tagCMEquipXLAttrChangeOK(); |
| | | result.EquipPlace = (byte)EquipSet.ClientPlaceToServerPlace(level, place); |
| | | result.IsSave = 1; |
| | | GameNetSystem.Instance.SendInfo(result); |
| | | } |
| | | |
| | | public void GiveUp(int level, int place) |
| | | { |
| | | var result = new CA326_tagCMEquipXLAttrChangeOK(); |
| | | result.EquipPlace = (byte)EquipSet.ClientPlaceToServerPlace(level, place); |
| | | result.IsSave = 0; |
| | | GameNetSystem.Instance.SendInfo(result); |
| | | } |
| | | |
| | | public void SelectLevel(int level) |
| | | { |
| | | selectedLevel.value = level; |
| | | candidatePlaces.Clear(); |
| | | |
| | | var places = GetTrainablePlaces(level); |
| | | if (places.IsNullOrEmpty()) |
| | | { |
| | | SelectPlace(level, 0); |
| | | } |
| | | else |
| | | { |
| | | for (var i = 0; i < places.Count; i++) |
| | | { |
| | | var place = places[i]; |
| | | candidatePlaces[place] = new EquipTrainCandidate(level, place); |
| | | if (i == 0) |
| | | { |
| | | SelectPlace(level, place); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void SelectPlace(int level, int place) |
| | | { |
| | | selectedPlace.value = place; |
| | | selectedPlace.dirty = true; |
| | | foreach (var candidate in candidatePlaces) |
| | | { |
| | | candidate.selected.value = candidate.level == level && candidate.place == place; |
| | | } |
| | | |
| | | equipTrainLevel.value = GetTrainLevel(level, place); |
| | | equipTrainMaxLevel.value = GetMaxTrainLevel(level); |
| | | material.value = GetTrainMaterial(level, place); |
| | | |
| | | InitTrainableProperties(level, place); |
| | | operateType.value = CalculateTrainOperateType(level, place); |
| | | } |
| | | |
| | | public void SetInevitable(int index, bool invevitable) |
| | | { |
| | | if (propertyBars.Count > index) |
| | | { |
| | | propertyBars[index].inevitable.value = invevitable; |
| | | } |
| | | |
| | | inevitableMaterialCount.value = CalculateInevitableMaterialCount(); |
| | | } |
| | | |
| | | public int GetTrainLevel(int level, int place) |
| | | { |
| | | if (!equipTrains.ContainsKey(level)) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | return equipTrains[level].GetTrainLevel(place); |
| | | } |
| | | |
| | | public int GetTotalLevel(int level) |
| | | { |
| | | if (!equipTrains.ContainsKey(level)) |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | return equipTrains[level].GetTotalLevel(); |
| | | } |
| | | |
| | | public int GetMaxTrainLevel(int level) |
| | | { |
| | | |
| | | return 5; |
| | | } |
| | | |
| | | public int GetMaxTrainLevel(int level, int place) |
| | | { |
| | | return 5; |
| | | } |
| | | |
| | | public bool IsEquipPlaceTrainable(string equipGuid) |
| | | { |
| | | if (string.IsNullOrEmpty(equipGuid)) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | var equip = packModel.GetItemByGuid(equipGuid); |
| | | if (equip == null) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | var maxStarLevel = GetMaxTrainLevel(equip.config.ItemColor, equip.config.LV); |
| | | var currentStarLevel = GetTrainLevel(equip.config.LV, equip.config.EquipPlace); |
| | | return currentStarLevel < maxStarLevel; |
| | | } |
| | | |
| | | public Int3 GetUnSavedProperties(int level, int place) |
| | | { |
| | | return equipTrains.ContainsKey(level) ? equipTrains[level].GetUnSavedProperties(place) : Int3.zero; |
| | | } |
| | | |
| | | public Int3 GetTrainedProperties(int level, int place) |
| | | { |
| | | return equipTrains.ContainsKey(level) ? equipTrains[level].GetTrainedProperties(place) : Int3.zero; |
| | | } |
| | | |
| | | private List<int> GetTrainablePlaces(int level) |
| | | { |
| | | if (level <= 0) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var equipSet = equipModel.GetEquipSet(level); |
| | | if (equipSet == null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | var places = new List<int>(); |
| | | for (var i = 1; i <= 12; i++) |
| | | { |
| | | var unLocked = equipSet.IsSlotUnLocked(i); |
| | | if (unLocked) |
| | | { |
| | | places.Add(i); |
| | | } |
| | | } |
| | | |
| | | return places; |
| | | } |
| | | |
| | | private void InitTrainableProperties(int level, int place) |
| | | { |
| | | var equipGuid = equipModel.GetEquip(level, place); |
| | | propertyBars.Clear(); |
| | | if (IsEquipPlaceTrainable(equipGuid)) |
| | | { |
| | | var unSavedProperties = GetUnSavedProperties(level, place); |
| | | var trainedProperties = GetTrainedProperties(level, place); |
| | | var trainLevel = GetTrainLevel(level, place); |
| | | var data = EquipWashConfig.Get(GetTrainType(place), trainLevel); |
| | | |
| | | var propertyBar = new EquipTrainPropertyBar(data.config.attType1, data.config.attMax1); |
| | | propertyBar.propertyValue.value = trainedProperties.x; |
| | | propertyBar.deltaValue.value = unSavedProperties.x; |
| | | propertyBars.Add(propertyBar); |
| | | |
| | | propertyBar = new EquipTrainPropertyBar(data.config.attType2, data.config.attMax2); |
| | | propertyBar.propertyValue.value = trainedProperties.y; |
| | | propertyBar.deltaValue.value = unSavedProperties.y; |
| | | propertyBars.Add(propertyBar); |
| | | |
| | | propertyBar = new EquipTrainPropertyBar(data.config.attType3, data.config.attMax3); |
| | | propertyBar.propertyValue.value = trainedProperties.z; |
| | | propertyBar.deltaValue.value = unSavedProperties.z; |
| | | propertyBars.Add(propertyBar); |
| | | } |
| | | |
| | | inevitableMaterialCount.value = CalculateInevitableMaterialCount(); |
| | | } |
| | | |
| | | private int GetTrainMaterial(int level, int place) |
| | | { |
| | | var equipGuid = equipModel.GetEquip(level, place); |
| | | var equip = packModel.GetItemByGuid(equipGuid); |
| | | if (equip == null) |
| | | { |
| | | return 0; |
| | | } |
| | | else |
| | | { |
| | | return 1; |
| | | } |
| | | } |
| | | |
| | | private int CalculateInevitableMaterialCount() |
| | | { |
| | | var count = 0; |
| | | foreach (var bar in propertyBars) |
| | | { |
| | | count += bar.inevitable.value ? 1 : 0; |
| | | } |
| | | |
| | | return count; |
| | | } |
| | | |
| | | private TrainOperateType CalculateTrainOperateType(int level, int place) |
| | | { |
| | | var currentLevel = GetTrainLevel(level, place); |
| | | var maxLevel = GetMaxTrainLevel(level, place); |
| | | if (currentLevel >= maxLevel) |
| | | { |
| | | return TrainOperateType.Max; |
| | | } |
| | | |
| | | var unSavedProperties = GetUnSavedProperties(level, place); |
| | | if (unSavedProperties != Int3.zero) |
| | | { |
| | | return TrainOperateType.Save; |
| | | } |
| | | |
| | | var equipGuid = equipModel.GetEquip(level, place); |
| | | var trainable = IsEquipPlaceTrainable(equipGuid); |
| | | if (trainable) |
| | | { |
| | | return TrainOperateType.Train; |
| | | } |
| | | |
| | | return TrainOperateType.None; |
| | | } |
| | | |
| | | private void ParseConfig() |
| | | { |
| | | var config = FuncConfigConfig.Get("EquipWashGroup1"); |
| | | var equipTypes = ConfigParse.GetMultipleStr<int>(config.Numerical1); |
| | | foreach (var equipType in equipTypes) |
| | | { |
| | | trainTypes[equipType] = 1; |
| | | } |
| | | |
| | | config = FuncConfigConfig.Get("EquipWashGroup2"); |
| | | equipTypes = ConfigParse.GetMultipleStr<int>(config.Numerical1); |
| | | foreach (var equipType in equipTypes) |
| | | { |
| | | trainTypes[equipType] = 2; |
| | | } |
| | | |
| | | config = FuncConfigConfig.Get("EquipWashGroup3"); |
| | | equipTypes = ConfigParse.GetMultipleStr<int>(config.Numerical1); |
| | | foreach (var equipType in equipTypes) |
| | | { |
| | | trainTypes[equipType] = 3; |
| | | } |
| | | } |
| | | |
| | | public static int GetTrainType(int equipType) |
| | | { |
| | | return trainTypes.ContainsKey(equipType) ? trainTypes[equipType] : 0; |
| | | } |
| | | |
| | | public enum TrainOperateType |
| | | { |
| | | None = 0, |
| | | Train = 1, |
| | | Forbid = 2, |
| | | Save = 3, |
| | | Max = 4, |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
copy from System/Strengthening/EquipSuitCell.cs.meta
copy to System/EquipTrain/EquipTrainModel.cs.meta
| File was copied from System/Strengthening/EquipSuitCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd4d1b9b42af79242a7b7de3b9aa0a7f |
| | | timeCreated: 1508579151 |
| | | guid: c3e67d69500cbda469f342a20fae0d2f |
| | | timeCreated: 1552009630 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class EquipTrainPropertyBar |
| | | { |
| | | public readonly int propertyId; |
| | | public readonly int upperLimit; |
| | | public readonly LogicInt propertyValue = new LogicInt(); |
| | | public readonly LogicInt deltaValue = new LogicInt(); |
| | | public readonly LogicBool inevitable = new LogicBool(); |
| | | |
| | | public EquipTrainPropertyBar(int propertyId, int upperLimit) |
| | | { |
| | | this.propertyId = propertyId; |
| | | this.upperLimit = upperLimit; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
copy from System/Strengthening/EquipSuitCell.cs.meta
copy to System/EquipTrain/EquipTrainPropertyBar.cs.meta
| File was copied from System/Strengthening/EquipSuitCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd4d1b9b42af79242a7b7de3b9aa0a7f |
| | | timeCreated: 1508579151 |
| | | guid: c10f0b45efcdf1145ab821ea8c58609a |
| | | timeCreated: 1552013650 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 08, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class EquipTrainPropertyBarBehaviour : MonoBehaviour |
| | | { |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Strengthening/EquipSuitCell.cs.meta
copy to System/EquipTrain/EquipTrainPropertyBarBehaviour.cs.meta
| File was copied from System/Strengthening/EquipSuitCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd4d1b9b42af79242a7b7de3b9aa0a7f |
| | | timeCreated: 1508579151 |
| | | guid: f8d11fef46f810349bb159b571ac0bdb |
| | | timeCreated: 1552009855 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 08, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class EquipTrainWin : Window |
| | | { |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/Strengthening/EquipSuitCell.cs.meta
copy to System/EquipTrain/EquipTrainWin.cs.meta
| File was copied from System/Strengthening/EquipSuitCell.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cd4d1b9b42af79242a7b7de3b9aa0a7f |
| | | timeCreated: 1508579151 |
| | | guid: e3ece3a20ffea724184d0a970f092658 |
| | | timeCreated: 1552009642 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | }
|
| | | if (item_config.LV >= Order && item_config.ItemColor >= Color
|
| | | && item_config.StarLevel >= Star && EquipPlace == item_config.EquipPlace
|
| | | && PlayerDatas.Instance.baseData.Job == item_config.JobLimit / 100)
|
| | | && ItemLogicUtility.Instance.IsJobCompatibleItem(Item_ID))
|
| | | {
|
| | | if (!DicHighlight.ContainsKey(key))
|
| | | {
|
| | |
| | | public static int mysteryShopRefreshItemValue { get; private set; }
|
| | | public static int mysteryShopRefreshInterval { get; private set; }
|
| | | public static Dictionary<int, Dictionary<int, int>> equipStarLimit { get; private set; }
|
| | | public static int equipTrainMustItemId { get; private set; }
|
| | |
|
| | | public static void Init()
|
| | | {
|
| | |
| | | }
|
| | | equipStarLimit.Add(itemColor, dict);
|
| | | }
|
| | |
|
| | | equipTrainMustItemId = GetInt("EquipWashMustID");
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | |
|
| | | private void ClickSortBtn()
|
| | | {
|
| | | ItemLogicUtility.Instance.SendPackResetQuest(PackType.Treasure);
|
| | | ItemLogicUtility.Instance.ResetPack(PackType.Treasure);
|
| | | TimeDownMgr.Instance.Begin(TimeDownMgr.CoolTimeType.HappyXBWarehouse, 5.0f, RefreshTime);
|
| | | sortBtnText.text = Language.Get("BagWin_SortCDbtn_Text_1", 5);
|
| | | sortImage.SetSprite("BlackBtn");
|
| | |
| | | {
|
| | | [XLua.Hotfix]
|
| | | [XLua.LuaCallCSharp]
|
| | | public class JadeDynastyEquipModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
|
| | | public class JadeDynastyEquipModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | JadeDynastyTowerModel towerModel { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
| | | public string LocalSaveEquipUnlock { get; private set; }
|
| | | public string LocalSaveActiveSuit { get; private set; }
|
| | | public string LocalSaveActiveStoneSuit { get; private set; }
|
| | | |
| | | public int UnlockTowerLayer
|
| | | {
|
| | |
|
| | | public int UnlockTowerLayer {
|
| | | get { return towerModel.highestPassFloor; }
|
| | | }
|
| | |
|
| | |
| | | public void OnAfterPlayerDataInitialize()
|
| | | {
|
| | | int playerId = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | LocalSaveEquipUnlock = StringUtility.Contact("UnLockJadeDynastyEquip",playerId);
|
| | | LocalSaveActiveSuit = StringUtility.Contact("JadeDynastyEquipSuit",playerId);
|
| | | LocalSaveEquipUnlock = StringUtility.Contact("UnLockJadeDynastyEquip", playerId);
|
| | | LocalSaveActiveSuit = StringUtility.Contact("JadeDynastyEquipSuit", playerId);
|
| | | LocalSaveActiveStoneSuit = StringUtility.Contact("JadeDynastyEquipStoneSuit", playerId);
|
| | | GetLocalSaveUnlockEquip();
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | #region 解析表数据
|
| | | public Dictionary<int, int> lockEquipLayerDict { get; private set; }
|
| | | public Dictionary<int, List<int>> suitTypeDict { get; private set;}
|
| | | public Dictionary<int, List<int>> equipGetPathDict { get; private set;}
|
| | | public List<int> equipPlaceComposes { get; private set;}
|
| | | public int gemResonanceNum { get; private set;}
|
| | | public Dictionary<int, List<int>> suitTypeDict { get; private set; }
|
| | | public Dictionary<int, List<int>> equipGetPathDict { get; private set; }
|
| | | public List<int> equipPlaceComposes { get; private set; }
|
| | | public int gemResonanceNum { get; private set; }
|
| | | public void ParseFuncConfig()
|
| | | {
|
| | | suitTypeDict = new Dictionary<int, List<int>>();
|
| | | var equipZhuXian = FuncConfigConfig.Get("EquipZhuXian");
|
| | | var suitGroupData = JsonMapper.ToObject(equipZhuXian.Numerical2);
|
| | | foreach(var key in suitGroupData.Keys)
|
| | | foreach (var key in suitGroupData.Keys)
|
| | | {
|
| | | int groupType = int.Parse(key);
|
| | | var equipPlaces = suitGroupData[key];
|
| | | if(equipPlaces.IsArray)
|
| | | if (equipPlaces.IsArray)
|
| | | {
|
| | | List<int> list = new List<int>();
|
| | | suitTypeDict.Add(groupType,list);
|
| | | for(int i = 0; i < equipPlaces.Count; i++)
|
| | | suitTypeDict.Add(groupType, list);
|
| | | for (int i = 0; i < equipPlaces.Count; i++)
|
| | | {
|
| | | var equipPlace = equipPlaces[i];
|
| | | list.Add(int.Parse(equipPlace.ToString()));
|
| | |
| | | equipGetPathDict = new Dictionary<int, List<int>>();
|
| | | var jadeDynastyEquipGetPaths = FuncConfigConfig.Get("JadeDynastyEquipGetPaths");
|
| | | var equipGetPathData = JsonMapper.ToObject(jadeDynastyEquipGetPaths.Numerical1);
|
| | | |
| | | foreach(var key in equipGetPathData.Keys)
|
| | |
|
| | | foreach (var key in equipGetPathData.Keys)
|
| | | {
|
| | | var pathData = equipGetPathData[key];
|
| | | int equipPlace = int.Parse(key);
|
| | | List<int> pathIds = new List<int>();
|
| | | equipGetPathDict.Add(equipPlace,pathIds);
|
| | | if(pathData.IsArray)
|
| | | equipGetPathDict.Add(equipPlace, pathIds);
|
| | | if (pathData.IsArray)
|
| | | {
|
| | | for(int i = 0; i < pathData.Count; i++)
|
| | | for (int i = 0; i < pathData.Count; i++)
|
| | | {
|
| | | int pathId = int.Parse(pathData[i].ToString());
|
| | | pathIds.Add(pathId);
|
| | |
| | | {
|
| | | suitAttrDict = new Dictionary<int, Dictionary<int, JadeDynastySuitAttrData>>();
|
| | | var suitConfigs = JadeDynastySuitAttrConfig.GetValues();
|
| | | foreach(var config in suitConfigs)
|
| | | foreach (var config in suitConfigs)
|
| | | {
|
| | | int suitLv = config.suiteLV;
|
| | | int type = config.suiteType;
|
| | |
| | | if (!suitAttrDict.ContainsKey(type))
|
| | | {
|
| | | var dict = new Dictionary<int, JadeDynastySuitAttrData>();
|
| | | dict.Add(suitLv,suitAttrData);
|
| | | suitAttrDict.Add(type,dict);
|
| | | dict.Add(suitLv, suitAttrData);
|
| | | suitAttrDict.Add(type, dict);
|
| | | }
|
| | | else
|
| | | {
|
| | | var dict = suitAttrDict[type];
|
| | | if(!dict.ContainsKey(suitLv))
|
| | | if (!dict.ContainsKey(suitLv))
|
| | | {
|
| | | dict.Add(suitLv, suitAttrData);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public Dictionary<int, Dictionary<int,JadeDynastyStoneSuitAttrData>> stoneSuitAttrDict { get; private set; }
|
| | | public Dictionary<int, Dictionary<int, JadeDynastyStoneSuitAttrData>> stoneSuitAttrDict { get; private set; }
|
| | | public void ParseStoneSuitAttrConfig()
|
| | | {
|
| | | stoneSuitAttrDict = new Dictionary<int, Dictionary<int, JadeDynastyStoneSuitAttrData>>();
|
| | |
| | | {
|
| | | lockEquipLayerDict = new Dictionary<int, int>();
|
| | | var configs = JadeDynastyTowerConfig.GetValues();
|
| | | foreach(var key in configs)
|
| | | foreach (var key in configs)
|
| | | {
|
| | | if(key.unLockEquipPlace != 0)
|
| | | if (key.unLockEquipPlace != 0)
|
| | | {
|
| | | int equipPlace = key.unLockEquipPlace;
|
| | | int towerLayer = key.floorIndex;
|
| | | lockEquipLayerDict.Add(equipPlace, towerLayer);
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | suitLv = 0;
|
| | | attrDict = new Dictionary<int, int>();
|
| | | suitAttrConfig = JadeDynastySuitAttrConfig.Get(id);
|
| | | if(suitAttrConfig != null)
|
| | | if (suitAttrConfig != null)
|
| | | {
|
| | | suitLv = suitAttrConfig.suiteLV;
|
| | | int[] attrIds = suitAttrConfig.attrIDList;
|
| | | int[] attrValues = suitAttrConfig.attrValueList;
|
| | | if(attrIds != null && attrValues != null)
|
| | | if (attrIds != null && attrValues != null)
|
| | | {
|
| | | for(int i = 0; i < attrIds.Length; i++)
|
| | | for (int i = 0; i < attrIds.Length; i++)
|
| | | {
|
| | | int attrId = attrIds[i];
|
| | | int attrValue = attrValues[i];
|
| | | if(!attrDict.ContainsKey(attrId))
|
| | | if (!attrDict.ContainsKey(attrId))
|
| | | {
|
| | | attrDict.Add(attrId, attrValue);
|
| | | }
|
| | |
| | |
|
| | | #region 查看物品
|
| | | public string lookGuid { get; private set; }
|
| | | public int jumpIndex { get; private set;}
|
| | | public int jumpIndex { get; private set; }
|
| | | public void SetLookItemModel(string guid)
|
| | | {
|
| | | jumpIndex = -1;
|
| | |
| | | if (string.IsNullOrEmpty(guid)) return;
|
| | |
|
| | | var model = playerPack.GetItemByGuid(guid);
|
| | | if(model != null)
|
| | | if (model != null)
|
| | | {
|
| | | lookGuid = guid;
|
| | | int itemIndex = model.itemPlace;
|
| | | jumpIndex = itemIndex / 5;
|
| | |
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<JadeDynastyKnapSackWin>(false,0);
|
| | | WindowCenter.Instance.Open<JadeDynastyKnapSackWin>(false, 0);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | this.targetEquipPlace = equipPlace;
|
| | | RectTransformUtility.ScreenPointToLocalPointInRectangle(WindowCenter.Instance.uiRoot.tipsCanvas, Input.mousePosition, WindowCenter.Instance.uiRoot.uicamera, out targetPos);
|
| | | if(!WindowCenter.Instance.IsOpen<JadeDynastyEquipGetPathsWin>())
|
| | | if (!WindowCenter.Instance.IsOpen<JadeDynastyEquipGetPathsWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<JadeDynastyEquipGetPathsWin>();
|
| | | }
|
| | |
| | | public void SetLockLocalSaveUnlockEquip(int equipPlace)
|
| | | {
|
| | | unlockEquips = unlockEquips == null ? new List<int>() : unlockEquips;
|
| | | if(!unlockEquips.Contains(equipPlace))
|
| | | if (!unlockEquips.Contains(equipPlace))
|
| | | {
|
| | | unlockEquips.Add(equipPlace);
|
| | | LocalSave.SetIntArray(LocalSaveEquipUnlock,unlockEquips.ToArray());
|
| | | LocalSave.SetIntArray(LocalSaveEquipUnlock, unlockEquips.ToArray());
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetLockLocalSaveActiveSuit(List<int> suitTypes,List<int> suitLvs)
|
| | | public void SetLockLocalSaveActiveSuit(List<int> suitTypes, List<int> suitLvs)
|
| | | {
|
| | | alreadyActiveSuits = alreadyActiveSuits == null ? new List<string>() : alreadyActiveSuits;
|
| | | for (int i = 0; i < suitTypes.Count; i++)
|
| | |
| | | int suitType = suitTypes[i];
|
| | | int suitLv = suitLvs[i];
|
| | | bool isLocalSaveActiveSuit = IsLocalSaveActiveSuit(suitType, suitLv);
|
| | | if(!isLocalSaveActiveSuit)
|
| | | if (!isLocalSaveActiveSuit)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public void StopPlaySuitEffect(UIEffect effect,bool isSave = false)
|
| | | public void StopPlaySuitEffect(UIEffect effect, bool isSave = false)
|
| | | {
|
| | | if (isSave)
|
| | | {
|
| | |
| | | public bool TryGetEquipPaths(int equipPlace, out List<int> pathIds)
|
| | | {
|
| | | pathIds = null;
|
| | | return equipGetPathDict.TryGetValue(equipPlace,out pathIds);
|
| | | return equipGetPathDict.TryGetValue(equipPlace, out pathIds);
|
| | | }
|
| | |
|
| | | public bool TryGetJadeDynastyEquipIndex(int equipPlace,out int equipIndex)
|
| | | public bool TryGetJadeDynastyEquipIndex(int equipPlace, out int equipIndex)
|
| | | {
|
| | | equipIndex = 0;
|
| | | if(equipPlace >= (int)RoleEquipType.JadeDynasty_Cloak && equipPlace <= (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | {
|
| | | equipIndex = equipPlace - 121;
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | equipIndex = equipPlace - 121;
|
| | | return true;
|
| | | }
|
| | |
|
| | | public int GetJadeDynastyEquipPlace(int equipIndex)
|
| | |
| | | return equipIndex + 121;
|
| | | }
|
| | |
|
| | | public bool TryGetLockTowerLayer(int equipPlace,out int towerLayer)
|
| | | public bool TryGetLockTowerLayer(int equipPlace, out int towerLayer)
|
| | | {
|
| | | towerLayer = 0;
|
| | | return lockEquipLayerDict.TryGetValue(equipPlace,out towerLayer);
|
| | | return lockEquipLayerDict.TryGetValue(equipPlace, out towerLayer);
|
| | | }
|
| | |
|
| | | public bool TryGetSuitType(int equipPlace,out int suitType)
|
| | | public bool TryGetSuitType(int equipPlace, out int suitType)
|
| | | {
|
| | | suitType = 0;
|
| | | foreach(var type in suitTypeDict.Keys)
|
| | | foreach (var type in suitTypeDict.Keys)
|
| | | {
|
| | | var equipPlaces = suitTypeDict[type];
|
| | | if(equipPlaces.Contains(equipPlace))
|
| | | if (equipPlaces.Contains(equipPlace))
|
| | | {
|
| | | suitType = type;
|
| | | return true;
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetEquipPlaces(int equipPlace,out List<int> equipPlaces)
|
| | | public bool TryGetEquipPlaces(int equipPlace, out List<int> equipPlaces)
|
| | | {
|
| | | int suitType = 0;
|
| | | equipPlaces = null;
|
| | | bool isSuit = TryGetSuitType(equipPlace,out suitType);
|
| | | if(isSuit)
|
| | | bool isSuit = TryGetSuitType(equipPlace, out suitType);
|
| | | if (isSuit)
|
| | | {
|
| | | equipPlaces = suitTypeDict[suitType];
|
| | | return true;
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetSuitAttrData(int equipPlace,int suitLv,out JadeDynastySuitAttrData suitAttrData)
|
| | | public bool TryGetSuitAttrData(int equipPlace, int suitLv, out JadeDynastySuitAttrData suitAttrData)
|
| | | {
|
| | | suitAttrData = null;
|
| | | int suitType = 0;
|
| | | TryGetSuitType(equipPlace,out suitType);
|
| | | if(suitAttrDict.ContainsKey(suitType))
|
| | | TryGetSuitType(equipPlace, out suitType);
|
| | | if (suitAttrDict.ContainsKey(suitType))
|
| | | {
|
| | | var dict = suitAttrDict[suitType];
|
| | | return dict.TryGetValue(suitLv,out suitAttrData);
|
| | | return dict.TryGetValue(suitLv, out suitAttrData);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | int willUnlockPlace = 0;
|
| | | int unlockTowerLayer = UnlockTowerLayer;
|
| | | int minTowerLayer = 0;
|
| | | foreach(var key in lockEquipLayerDict.Keys)
|
| | | foreach (var key in lockEquipLayerDict.Keys)
|
| | | {
|
| | | int lockTowerLayer = lockEquipLayerDict[key];
|
| | | if (lockTowerLayer > unlockTowerLayer
|
| | |
| | | {
|
| | | int unlockTowerLayer = UnlockTowerLayer;
|
| | | int towerLayer = 0;
|
| | | bool isLock = TryGetLockTowerLayer(equipPlace,out towerLayer);
|
| | | if(isLock && towerLayer > unlockTowerLayer)
|
| | | bool isLock = TryGetLockTowerLayer(equipPlace, out towerLayer);
|
| | | if (isLock && towerLayer > unlockTowerLayer)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetMaxSuitLV(int itemId,int equipPlace,out int maxSuitLv)
|
| | | public bool TryGetMaxSuitLV(int itemId, int equipPlace, out int maxSuitLv)
|
| | | {
|
| | | maxSuitLv = 0;
|
| | | var config = ItemConfig.Get(itemId);
|
| | | if (config == null) return false;
|
| | | |
| | |
|
| | | var suitLvs = GetSuitLvList(equipPlace);
|
| | | if(suitLvs != null && suitLvs.Count > 0)
|
| | | if (suitLvs != null && suitLvs.Count > 0)
|
| | | {
|
| | | for(int i = suitLvs.Count - 1; i > -1; i--)
|
| | | for (int i = suitLvs.Count - 1; i > -1; i--)
|
| | | {
|
| | | var suitLv = suitLvs[i];
|
| | | if(suitLv <= config.LV)
|
| | | if (suitLv <= config.LV)
|
| | | {
|
| | | maxSuitLv = suitLv;
|
| | | return true;
|
| | |
| | | public List<int> GetSuitLvList(int equipPlace)
|
| | | {
|
| | | int suitType = 0;
|
| | | bool isSuit = TryGetSuitType(equipPlace,out suitType);
|
| | | if(suitAttrDict.ContainsKey(suitType))
|
| | | bool isSuit = TryGetSuitType(equipPlace, out suitType);
|
| | | if (suitAttrDict.ContainsKey(suitType))
|
| | | {
|
| | | var dict = suitAttrDict[suitType];
|
| | | return dict.Keys.ToList();
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | public bool TryGetIsActiveSuit(int equipPlace,int suitLV,out List<int> activeEquips)
|
| | | public bool TryGetIsActiveSuit(int equipPlace, int suitLV, out List<int> activeEquips)
|
| | | {
|
| | | activeEquips = new List<int>();
|
| | | List<int> equipPlaces = null;
|
| | | bool isSuit = TryGetEquipPlaces(equipPlace, out equipPlaces);
|
| | | bool isActive = true;
|
| | | if(equipPlaces != null)
|
| | | if (equipPlaces != null)
|
| | | {
|
| | | foreach(var key in equipPlaces)
|
| | | foreach (var key in equipPlaces)
|
| | | {
|
| | | var model = playerPack.GetItemByIndex(PackType.JadeDynastyEquip,key);
|
| | | if(model != null)
|
| | | var model = playerPack.GetItemByIndex(PackType.JadeDynastyEquip, key);
|
| | | if (model != null)
|
| | | {
|
| | | int equipLv = model.config.LV;
|
| | | if (equipLv >= suitLV)
|
| | |
| | | return isActive;
|
| | | }
|
| | |
|
| | | public bool TryGetIsActiveStoneSuit(int suitType,int suitLv,out int activeStoneNum)
|
| | | public bool TryGetIsActiveStoneSuit(int suitType, int suitLv, out int activeStoneNum)
|
| | | {
|
| | | activeStoneNum = 0;
|
| | | var equipPlaces = suitTypeDict[suitType];
|
| | |
| | | JadeDynastyGemModel.GemEquipData equipData;
|
| | | var existGem = gemModel.TryGetEquipGems(key, out equipData);
|
| | | uint[] stoneIds = existGem ? equipData.items : null;
|
| | | if(stoneIds != null)
|
| | | if (stoneIds != null)
|
| | | {
|
| | | foreach(var id in stoneIds)
|
| | | foreach (var id in stoneIds)
|
| | | {
|
| | | if(id != 0)
|
| | | if (id != 0)
|
| | | {
|
| | | var config = ItemConfig.Get((int)id);
|
| | | if (config.EffectValueB1 >= suitLv)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | return activeStoneNum >= gemResonanceNum;
|
| | | }
|
| | |
|
| | | public bool TryGetIsActiveSuit(out List<int> suitTypes,out List<int> suitLvs)
|
| | | public bool TryGetIsActiveSuit(out List<int> suitTypes, out List<int> suitLvs)
|
| | | {
|
| | | suitTypes = new List<int>();
|
| | | suitLvs = new List<int>();
|
| | | foreach(var key in suitTypeDict.Keys)
|
| | | foreach (var key in suitTypeDict.Keys)
|
| | | {
|
| | | var equipPlaces = suitTypeDict[key];
|
| | | if(equipPlaces.Count > 0)
|
| | | if (equipPlaces.Count > 0)
|
| | | {
|
| | | int curSuitLv = 0;
|
| | | int nextSuitLv = 0;
|
| | | var equipPlace = equipPlaces[0];
|
| | | bool isSuit = TryGetSuitLV(equipPlace,PackType.JadeDynastyEquip,out curSuitLv,out nextSuitLv);
|
| | | if(isSuit && curSuitLv != 0)
|
| | | bool isSuit = TryGetSuitLV(equipPlace, PackType.JadeDynastyEquip, out curSuitLv, out nextSuitLv);
|
| | | if (isSuit && curSuitLv != 0)
|
| | | {
|
| | | suitTypes.Add(key);
|
| | | suitLvs.Add(curSuitLv);
|
| | |
| | | int curSuitLv = 0;
|
| | | int nextSuitLv = 0;
|
| | | var equipPlace = equipPlaces[0];
|
| | | bool isSuit = TryGetStoneSuitLV(key,out curSuitLv, out nextSuitLv);
|
| | | bool isSuit = TryGetStoneSuitLV(key, out curSuitLv, out nextSuitLv);
|
| | | if (isSuit && curSuitLv != 0)
|
| | | {
|
| | | suitTypes.Add(key);
|
| | |
| | | return suitTypes.Count > 0;
|
| | | }
|
| | |
|
| | | public bool TryGetSuitLV(int equipPlace,PackType type,out int curSuitLv,out int nextSuitLV,int itemId = 0)
|
| | | public bool TryGetSuitLV(int equipPlace, PackType type, out int curSuitLv, out int nextSuitLV, int itemId = 0)
|
| | | {
|
| | | curSuitLv = 0;
|
| | | nextSuitLV = 0;
|
| | | switch(type)
|
| | | switch (type)
|
| | | {
|
| | | case PackType.JadeDynastyItem:
|
| | | if(itemId != 0)
|
| | | if (itemId != 0)
|
| | | {
|
| | | int maxSuitLv = 0;
|
| | | bool isMax = TryGetMaxSuitLV(itemId,equipPlace, out maxSuitLv);
|
| | | if(isMax)
|
| | | bool isMax = TryGetMaxSuitLV(itemId, equipPlace, out maxSuitLv);
|
| | | if (isMax)
|
| | | {
|
| | | nextSuitLV = maxSuitLv;
|
| | | return true;
|
| | |
| | | {
|
| | | foreach (var key in equipPlaces)
|
| | | {
|
| | | var model = playerPack.GetItemByIndex(type,key);
|
| | | if(model != null |
| | | var model = playerPack.GetItemByIndex(type, key);
|
| | | if (model != null
|
| | | && (minEquipLv > model.config.LV
|
| | | || minEquipLv == 0))
|
| | | {
|
| | | minEquipLv = model.config.LV;
|
| | | }
|
| | | else if(model == null)
|
| | | else if (model == null)
|
| | | {
|
| | | minEquipLv = 0;
|
| | | break;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if(suitLvs != null)
|
| | | if (suitLvs != null)
|
| | | {
|
| | | if (minEquipLv != 0)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | return false;
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | public bool TryGetStoneSuitLV(int suitType, out int curSuitLv, out int nextSuitLV)
|
| | |
| | | {
|
| | | foreach (var id in stoneIds)
|
| | | {
|
| | | if(id != 0)
|
| | | if (id != 0)
|
| | | {
|
| | | var config = ItemConfig.Get((int)id);
|
| | | if (!stoneDict.ContainsKey(config.EffectValueB1))
|
| | |
| | | stoneDict[config.EffectValueB1] += 1;
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if(suitLvs != null)
|
| | | if (suitLvs != null)
|
| | | {
|
| | | int maxLv = suitLvs[suitLvs.Count - 1];
|
| | | for (int i = suitLvs.Count - 1; i > -1; i--)
|
| | | {
|
| | | int suitLv = suitLvs[i];
|
| | | int haveNum = 0;
|
| | | foreach(var lv in stoneDict.Keys)
|
| | | foreach (var lv in stoneDict.Keys)
|
| | | {
|
| | | if(lv >= suitLv)
|
| | | if (lv >= suitLv)
|
| | | {
|
| | | haveNum += stoneDict[lv];
|
| | | }
|
| | |
| | | break;
|
| | | }
|
| | | }
|
| | | |
| | | if(curSuitLv < maxLv)
|
| | |
|
| | | if (curSuitLv < maxLv)
|
| | | {
|
| | | nextSuitLV = curSuitLv + 1;
|
| | | }
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public bool TryGetSumSuitAttr(int suitType,PackType type,out JadeDynastySuitAttrData activeSuit,out JadeDynastySuitAttrData nextSuit,int itemId = 0)
|
| | | public bool TryGetSumSuitAttr(int suitType, PackType type, out JadeDynastySuitAttrData activeSuit, out JadeDynastySuitAttrData nextSuit, int itemId = 0)
|
| | | {
|
| | | activeSuit = null;
|
| | | nextSuit = null;
|
| | |
| | | int equipPlace = suitTypeDict[suitType][0];
|
| | | int curSuitLv = 0;
|
| | | int nextSuitLv = 0;
|
| | | bool isSuitLv = TryGetSuitLV(equipPlace,type,out curSuitLv,out nextSuitLv,itemId);
|
| | | bool isSuitLv = TryGetSuitLV(equipPlace, type, out curSuitLv, out nextSuitLv, itemId);
|
| | |
|
| | | TryGetSuitAttrData(equipPlace,curSuitLv,out activeSuit);
|
| | | TryGetSuitAttrData(equipPlace,nextSuitLv,out nextSuit);
|
| | | TryGetSuitAttrData(equipPlace, curSuitLv, out activeSuit);
|
| | | TryGetSuitAttrData(equipPlace, nextSuitLv, out nextSuit);
|
| | |
|
| | | return activeSuit != null || nextSuit != null;
|
| | | }
|
| | |
|
| | | public bool TryGetStoneSumSuitAttr(int suitType,out JadeDynastyStoneSuitAttrData activeSuit, out JadeDynastyStoneSuitAttrData nextSuit)
|
| | | public bool TryGetStoneSumSuitAttr(int suitType, out JadeDynastyStoneSuitAttrData activeSuit, out JadeDynastyStoneSuitAttrData nextSuit)
|
| | | {
|
| | | activeSuit = null;
|
| | | nextSuit = null;
|
| | |
| | |
|
| | | int curSuitLv = 0;
|
| | | int nextSuitLv = 0;
|
| | | bool isSuitLv = TryGetStoneSuitLV(suitType,out curSuitLv, out nextSuitLv);
|
| | | bool isSuitLv = TryGetStoneSuitLV(suitType, out curSuitLv, out nextSuitLv);
|
| | |
|
| | | TryGetStoneSuitAttrData(suitType, curSuitLv, out activeSuit);
|
| | | TryGetStoneSuitAttrData(suitType, nextSuitLv, out nextSuit);
|
| | |
| | |
|
| | | public void OnClickSort()
|
| | | {
|
| | | ItemLogicUtility.Instance.SendPackResetQuest(PackType.JadeDynastyItem);
|
| | | ItemLogicUtility.Instance.ResetPack(PackType.JadeDynastyItem);
|
| | | TimeDownMgr.Instance.Begin(TimeDownMgr.CoolTimeType.BagSort, 5.0f, RefreshTime);
|
| | | sortText.text = Language.Get("BagWin_SortCDbtn_Text_1", 5);
|
| | | sortImage.SetSprite("BlackBtn");
|
| | |
| | | for (int i = 0; i < package.EquipCount; i++)
|
| | | {
|
| | | var data = package.InfoList[i];
|
| | | if (data.EquipPlace < (int)RoleEquipType.JadeDynasty_Cloak
|
| | | || data.EquipPlace > (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var gemEquipData = new GemEquipData()
|
| | | {
|
| | | binds = new int[4] { 0, 0, 0, 0 },
|
| | |
| | | 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();
|
| | | SetJadeDynastySuitAttr();
|
| | | 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 SetJadeDynastySuitAttr()
|
| | | {
|
| | | if (jadeDynastySuitObj == null) return;
|
| | |
|
| | | if(itemAttrData.itemConfig.EquipPlace >= (int)RoleEquipType.JadeDynasty_Cloak
|
| | | && itemAttrData.itemConfig.EquipPlace <= (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | {
|
| | | jadeDynastySuitObj.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | jadeDynastySuitObj.SetActive(false);
|
| | | return;
|
| | | }
|
| | |
|
| | | PackType packType = itemAttrData.packType == PackType.Deleted ? PackType.JadeDynastyItem : itemAttrData.packType;
|
| | |
|
| | | curJadeDynastySuitAttr.SetDisplay(packType,false,itemAttrData.itemConfig.EquipPlace,itemAttrData.itemId);
|
| | | nextJadeDynastySuitAttr.SetDisplay(packType, true, itemAttrData.itemConfig.EquipPlace,itemAttrData.itemId);
|
| | | }
|
| | |
|
| | | private void SetMidUIHeight(float midHeight)
|
| | | {
|
| | |
| | | private int[] drugIDs; |
| | | private int[] onekeySellTypes; |
| | | private int[] pushItemIds; |
| | | private int[] pushBuffTypeIds; |
| | | |
| | | private List<int> equipBaseProperties = new List<int>(); |
| | | private Dictionary<int, int> promptUseLimitDict; |
| | |
| | | onekeySellTypes = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("OneKeySellItemType").Numerical1); |
| | | |
| | | pushItemIds = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("IntroductionItem").Numerical1); |
| | | pushBuffTypeIds = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("IntroductionItem").Numerical2); |
| | | |
| | | betterEquipExceptDungeonDict = new Dictionary<int, List<int>>(); |
| | | var excEquipData = JsonMapper.ToObject(FuncConfigConfig.Get("GoodItemDungeon").Numerical1); |
| | |
| | | { |
| | | for (int i = 0; i < itemModels.Count; i++) |
| | | { |
| | | if (itemModels[i].config.JobLimit / 100 == PlayerDatas.Instance.baseData.Job) |
| | | if (IsJobCompatibleItem(itemModels[i].itemId)) |
| | | { |
| | | if (itemModels[i].config.LV >= item.config.LV) |
| | | { |
| | |
| | | return; |
| | | } |
| | | |
| | | if (item.packType != PackType.Item && item.packType != PackType.JadeDynastyItem) |
| | | if (item.packType != PackType.Item) |
| | | { |
| | | return; |
| | | } |
| | |
| | | case RoleEquipType.FairyCan2: |
| | | case RoleEquipType.Wing: |
| | | case RoleEquipType.Guard1: |
| | | case RoleEquipType.JadeDynasty_Cloak: |
| | | case RoleEquipType.JadeDynasty_FaceMask: |
| | | case RoleEquipType.JadeDynasty_Glove1: |
| | | case RoleEquipType.JadeDynasty_Glove2: |
| | | case RoleEquipType.JadeDynasty_Ruyi: |
| | | case RoleEquipType.JadeDynasty_Pendant: |
| | | case RoleEquipType.JadeDynasty_Ring1: |
| | | case RoleEquipType.JadeDynasty_Ring2: |
| | | case RoleEquipType.JadeDynasty_Sword1: |
| | | case RoleEquipType.JadeDynasty_Sword2: |
| | | case RoleEquipType.JadeDynasty_Sword3: |
| | | case RoleEquipType.JadeDynasty_Sword4: |
| | | case RoleEquipType.Guard2: |
| | | case RoleEquipType.Glove: |
| | | case RoleEquipType.Jade: |
| | | case RoleEquipType.PeerlessWeapon1: |
| | | case RoleEquipType.PeerlessWeapon2: |
| | | if (betterEquipExceptDungeonDict.ContainsKey(PlayerDatas.Instance.baseData.MapID)) |
| | | { |
| | | if (betterEquipExceptDungeonDict[PlayerDatas.Instance.baseData.MapID].Contains(item.itemId)) |
| | |
| | | if (_sellItemScorelist.Count > 0) |
| | | { |
| | | int score = 0; |
| | | int curJob = PlayerDatas.Instance.baseData.Job; |
| | | for (score = _sellItemScorelist.Count - 1; score > -1; score--) |
| | | { |
| | | SinglePack equipPack = playerPack.GetSinglePack(PackType.Equip); |
| | |
| | | model = equipPack.GetItemByIndex(key); |
| | | } |
| | | |
| | | List<ItemModel> modellist = _sameIndexEquipDict[key][_sellItemScorelist[score]]; |
| | | int i = 0; |
| | | var modellist = _sameIndexEquipDict[key][_sellItemScorelist[score]]; |
| | | bool remainBetter = true; |
| | | for (i = 0; i < modellist.Count; i++) |
| | | for (var i = 0; i < modellist.Count; i++) |
| | | { |
| | | double joblimit = Math.Floor((double)modellist[i].config.JobLimit / 100); |
| | | if (model != null) |
| | | { |
| | | if (remainBetter) |
| | | { |
| | | if (model.equipScore < _sellItemScorelist[score] && curJob == joblimit) |
| | | if (model.equipScore < _sellItemScorelist[score] && IsJobCompatibleItem(model.itemId)) |
| | | { |
| | | _sameIndexEquipDict[key].Remove(_sellItemScorelist[score]); |
| | | remainBetter = false; |
| | |
| | | } |
| | | else |
| | | { |
| | | if (curJob == joblimit) |
| | | if (IsJobCompatibleItem(model.itemId)) |
| | | { |
| | | if (remainBetter) |
| | | { |
| | |
| | | } |
| | | |
| | | } |
| | | int j = 0; |
| | | for (j = 0; j < _sellItemScorelist.Count; j++) |
| | | |
| | | for (var j = 0; j < _sellItemScorelist.Count; j++) |
| | | { |
| | | |
| | | if (_sameIndexEquipDict[key].ContainsKey(_sellItemScorelist[j])) |
| | | { |
| | | int k = 0; |
| | | List<ItemModel> sellModlelist = _sameIndexEquipDict[key][_sellItemScorelist[j]]; |
| | | for (k = 0; k < sellModlelist.Count; k++) |
| | | var sellModlelist = _sameIndexEquipDict[key][_sellItemScorelist[j]]; |
| | | for (var k = 0; k < sellModlelist.Count; k++) |
| | | { |
| | | _sellItemlist.Add(sellModlelist[k]); |
| | | } |
| | |
| | | /// 一键出售物品的请求 |
| | | /// </summary> |
| | | /// <param name="_oneKeySelllist"></param> |
| | | public void SendOneKeySellQuest(List<ItemModel> _oneKeySelllist) |
| | | public void OneKeySell(List<ItemModel> _oneKeySelllist) |
| | | { |
| | | if (!isPackResetOk || SettingEffectMgr.Instance.isStartOneKeySell) return; |
| | | |
| | |
| | | /// </summary> |
| | | /// <param name="type"></param> |
| | | public bool isPackResetOk { get; set; } |
| | | public void SendPackResetQuest(PackType type) |
| | | public void ResetPack(PackType type) |
| | | { |
| | | if (lookLineIndex > -1) |
| | | { |
| | |
| | | SinglePack singlePack = playerPack.GetSinglePack(type); |
| | | if (singlePack != null) |
| | | { |
| | | C070F_tagCItemPackReset packReset = new C070F_tagCItemPackReset(); |
| | | var packReset = new C070F_tagCItemPackReset(); |
| | | packReset.Type = (byte)type; |
| | | packReset.ItemBeginIndex = 0; |
| | | packReset.ItemEndIndex = (ushort)(singlePack.unlockedGridCount - 1); |
| | |
| | | #endregion |
| | | |
| | | #region 判断是否有更好的装备替换 |
| | | /// <summary> |
| | | /// 过滤装备位判断 |
| | | /// </summary> |
| | | /// <param name="ignoreType"></param> |
| | | /// <returns></returns> |
| | | public bool CheckBetterEquip(RoleEquipType ignoreType) |
| | | { |
| | | SinglePack singlePack = playerPack.GetSinglePack(PackType.Equip); |
| | | if (singlePack != null) |
| | | { |
| | | Dictionary<int, ItemModel> putOnDic = singlePack.GetAllItems(); |
| | | foreach (var key in putOnDic.Keys) |
| | | { |
| | | if ((RoleEquipType)key == ignoreType) |
| | | { |
| | | continue; |
| | | } |
| | | if (key < 13) |
| | | { |
| | | List<ItemModel> itemlist = GetSameEquipPlacelist(key); |
| | | int i = 0; |
| | | for (i = 0; i < itemlist.Count; i++) |
| | | { |
| | | bool isOverdue = IsOverdue(itemlist[i].guid, itemlist[i].itemId, itemlist[i].useDataDict); |
| | | bool isRealm = PlayerDatas.Instance.baseData.realmLevel >= itemlist[i].config.RealmLimit ? true : false; |
| | | if (itemlist[i].equipScore > putOnDic[key].equipScore && !isOverdue && isRealm) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | int i = 1; |
| | | for (i = 1; i < 13; i++) |
| | | { |
| | | List<ItemModel> itemlist = GetSameEquipPlacelist(i); |
| | | if (itemlist.Count > 0) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private List<ItemModel> GetSameEquipPlacelist(int equipPlace) |
| | | { |
| | | List<ItemModel> modellist = new List<ItemModel>(); |
| | | Dictionary<int, ItemModel> dic = null; |
| | | SinglePack singlePack = playerPack.GetSinglePack(PackType.Item); |
| | | if (singlePack != null) |
| | | { |
| | | dic = singlePack.GetAllItems(); |
| | | foreach (var model in dic.Values) |
| | | { |
| | | if (model.config.EquipPlace == equipPlace) |
| | | { |
| | | double equipJob = Math.Floor((double)model.config.JobLimit / 100); |
| | | if (equipJob == 0 || equipJob == PlayerDatas.Instance.baseData.Job) |
| | | { |
| | | modellist.Add(model); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return modellist; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取装备评分最高可提升战力的装备 |
| | |
| | | ItemModel putModel = playerPack.GetItemByIndex(PackType.Equip, equipPlace); |
| | | equipPlace = (equipPlace == 9 || equipPlace == 10) ? 9 : equipPlace; |
| | | var guid = string.Empty; |
| | | var equips = new List<string>(); |
| | | var score = putModel == null ? 0 : putModel.equipScore; |
| | | var job = PlayerDatas.Instance.baseData.Job; |
| | | foreach (var item in allItems.Values) |
| | | { |
| | | if (item.config.EquipPlace == equipPlace) |
| | | { |
| | | if (!IsOverdue(item.guid, item.itemId, item.useDataDict) |
| | | && (item.config.JobLimit == 0 || (item.config.JobLimit / 100) == job) && item.equipScore > score) |
| | | && (IsJobCompatibleItem(item.itemId)) && item.equipScore > score) |
| | | { |
| | | guid = item.guid; |
| | | score = item.equipScore; |
| | |
| | | int equipPlace = itemModel.config.EquipPlace; |
| | | if (!itemModelDict.ContainsKey(equipPlace)) |
| | | { |
| | | Dictionary<int, ItemModel> dict = new Dictionary<int, ItemModel>(); |
| | | var dict = new Dictionary<int, ItemModel>(); |
| | | if (IsFightUp(itemModel.itemId, itemModel.equipScore) == 1) |
| | | { |
| | | dict.Add(itemModel.itemPlace, itemModel); |
| | |
| | | return itemModel; |
| | | } |
| | | |
| | | public bool IsCanPutOn(ItemModel itemModel) |
| | | bool IsCanPutOn(ItemModel item) |
| | | { |
| | | double equipJob = Math.Floor((double)itemModel.config.JobLimit / 100); |
| | | int playerJob = PlayerDatas.Instance.baseData.Job; |
| | | int equipPlace = itemModel.config.EquipPlace; |
| | | if (equipPlace == 0 || equipPlace > 12) return false; |
| | | if (equipJob != 0 && equipJob != playerJob) return false; |
| | | if (IsJobCompatibleItem(item.itemId)) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | List<int> putOnlimitList = itemModel.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit); |
| | | if (putOnlimitList != null) |
| | | int equipPlace = item.config.EquipPlace; |
| | | if (equipPlace == 0 || equipPlace > 17) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | var putOnlimitList = item.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit); |
| | | if (!putOnlimitList.IsNullOrEmpty()) |
| | | { |
| | | if (putOnlimitList[0] == 1) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | return CheckPutOnRealm(itemModel.config); |
| | | return PlayerDatas.Instance.baseData.realmLevel >= item.config.RealmLimit; |
| | | } |
| | | |
| | | private bool CheckPutOnRealm(ItemConfig config) |
| | | { |
| | | var _realmLv = config.RealmLimit; |
| | | if (PlayerDatas.Instance.baseData.realmLevel < _realmLv) |
| | | { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | #endregion |
| | | |
| | | #region 得到物品的品质颜色 |
| | |
| | | //设置玩家货币显示 |
| | | public string OnChangeCoinsUnit(ulong value) |
| | | { |
| | | |
| | | string strCoins = value.ToString(); |
| | | if (strCoins.Length > 4 && strCoins.Length < 9) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public int IsFightUp(int _itemID, int _score)//-1低级,0不是本职业,1更好 |
| | | { |
| | | ItemConfig chinItemModel = ItemConfig.Get(_itemID); |
| | | if (chinItemModel != null) |
| | | var config = ItemConfig.Get(_itemID); |
| | | if (config != null) |
| | | { |
| | | ItemModel putOnModel = null; |
| | | switch ((RoleEquipType)chinItemModel.EquipPlace) |
| | | var index = EquipModel.GetItemServerEquipPlace(_itemID); |
| | | if (index == -1) |
| | | { |
| | | case RoleEquipType.Clothes: |
| | | case RoleEquipType.FairyCan1: |
| | | case RoleEquipType.Belt: |
| | | case RoleEquipType.Hat: |
| | | case RoleEquipType.Neck: |
| | | case RoleEquipType.Shoes: |
| | | case RoleEquipType.Guard1: |
| | | case RoleEquipType.Trousers: |
| | | case RoleEquipType.Weapon: |
| | | case RoleEquipType.Weapon2: |
| | | case RoleEquipType.Wing: |
| | | putOnModel = playerPack.GetItemByIndex(PackType.Equip, chinItemModel.EquipPlace); |
| | | break; |
| | | case RoleEquipType.JadeDynasty_Cloak: |
| | | case RoleEquipType.JadeDynasty_FaceMask: |
| | | case RoleEquipType.JadeDynasty_Glove1: |
| | | case RoleEquipType.JadeDynasty_Pendant: |
| | | case RoleEquipType.JadeDynasty_Ring1: |
| | | case RoleEquipType.JadeDynasty_Ruyi: |
| | | case RoleEquipType.JadeDynasty_Sword1: |
| | | case RoleEquipType.JadeDynasty_Sword2: |
| | | case RoleEquipType.JadeDynasty_Sword3: |
| | | case RoleEquipType.JadeDynasty_Sword4: |
| | | putOnModel = playerPack.GetItemByIndex(PackType.JadeDynastyEquip, chinItemModel.EquipPlace); |
| | | break; |
| | | default: |
| | | return 0; |
| | | return 0; |
| | | } |
| | | |
| | | ItemModel putOnModel2 = null; |
| | | switch ((RoleEquipType)chinItemModel.EquipPlace) |
| | | var item = playerPack.GetItemByIndex(PackType.Equip, index); |
| | | var equipScore = item != null ? item.equipScore : 0; |
| | | if (IsJobCompatibleItem(_itemID)) |
| | | { |
| | | case RoleEquipType.FairyCan1: |
| | | putOnModel2 = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FairyCan2); |
| | | break; |
| | | case RoleEquipType.JadeDynasty_Glove1: |
| | | putOnModel2 = playerPack.GetItemByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove2); |
| | | break; |
| | | case RoleEquipType.JadeDynasty_Ring1: |
| | | putOnModel2 = playerPack.GetItemByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring2); |
| | | break; |
| | | } |
| | | |
| | | switch ((RoleEquipType)chinItemModel.EquipPlace) |
| | | { |
| | | case RoleEquipType.FairyCan1: |
| | | case RoleEquipType.JadeDynasty_Glove1: |
| | | case RoleEquipType.JadeDynasty_Ring1: |
| | | if (putOnModel2 != null) |
| | | { |
| | | if (putOnModel != null) |
| | | { |
| | | if (putOnModel2.equipScore < putOnModel.equipScore) |
| | | { |
| | | putOnModel = putOnModel2; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | putOnModel = putOnModel2; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | int equipScore1 = 0; |
| | | if (putOnModel != null) |
| | | { |
| | | equipScore1 = (int)putOnModel.equipScore; |
| | | } |
| | | |
| | | int playerJob = PlayerDatas.Instance.baseData.Job; |
| | | |
| | | if (playerJob == Math.Floor((double)chinItemModel.JobLimit / 100) || chinItemModel.JobLimit == 0) |
| | | { |
| | | if (equipScore1 > _score) |
| | | return -1; |
| | | else if (equipScore1 < _score) |
| | | return 1; |
| | | else |
| | | return 0; |
| | | return _score.CompareTo(equipScore); |
| | | } |
| | | else |
| | | { |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | #endregion |
| | | |
| | | public bool IsJobCompatibleItem(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | return config.JobLimit == 0 || config.JobLimit / 100 == PlayerDatas.Instance.baseData.Job; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | 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 装备 |
| | |
| | | } |
| | | |
| | | var itemId = selectedItem.itemId; |
| | | if (selectedItem.config.JobLimit != 0 && selectedItem.config.JobLimit / 100 != PlayerDatas.Instance.baseData.Job) |
| | | if (!ItemLogicUtility.Instance.IsJobCompatibleItem(selectedItem.itemId)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("GeRen_lhs_31379"); |
| | | return; |
| | |
| | | var putOnLimits = selectedItem.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit); |
| | | if (putOnLimits != null && putOnLimits[0] == 1) |
| | | { |
| | | var placable = CheckPutOnPlace(itemId); |
| | | if (!placable) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | PutOnEquip(selectedItem.equipPlace,selectedItem.guid); |
| | | PutOnEquip(selectedItem.equipPlace, selectedItem.guid); |
| | | return; |
| | | } |
| | | |
| | | var wearable = IsWearable(itemId); |
| | | if (wearable) |
| | | { |
| | | var placable = CheckPutOnPlace(itemId); |
| | | if (!placable) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | PutOnEquip(selectedItem.equipPlace, selectedItem.guid); |
| | | } |
| | | } |
| | |
| | | return true; |
| | | } |
| | | |
| | | private bool CheckPutOnPlace(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | if (config == null) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | ItemModel putOnModel1 = null; |
| | | ItemModel putOnModel2 = null; |
| | | bool isSameEquip = false; |
| | | switch ((RoleEquipType)config.EquipPlace) |
| | | { |
| | | case RoleEquipType.JadeDynasty_Glove1: |
| | | isSameEquip = true; |
| | | putOnModel1 = packModel.GetItemByIndex(PackType.JadeDynastyEquip, config.EquipPlace); |
| | | putOnModel2 = packModel.GetItemByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove2); |
| | | break; |
| | | case RoleEquipType.JadeDynasty_Ring1: |
| | | isSameEquip = true; |
| | | putOnModel1 = packModel.GetItemByIndex(PackType.JadeDynastyEquip, config.EquipPlace); |
| | | putOnModel2 = packModel.GetItemByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring2); |
| | | break; |
| | | } |
| | | |
| | | if (isSameEquip) |
| | | { |
| | | if (putOnModel1 != null || putOnModel2 != null) |
| | | { |
| | | WindowCenter.Instance.Open<FairyWearWin>(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | |
| | | } |
| | | |
| | | public void CheckSuitReplaceInfo(int equipPlace, ItemModel item) |
| | | { |
| | | if (item == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (item.packType == PackType.JadeDynastyItem) |
| | | { |
| | | if (equipPlace >= (int)RoleEquipType.JadeDynasty_Cloak && equipPlace <= (int)RoleEquipType.JadeDynasty_Sword4) |
| | | { |
| | | var jadeDynastyModel = ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); |
| | | bool islock = jadeDynastyModel.IsLockEquipPlace(equipPlace); |
| | | if (islock) |
| | | { |
| | | int towerlayer = 0; |
| | | jadeDynastyModel.TryGetLockTowerLayer(equipPlace, out towerlayer); |
| | | SysNotifyMgr.Instance.ShowTip("JadeDynastyEquip", towerlayer); |
| | | 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 (item.packType == PackType.JadeDynastyItem) |
| | | { |
| | | if (item != null && item.config.BindType == 1) |
| | | { |
| | | replaceTip = Language.Get("JadeDynastyEquip5"); |
| | | 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); |
| | |
| | | EquipAttrShift(equipPlace, oldItem); |
| | | } |
| | | |
| | | switch ((RoleEquipType)equipPlace) |
| | | { |
| | | case RoleEquipType.JadeDynasty_Cloak: |
| | | case RoleEquipType.JadeDynasty_FaceMask: |
| | | case RoleEquipType.JadeDynasty_Glove1: |
| | | case RoleEquipType.JadeDynasty_Glove2: |
| | | case RoleEquipType.JadeDynasty_Pendant: |
| | | case RoleEquipType.JadeDynasty_Ring1: |
| | | case RoleEquipType.JadeDynasty_Ring2: |
| | | case RoleEquipType.JadeDynasty_Ruyi: |
| | | case RoleEquipType.JadeDynasty_Sword1: |
| | | case RoleEquipType.JadeDynasty_Sword2: |
| | | case RoleEquipType.JadeDynasty_Sword3: |
| | | case RoleEquipType.JadeDynasty_Sword4: |
| | | PutOnJadeDynastyEquip(equipPlace, guid); |
| | | break; |
| | | default: |
| | | PutOnNormalEquip(equipPlace, guid); |
| | | break; |
| | | } |
| | | |
| | | PutOnNormalEquip(equipPlace, guid); |
| | | SoundPlayer.Instance.PlayUIAudio(24); |
| | | } |
| | | |
| | |
| | | private void EquipAttrShift(int equipPlace, ItemModel item) |
| | | { |
| | | var packType = GeneralDefine.GetPackTypeByItemType(item.config.Type); |
| | | ItemModel putOnModel = null; |
| | | switch (packType) |
| | | { |
| | | case PackType.JadeDynastyItem: |
| | | putOnModel = packModel.GetItemByIndex(PackType.JadeDynastyEquip, equipPlace); |
| | | break; |
| | | default: |
| | | putOnModel = packModel.GetItemByIndex(PackType.Equip, equipPlace); |
| | | break; |
| | | } |
| | | var putOnModel = packModel.GetItemByIndex(PackType.Equip, equipPlace); |
| | | |
| | | if (putOnModel == null) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | uint[] stones = null; |
| | | switch (packType) |
| | | { |
| | | case PackType.Item: |
| | | stones = PlayerStoneData.Instance.GetStoneInfo(equipPlace); |
| | | break; |
| | | case PackType.JadeDynastyItem: |
| | | JadeDynastyGemModel.GemEquipData equipData; |
| | | var model = ModelCenter.Instance.GetModel<JadeDynastyGemModel>(); |
| | | var existGem = model.TryGetEquipGems(equipPlace, out equipData); |
| | | stones = existGem ? equipData.items : null; |
| | | break; |
| | | } |
| | | |
| | | var gemOpenLvs = packType == PackType.JadeDynastyItem ? itemTipsModel.jadeDynastyGemOpenLvs : itemTipsModel.gemOpenLvs; |
| | | var stones = PlayerStoneData.Instance.GetStoneInfo(equipPlace); |
| | | var gemOpenLvs = itemTipsModel.gemOpenLvs; |
| | | if (stones != null) |
| | | { |
| | | int i = 0; |
| | |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (suitModel.IsPerfectGetSuitLv(item.itemId, equipPlace)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("SwitchEquip_SuitPanel"); |
| | | } |
| | | |
| | | var washPro = equipWashModel.GetWashEquipInfo(equipPlace); |
| | |
| | | return; |
| | | } |
| | | |
| | | SinglePack singlePack = null; |
| | | int remainGrid = 0; |
| | | int equipPlace = item.itemPlace; |
| | | if (item.packType == PackType.JadeDynastyEquip) |
| | | var equipPlace = EquipModel.GetItemServerEquipPlace(item.itemId); |
| | | var singlePack = packModel.GetSinglePack(PackType.Item); |
| | | var remainGrid = packModel.GetEmptyGridCount(PackType.Item); |
| | | if (remainGrid < 1) |
| | | { |
| | | equipPlace += 121; |
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_998371"); |
| | | } |
| | | |
| | | switch ((RoleEquipType)equipPlace) |
| | | else |
| | | { |
| | | case RoleEquipType.JadeDynasty_Cloak: |
| | | case RoleEquipType.JadeDynasty_FaceMask: |
| | | case RoleEquipType.JadeDynasty_Glove1: |
| | | case RoleEquipType.JadeDynasty_Glove2: |
| | | case RoleEquipType.JadeDynasty_Pendant: |
| | | case RoleEquipType.JadeDynasty_Ring1: |
| | | case RoleEquipType.JadeDynasty_Ring2: |
| | | case RoleEquipType.JadeDynasty_Ruyi: |
| | | case RoleEquipType.JadeDynasty_Sword1: |
| | | case RoleEquipType.JadeDynasty_Sword2: |
| | | case RoleEquipType.JadeDynasty_Sword3: |
| | | case RoleEquipType.JadeDynasty_Sword4: |
| | | remainGrid = packModel.GetEmptyGridCount(PackType.JadeDynastyItem); |
| | | if (remainGrid < 1) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_998371"); |
| | | } |
| | | else |
| | | { |
| | | SendPutOffJadeDynastyEquip(equipPlace); |
| | | SoundPlayer.Instance.PlayUIAudio(25); |
| | | } |
| | | break; |
| | | default: |
| | | singlePack = packModel.GetSinglePack(PackType.Item); |
| | | remainGrid = packModel.GetEmptyGridCount(PackType.Item); |
| | | if (remainGrid < 1) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_998371"); |
| | | } |
| | | else |
| | | { |
| | | if (singlePack != null) |
| | | { |
| | | int gridIndex = singlePack.GetFirstEmptyGridIndex(); |
| | | SendPutOffNormalEquip(equipPlace, gridIndex); |
| | | SoundPlayer.Instance.PlayUIAudio(25); |
| | | } |
| | | } |
| | | break; |
| | | if (singlePack != null) |
| | | { |
| | | int gridIndex = singlePack.GetFirstEmptyGridIndex(); |
| | | SendPutOffNormalEquip(equipPlace, gridIndex); |
| | | SoundPlayer.Instance.PlayUIAudio(25); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | if (attrData.itemConfig.EquipPlace > 0 && attrData.itemConfig.EquipPlace <= (int)RoleEquipType.Guard1) |
| | | { |
| | | bool isOverdue = ItemLogicUtility.Instance.IsOverdue(attrData.guid, attrData.itemConfig.ID, attrData.useDataDict); |
| | | bool isLimit = Math.Floor((double)attrData.itemConfig.JobLimit / 100) == PlayerDatas.Instance.baseData.Job |
| | | || attrData.itemConfig.JobLimit == 0 ? true : false; |
| | | bool isLimit = ItemLogicUtility.Instance.IsJobCompatibleItem(attrData.itemId) ? true : false; |
| | | var putModel = packModel.GetItemByIndex(PackType.Equip, attrData.itemConfig.EquipPlace); |
| | | if (attrData.itemConfig.EquipPlace == (int)RoleEquipType.FairyCan1) |
| | | { |
| | | var fairy2Model = packModel.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FairyCan2); |
| | | if (fairy2Model == null || putModel == null) |
| | | { |
| | | putModel = null; |
| | | } |
| | | else |
| | | { |
| | | putModel = putModel.equipScore > fairy2Model.equipScore ? fairy2Model : putModel; |
| | | } |
| | | } |
| | | |
| | | if (!isLimit || isOverdue || (putModel != null && attrData.score < putModel.equipScore)) |
| | | { |
| | |
| | | var dogzModel = ModelCenter.Instance.GetModel<DogzModel>();
|
| | | dogzModel.TryGetDogzEquip(dogzModel.presentSelectDogz, equipPlace, out itemModel);
|
| | | break;
|
| | | case PackType.JadeDynastyEquip:
|
| | | itemModel = playerPack.GetItemByIndex(type, equipPlace);
|
| | | break;
|
| | | }
|
| | |
|
| | | if (itemModel == null) return;
|
| | |
|
| | | ItemModel fairyModel2 = null;
|
| | | switch ((RoleEquipType)equipPlace)
|
| | | {
|
| | | case RoleEquipType.FairyCan1:
|
| | | fairyModel2 = playerPack.GetItemByIndex(type, (int)RoleEquipType.FairyCan2);
|
| | | if (fairyModel2 != null)
|
| | | {
|
| | | if (itemModel != null)
|
| | | {
|
| | | if (fairyModel2.equipScore < itemModel.equipScore)
|
| | | {
|
| | | itemModel = fairyModel2;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | itemModel = fairyModel2;
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | fairyModel2 = playerPack.GetItemByIndex(type, (int)RoleEquipType.JadeDynasty_Glove2);
|
| | | if (fairyModel2 != null)
|
| | | {
|
| | | if (itemModel != null)
|
| | | {
|
| | | if (fairyModel2.equipScore < itemModel.equipScore)
|
| | | {
|
| | | itemModel = fairyModel2;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | itemModel = fairyModel2;
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | fairyModel2 = playerPack.GetItemByIndex(type, (int)RoleEquipType.JadeDynasty_Ring2);
|
| | | if (fairyModel2 != null)
|
| | | {
|
| | | if (itemModel != null)
|
| | | {
|
| | | if (fairyModel2.equipScore < itemModel.equipScore)
|
| | | {
|
| | | itemModel = fairyModel2;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | itemModel = fairyModel2;
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | if (itemModel != null)
|
| | | {
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, true
|
| | | , type, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.userData));
|
| | |
|
| | | }
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, true
|
| | | , type, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.userData));
|
| | | }
|
| | |
|
| | | public void ShowUICtrl()
|
| | |
| | | #endregion
|
| | |
|
| | | #region 解锁背包格子数据
|
| | | public int OpenCount
|
| | | {
|
| | | public int OpenCount {
|
| | | get; private set;
|
| | | }
|
| | |
|
| | | public PackType packType { get; private set; }
|
| | |
|
| | | public int Index
|
| | | {
|
| | | public int Index {
|
| | | get; private set;
|
| | | }
|
| | |
|
| | |
| | | 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)
|
| | |
| | | }
|
| | |
|
| | | washDataDict = new Dictionary<int, int>();
|
| | | this.tagWashModel = EquipWashConfig.GetEquipWashData(type, lv);
|
| | | this.tagWashModel = EquipWashConfig.Get(type, lv);
|
| | | if (this.tagWashModel != null)
|
| | | {
|
| | | for (i = 0; i < values.Length; i++)
|
| | |
| | | switch (i)
|
| | | {
|
| | | case 0:
|
| | | washDataDict.Add(tagWashModel.washConfig.attType1, values[0]);
|
| | | washDataDict.Add(tagWashModel.config.attType1, values[0]);
|
| | | break;
|
| | | case 1:
|
| | | washDataDict.Add(tagWashModel.washConfig.attType2, values[1]);
|
| | | washDataDict.Add(tagWashModel.config.attType2, values[1]);
|
| | | break;
|
| | | case 2:
|
| | | washDataDict.Add(tagWashModel.washConfig.attType3, values[2]);
|
| | | washDataDict.Add(tagWashModel.config.attType3, values[2]);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | 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)
|
| | |
| | | using UnityEngine;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | using Snxxz.UI;
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using System.Linq;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | if (compareSocre <= 0 && (type == PackType.Equip || type == PackType.DogzEquip || type == PackType.JadeDynastyEquip))
|
| | | if (compareSocre <= 0 && (type == PackType.Equip || type == PackType.DogzEquip))
|
| | | {
|
| | | return 0;
|
| | | }
|
| | |
| | | return 1;
|
| | | }
|
| | |
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | if (config.JobLimit != 0 && job != config.JobLimit / 100)
|
| | | if (!ItemLogicUtility.Instance.IsJobCompatibleItem(itemId))
|
| | | {
|
| | | return 1;
|
| | | }
|
| | |
| | | {
|
| | | case PackType.DogzItem:
|
| | | compareSocre = GetCurrentEquipSocre(PackType.DogzEquip, config.EquipPlace);
|
| | | break;
|
| | | case PackType.JadeDynastyItem:
|
| | | compareSocre = GetCurrentEquipSocre(PackType.JadeDynastyEquip, config.EquipPlace);
|
| | | break;
|
| | | default:
|
| | | var result = equipModel.CompareToCurrent(guid);
|
| | |
| | |
|
| | | int GetCurrentEquipSocre(PackType type, int equipPlace)
|
| | | {
|
| | | ItemModel fairy01 = null;
|
| | | ItemModel fairy02 = null;
|
| | | switch (type)
|
| | | {
|
| | | case PackType.DogzEquip:
|
| | |
| | | ItemModel putOnModel = null;
|
| | | dogzModel.TryGetDogzEquip(dogzModel.presentSelectDogz, equipPlace, out putOnModel);
|
| | | return putOnModel == null ? 0 : putOnModel.equipScore;
|
| | | case PackType.JadeDynastyEquip:
|
| | |
|
| | | switch ((RoleEquipType)equipPlace)
|
| | | {
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | fairy01 = packModel.GetItemByIndex(type, (int)RoleEquipType.JadeDynasty_Glove1);
|
| | | fairy02 = packModel.GetItemByIndex(type, (int)RoleEquipType.JadeDynasty_Glove2);
|
| | | if (fairy01 == null || fairy02 == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | return fairy01.equipScore >= fairy02.equipScore ? fairy02.equipScore : fairy01.equipScore;
|
| | | }
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | fairy01 = packModel.GetItemByIndex(type, (int)RoleEquipType.JadeDynasty_Ring1);
|
| | | fairy02 = packModel.GetItemByIndex(type, (int)RoleEquipType.JadeDynasty_Ring2);
|
| | | if (fairy01 == null || fairy02 == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | return fairy01.equipScore >= fairy02.equipScore ? fairy02.equipScore : fairy01.equipScore;
|
| | | }
|
| | | default:
|
| | | ItemModel model = packModel.GetItemByIndex(type, equipPlace);
|
| | | return model == null ? 0 : model.equipScore;
|
| | | }
|
| | | default:
|
| | | ItemModel model = packModel.GetItemByIndex(type, equipPlace);
|
| | | return model == null ? 0 : model.equipScore;
|
| | | }
|
| | |
|
| | | return 0;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public void OnClickSortBtn()
|
| | | {
|
| | | ItemLogicUtility.Instance.SendPackResetQuest(PackType.Item);
|
| | | ItemLogicUtility.Instance.ResetPack(PackType.Item);
|
| | | TimeDownMgr.Instance.Begin(TimeDownMgr.CoolTimeType.BagSort, 5.0f, RefreshBagSortTime);
|
| | | _timeBagDown.text = Language.Get("BagWin_SortCDbtn_Text_1", 5);
|
| | | _bagSortImage.SetSprite("BlackBtn");
|
| | |
| | | }
|
| | | public void OnClickDepotSortBtn()
|
| | | {
|
| | | ItemLogicUtility.Instance.SendPackResetQuest(PackType.Warehouse);
|
| | | ItemLogicUtility.Instance.ResetPack(PackType.Warehouse);
|
| | | TimeDownMgr.Instance.Begin(TimeDownMgr.CoolTimeType.DepotSort, 5.0f, RefreshDepotSortTime);
|
| | | _timeDepotDown.text = Language.Get("BagWin_SortCDbtn_Text_1", 5);
|
| | | _depotSortImage.SetSprite("BlackBtn");
|
| | |
| | |
|
| | | private void OnClickSellBtn(List<ItemModel> _oneKeySelllist)
|
| | | {
|
| | | ItemLogicUtility.Instance.SendOneKeySellQuest(_oneKeySelllist);
|
| | | ItemLogicUtility.Instance.OneKeySell(_oneKeySelllist);
|
| | | if(_oneKeySelllist.Count < 1)
|
| | | {
|
| | | OnClickCloseBtn();
|
| | |
| | |
|
| | | if(obj.Result == 1)
|
| | | {
|
| | | ItemLogicUtility.Instance.SendPackResetQuest(PackType.Item);
|
| | | ItemLogicUtility.Instance.ResetPack(PackType.Item);
|
| | | }
|
| | |
|
| | | OnClickCloseBtn();
|
| | |
| | |
|
| | | void OnClickSortBtn()
|
| | | {
|
| | | ItemLogicUtility.Instance.SendPackResetQuest(PackType.Item);
|
| | | ItemLogicUtility.Instance.ResetPack(PackType.Item);
|
| | | sortableTime = Time.time + 5f;
|
| | |
|
| | | if (sortableLogicUpdate != null)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | int job = PlayerDatas.Instance.baseData.Job;
|
| | | foreach (var key in BackpackDic.Keys)
|
| | | {
|
| | | ItemModel ItemM = BackpackDic[key];
|
| | | if (ItemM.config.Type == 111 && ItemM.config.ExpireTime == 0 && ItemM.config.JobLimit / 100 == job)
|
| | | var item = BackpackDic[key];
|
| | | if (item.config.Type == 111 && item.config.ExpireTime == 0 |
| | | && ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId))
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.KnapSackFunc1Type2);//跳到背包
|
| | | return;
|
| | |
| | | if (taskmodel.FairyAuDic.ContainsKey(_taskID))
|
| | | {
|
| | | int FairyNumber = TaskAllocation.Instance.FairyAuNumber();
|
| | | if (FairyNumber == 10 && !WindowCenter.Instance.IsOpen<FairyWearWin>())
|
| | | if (FairyNumber == 10 )
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<FairyAuTaskWin>();
|
| | |
| | | PlayerDatas.Instance.OnSwitchAttackMode += OnSwitchAttackMode;
|
| | | vipModel.OnVipTimeEvent += OnVipTimeEven;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshInfoEvent;
|
| | | PlayerDatas.Instance.OnRoleAttrRefresh += WorldLVBuff;
|
| | | PlayerDatas.Instance.worldLevelUpdateEvent += WorldLVBuff;
|
| | | OperationTimeHepler.Instance.operationStartEvent += operationStartEvent;
|
| | | OperationTimeHepler.Instance.operationEndEvent += operationEndEvent;
|
| | | OperationTimeHepler.Instance.operationTimeUpdateEvent += operationTimeUpdateEvent;
|
| | |
| | | PlayerDatas.Instance.OnSwitchAttackMode -= OnSwitchAttackMode;
|
| | | vipModel.OnVipTimeEvent -= OnVipTimeEven;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshInfoEvent;
|
| | | PlayerDatas.Instance.OnRoleAttrRefresh -= WorldLVBuff;
|
| | | PlayerDatas.Instance.worldLevelUpdateEvent -= WorldLVBuff;
|
| | | OperationTimeHepler.Instance.operationStartEvent -= operationStartEvent;
|
| | | OperationTimeHepler.Instance.operationEndEvent -= operationEndEvent;
|
| | | OperationTimeHepler.Instance.operationTimeUpdateEvent -= operationTimeUpdateEvent;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | 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)
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | PlayerDatas.Instance.InitPlayerInfoEvent += OnUpdateLvExp;
|
| | | PlayerDatas.Instance.playerDataUpdateEvent += OnUpdateLvExp;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += OnRefreshPlayerInfo;
|
| | | titleModel.OnRefreshGainTitle += OnRefreshTitle;
|
| | | PlayerDatas.Instance.OnRoleAttrRefresh += OnRefreshWorldLv;
|
| | | PlayerDatas.Instance.RefreshPlayerInfoEvent += RefreshPlayerInfoEvent;
|
| | | PlayerDatas.Instance.worldLevelUpdateEvent += OnRefreshWorldLv;
|
| | | PlayerDatas.Instance.playerDataUpdateEvent += RefreshPlayerInfoEvent;
|
| | | packModel.refreshItemCountEvent += RefreshItemCountAct;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | PlayerDatas.Instance.InitPlayerInfoEvent -= OnUpdateLvExp;
|
| | | PlayerDatas.Instance.playerDataUpdateEvent -= OnUpdateLvExp;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= OnRefreshPlayerInfo;
|
| | | titleModel.OnRefreshGainTitle -= OnRefreshTitle;
|
| | | PlayerDatas.Instance.OnRoleAttrRefresh -= OnRefreshWorldLv;
|
| | | PlayerDatas.Instance.worldLevelUpdateEvent -= OnRefreshWorldLv;
|
| | | packModel.refreshItemCountEvent -= RefreshItemCountAct;
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | PlayerDatas.Instance.RefreshPlayerInfoEvent -= RefreshPlayerInfoEvent;
|
| | | PlayerDatas.Instance.playerDataUpdateEvent -= RefreshPlayerInfoEvent;
|
| | | CloseChild();
|
| | | }
|
| | |
|
| | |
| | |
|
| | | 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>(); } }
|
| | |
| | | InitModel();
|
| | | OnFrenshMoneyInfo();
|
| | | m_storeModel.RefreshBuyShopLimitEvent += InitModel;
|
| | | PlayerDatas.Instance.RefreshPlayerInfoEvent += OnFrenshMoneyInfo;
|
| | | PlayerDatas.Instance.playerDataUpdateEvent += OnFrenshMoneyInfo;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | PlayerDatas.Instance.RefreshPlayerInfoEvent -= OnFrenshMoneyInfo;
|
| | | PlayerDatas.Instance.playerDataUpdateEvent -= OnFrenshMoneyInfo;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | 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;
|
| | | }
|
| | |
| | | public void SetDisplayModel(WashProCount washPro, int repointId, int index, int selectIndex)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, washPro.EquipPlace);
|
| | | var washModel = EquipWashConfig.GetEquipWashData(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
|
| | | var washModel = EquipWashConfig.Get(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
|
| | | washRedpoint.redpointId = repointId;
|
| | | if (itemModel != null && washModel != null)
|
| | | {
|
| | |
| | | nameText.text = UIHelper.AppendStringColor(itemModel.config.ItemColor, itemModel.config.ItemName, true);
|
| | | //pdr ToDo
|
| | | itemCell.Init(itemModel);
|
| | | washLevelText.text = equipWashModel.GetCurWashLvStr(washPro, washModel.washConfig);
|
| | | washLevelText.text = equipWashModel.GetCurWashLvStr(washPro, washModel.config);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public List<WashProCount> washGroup1 = null;
|
| | | public List<WashProCount> washGroup2 = null;
|
| | | public List<WashProCount> washGroup3 = null;
|
| | |
| | | for (i = 0; i < orderWashProlist.Count; i++)
|
| | | {
|
| | | ItemModel model = playerPack.GetItemByIndex(PackType.Equip, orderWashProlist[i].EquipPlace);
|
| | | var washModel = EquipWashConfig.GetEquipWashData(OnGetWashType(orderWashProlist[i].EquipPlace), orderWashProlist[i].XLAttrLV);
|
| | | var washModel = EquipWashConfig.Get(OnGetWashType(orderWashProlist[i].EquipPlace), orderWashProlist[i].XLAttrLV);
|
| | | if (model != null && washModel != null)
|
| | | {
|
| | | if (IsCanWash(model)
|
| | | && IsEnoughMat(washModel.washConfig) |
| | | && !IsWashFull(model, orderWashProlist[i], washModel.washConfig)
|
| | | && IsEnoughMat(washModel.config) |
| | | && !IsWashFull(model, orderWashProlist[i], washModel.config)
|
| | | && FuncOpen.Instance.IsFuncOpen(91))
|
| | | {
|
| | | RedpointWashDict.Add(i, orderWashProlist[i]);
|
| | |
| | |
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class WashProModel : Model
|
| | | public class WashProModel : Model
|
| | | {
|
| | | EquipWashModel _equipWashModel;
|
| | | public EquipWashModel equipWashModel
|
| | | {
|
| | | get
|
| | | {
|
| | | public EquipWashModel equipWashModel {
|
| | | get {
|
| | | return _equipWashModel ?? (_equipWashModel = ModelCenter.Instance.GetModel<EquipWashModel>());
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public override void Init()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | public void SetUIModel(EquipWashConfig washModel, WashProCount washPro,WashAttrType type)
|
| | | public void SetUIModel(EquipWashConfig washModel, WashProCount washPro, WashAttrType type)
|
| | | {
|
| | | SingleWashAttrModel washAttrModel = new SingleWashAttrModel();
|
| | | washAttrModel.SetModel(washModel, washPro, type);
|
| | | if (!washAttrModelDict.ContainsKey(type))
|
| | | {
|
| | | |
| | | washAttrModelDict.Add(type,washAttrModel);
|
| | |
|
| | | washAttrModelDict.Add(type, washAttrModel);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public SingleWashAttrModel GetSingleWashAttrModel(WashAttrType type)
|
| | | {
|
| | | SingleWashAttrModel washAttrModel = null;
|
| | | washAttrModelDict.TryGetValue(type,out washAttrModel);
|
| | | washAttrModelDict.TryGetValue(type, out washAttrModel);
|
| | | return washAttrModel;
|
| | | }
|
| | | }
|
| | |
|
| | | public class SingleWashAttrModel
|
| | | {
|
| | | public WashAttrType attrType { get; private set;}
|
| | | public WashAttrType attrType { get; private set; }
|
| | | public EquipWashConfig tagWashModel { get; private set; }
|
| | | public WashProCount washPro { get; private set; }
|
| | | public bool isPerfect { get; private set; }
|
| | | public PlayerPropertyConfig playerProModel { get; private set; }
|
| | | private float _minValue = 0;
|
| | | public float minValue { get; private set;}
|
| | | public float minValue { get; private set; }
|
| | | public float maxValue { get; private set; }
|
| | | public float XLAttrValue { get; private set; }
|
| | | public float XLAttrChange { get; private set; }
|
| | |
| | | private EquipWashConfig _preTagWashModel;
|
| | | public int preWashAttrMax { get; private set; }
|
| | |
|
| | | public void SetModel(EquipWashConfig washModel, WashProCount washPro,WashAttrType attrType)
|
| | | public void SetModel(EquipWashConfig washModel, WashProCount washPro, WashAttrType attrType)
|
| | | {
|
| | | this.attrType = attrType;
|
| | | this.tagWashModel = washModel;
|
| | | this.washPro = washPro;
|
| | | this.isPerfect = false;
|
| | | this.preViewStr = "";
|
| | | var equipWashData = EquipWashConfig.GetEquipWashData(washModel.type, washPro.XLAttrLV - 1);
|
| | | this._preTagWashModel = equipWashData == null ? null : equipWashData.washConfig;
|
| | | var equipWashData = EquipWashConfig.Get(washModel.type, washPro.XLAttrLV - 1);
|
| | | this._preTagWashModel = equipWashData == null ? null : equipWashData.config;
|
| | | switch (attrType)
|
| | | {
|
| | | case WashAttrType.attack:
|
| | |
| | | this.attrName = GetAttrNameStr();
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | private string GetAddProRange(int minValue, int maxValue)
|
| | | {
|
| | | string strRange = "";
|
| | | if(maxValue != minValue)
|
| | | if (maxValue != minValue)
|
| | | {
|
| | | strRange = StringUtility.Contact("+", GetProValueTypeStr(minValue), "~", GetProValueTypeStr(maxValue));
|
| | | }
|
| | |
| | | {
|
| | | strRange = StringUtility.Contact("+", GetProValueTypeStr(minValue));
|
| | | }
|
| | | |
| | |
|
| | | return strRange;
|
| | | }
|
| | |
|
| | |
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, washPro.EquipPlace);
|
| | | if (itemModel != null)
|
| | | {
|
| | | var washModel = EquipWashConfig.GetEquipWashData(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
|
| | | var washModel = EquipWashConfig.Get(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
|
| | | if (washModel != null
|
| | | && equipWashModel.IsEnoughMat(washModel.washConfig)
|
| | | && equipWashModel.IsEnoughMat(washModel.config)
|
| | | && equipWashModel.IsCanWash(itemModel))
|
| | | {
|
| | | jumpToWashId = washPro.EquipPlace;
|
| | |
| | | }
|
| | | }
|
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, washPro.EquipPlace);
|
| | | var washModel = EquipWashConfig.GetEquipWashData(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
|
| | | var washModel = EquipWashConfig.Get(equipWashModel.OnGetWashType(washPro.EquipPlace), washPro.XLAttrLV);
|
| | | _washProModel = washPro;
|
| | | _tagWashModel = washModel;
|
| | | _costMoneylist = _tagWashModel.mustCosts;
|
| | | washAttrModel.SetUIModel(washModel.washConfig, washPro, WashAttrType.attack);
|
| | | washAttrModel.SetUIModel(washModel.washConfig, washPro, WashAttrType.life);
|
| | | washAttrModel.SetUIModel(washModel.washConfig, washPro, WashAttrType.ignoredefence);
|
| | | washAttrModel.SetUIModel(washModel.config, washPro, WashAttrType.attack);
|
| | | washAttrModel.SetUIModel(washModel.config, washPro, WashAttrType.life);
|
| | | washAttrModel.SetUIModel(washModel.config, washPro, WashAttrType.ignoredefence);
|
| | | _attackWashPro.RefreshUI(WashAttrType.attack);
|
| | | _lifeWashPro.RefreshUI(WashAttrType.life);
|
| | | _ignoreDefenceWashPro.RefreshUI(WashAttrType.ignoredefence);
|
| | |
| | | contain_Default.SetActive(!isMustAdd);
|
| | | if (!isMustAdd)
|
| | | {
|
| | | UpdateItemCell(_tagWashModel.washConfig.costItem,_costMatCell,_tagWashModel.washConfig.costCount);
|
| | | UpdateItemCell(_tagWashModel.config.costItem,_costMatCell,_tagWashModel.config.costCount);
|
| | | }
|
| | | else
|
| | | {
|
| | | UpdateItemCell(_tagWashModel.washConfig.costItem, contain_Cost_NormalItem, _tagWashModel.washConfig.costCount);
|
| | | UpdateItemCell(_tagWashModel.config.costItem, contain_Cost_NormalItem, _tagWashModel.config.costCount);
|
| | | UpdateItemCell(equipWashModel.mustWashMatId, contain_Cost_MustAddItem, GetMustAddCost());
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (equipWashModel.IsSaveWashValue(_washProModel))
|
| | | {
|
| | | if (equipWashModel.IsWashFull(_itemModel, _washProModel, _tagWashModel.washConfig))
|
| | | if (equipWashModel.IsWashFull(_itemModel, _washProModel, _tagWashModel.config))
|
| | | {
|
| | | if(_washProModel.XLAttrLV >= equipWashModel.GetMaxWashLv(_itemModel.config.EquipPlace)
|
| | | && _washProModel.XLAttrLV <= equipWashModel.GetWashFullLv(_itemModel.config.EquipPlace, _itemModel.config.LV))
|
| | |
| | | int costMoney = GetCostMoney();
|
| | | int goldCount = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | int mustAddNum = GetMustAddNum();
|
| | | if (equipWashModel.IsEnoughMat(_tagWashModel.washConfig))
|
| | | if (equipWashModel.IsEnoughMat(_tagWashModel.config))
|
| | | {
|
| | | if (costMoney > 0)
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | itemPathModel.SetChinItemModel(_tagWashModel.washConfig.costItem);
|
| | | itemPathModel.SetChinItemModel(_tagWashModel.config.costItem);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | |
|
| | | private void OnClickSaveBtn(bool needSave = true)
|
| | | {
|
| | |
|
| | | CA326_tagCMEquipXLAttrChangeOK result = new CA326_tagCMEquipXLAttrChangeOK();
|
| | | result.EquipPlace = (byte)_washProModel.EquipPlace;
|
| | | result.IsSave = 1;
|
| | |
| | | foreach (int index in backpack_dic.Keys)
|
| | | {
|
| | | int itemId = (int)backpack_dic[index].itemId;
|
| | | if ( !WingRefineExpConfig.Has(itemId)|| !ItemConfig.IsWing(itemId))
|
| | | if (!WingRefineExpConfig.Has(itemId) || !ItemConfig.IsWing(itemId))
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | var wingConfig = ItemConfig.Get(itemId);
|
| | | if (wingConfig.Type == 111 && (wingConfig.JobLimit / 100) == _Job)
|
| | | if (wingConfig.Type == 111 && ItemLogicUtility.Instance.IsJobCompatibleItem(itemId))
|
| | | {
|
| | | WingDic.Add(index, backpack_dic[index]);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | var wingConfig = ItemConfig.Get(_id);
|
| | | if (wingConfig.Type == 111 && (wingConfig.JobLimit / 100) == PlayerDatas.Instance.baseData.Job)
|
| | | if (wingConfig.Type == 111 && ItemLogicUtility.Instance.IsJobCompatibleItem(_id))
|
| | | {
|
| | | markingbbol = true;
|
| | | }
|
| | |
| | | && !isStartOneKeySell
|
| | | && ItemLogicUtility.Instance.GetSellItemList().Count > 0)
|
| | | {
|
| | | ItemLogicUtility.Instance.SendOneKeySellQuest(ItemLogicUtility.Instance.GetSellItemList());
|
| | | ItemLogicUtility.Instance.OneKeySell(ItemLogicUtility.Instance.GetSellItemList());
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | [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:
|
| | |
| | | public int itemId {
|
| | | get; private set;
|
| | | }
|
| | |
|
| | | public int itemCount {
|
| | | get; private set;
|
| | | }
|
| | |
| | | {
|
| | | if (m_ViewDetails != null)
|
| | | {
|
| | | m_ViewDetails.AddListener(ViewDetails);
|
| | | m_ViewDetails.SetListener(ViewDetails);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | switch (m_ItemType)
|
| | | {
|
| | | case ItemType.Rewards:
|
| | | ItemAttrData attrData = new ItemAttrData(itemId, true, (ulong)itemCount);
|
| | | var attrData = new ItemAttrData(itemId, true, (ulong)itemCount);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | break;
|
| | | case ItemType.Use:
|
| | |
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | public enum ItemType
|
| | | {
|
| | |
| | | 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;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | PeerlessWeapon2 = 17,//绝世副手
|
| | |
|
| | | Mount = 19, //当前的坐骑
|
| | |
|
| | | FashionWeapon = 20,//时装武器
|
| | | FashionClothes = 21, //时装衣服
|
| | | FashionWeapon2 = 22,//时装副手
|
| | |
|
| | | JadeDynasty_Cloak = 121, //诛仙披风
|
| | | JadeDynasty_FaceMask = 122, //诛仙面罩
|
| | | JadeDynasty_Glove1 = 123, //诛仙手套
|
| | | JadeDynasty_Glove2 = 124, //诛仙手套
|
| | | JadeDynasty_Ruyi = 125, //诛仙如意
|
| | | JadeDynasty_Pendant = 126, //诛仙吊坠
|
| | | JadeDynasty_Ring1 = 127, //诛仙戒指
|
| | | JadeDynasty_Ring2 = 128, //诛仙戒指
|
| | | JadeDynasty_Sword1 = 129, //诛仙剑
|
| | | JadeDynasty_Sword2 = 130, //戮仙剑
|
| | | JadeDynasty_Sword3 = 131, //陷仙剑
|
| | | JadeDynasty_Sword4 = 132, //绝仙剑
|
| | | retMax,
|
| | | };
|
| | |
|