| | |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | |
|
| | | using System;
|
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Text;
|
| | | using System.Linq;
|
| | |
|
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class RuneModel : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
|
| | | [XLua.Hotfix]
|
| | | public class RuneModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | RuneComposeModel m_RuneComposeModel;
|
| | | RuneComposeModel runeComposeModel {
|
| | | get {
|
| | | return m_RuneComposeModel ?? (m_RuneComposeModel = ModelCenter.Instance.GetModel<RuneComposeModel>());
|
| | | }
|
| | | }
|
| | | Dictionary<int, RuneItem> m_RuneHoleItems = new Dictionary<int, RuneItem>();
|
| | | Dictionary<int, PropertyCompute> m_PropertyComputeDict = new Dictionary<int, PropertyCompute>();
|
| | | Dictionary<int, RuneHoleCondition> m_RuneHoleConditions = new Dictionary<int, RuneHoleCondition>();
|
| | | Dictionary<int, RuneHoleRedpoint> m_RuneHoleRedpoints = new Dictionary<int, RuneHoleRedpoint>();
|
| | | Dictionary<int, List<int>> m_RunePropertys = new Dictionary<int, List<int>>();
|
| | | Dictionary<int, float> levelUpFormulaCostDict = new Dictionary<int, float>();
|
| | | Dictionary<int, float> levelUpQualityCostModulus;
|
| | | Dictionary<int, int> m_QualityMaxLevels;
|
| | | Dictionary<int, int> m_MultiPropertyRuneInlayDict;
|
| | | List<int> m_MultiPropertyRunes = new List<int>();
|
| | |
|
| | | bool playerLevelRefresh = false;
|
| | | int[] specialHoleRemindLevels = null;
|
| | |
|
| | | public override void Init()
|
| | | string levelUpCostFormula = string.Empty;
|
| | | float levelUpMultiPropertyModulus = 1f;
|
| | |
|
| | |
|
| | | public uint holeState { get; private set; }
|
| | | public bool serverInited { get; private set; }
|
| | | public int specialHole { get; private set; }
|
| | | public int passRuneTowerFloor { get; private set; }
|
| | |
|
| | | public bool unlockingSpecialHole { get; set; }
|
| | |
|
| | | public readonly Redpoint baseRedpoint = new Redpoint(1, 108);
|
| | | public readonly Redpoint redpoint = new Redpoint(108, RUNE_REDPOINT_BASE);
|
| | | public readonly Redpoint specialHoleRedpoint = new Redpoint(RUNE_REDPOINT_BASE, redpointIndex++);
|
| | |
|
| | | int m_SelectHole = 0;
|
| | | public int selectHole
|
| | | {
|
| | | ParseConfig();
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | get { return m_SelectHole; }
|
| | | set
|
| | | {
|
| | | Redpoint redpoint = new Redpoint(10801, 1080101 + i);
|
| | | runeHoleRedpoints.Add(redpoint);
|
| | | redpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshInfoEvent;
|
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | GlobalTimeEvent.Instance.secondEvent += PerSecond;
|
| | | }
|
| | |
|
| | | private void PerSecond()
|
| | | {
|
| | | if (serverInited)
|
| | | {
|
| | | if (playerLevelRefresh)
|
| | | if (m_SelectHole != value)
|
| | | {
|
| | | UpdateSpecialHoleRedpoint();
|
| | | playerLevelRefresh = false;
|
| | | m_SelectHole = value;
|
| | | if (onSelectHoleRefresh != null)
|
| | | {
|
| | | onSelectHoleRefresh();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int func)
|
| | | {
|
| | | if (func == (int)FuncOpenEnum.Rune)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | UpdateBreakRedpoint();
|
| | | }
|
| | | }
|
| | | public const int RUNE_TYPE = 30;
|
| | | public const int RUNE_CREAMTYPE = 31;
|
| | | public const int RUNE_HOLE_COUNT = 9;
|
| | | public const int RUNE_REDPOINT_BASE = 10801;
|
| | |
|
| | | public override void UnInit()
|
| | | public static int redpointIndex = 1080100;
|
| | |
|
| | | public event Action onRuneHoleRefresh;
|
| | | public event Action<int> onOpenNewHole;
|
| | | public event Action onSelectHoleRefresh;
|
| | | public event Action onRuneTowerRefresh;
|
| | | public event Action onJumpToCompose;
|
| | |
|
| | | static StringBuilder sb = new StringBuilder();
|
| | |
|
| | | VirtualPackModel virtualPackModel { get { return ModelCenter.Instance.GetModel<VirtualPackModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | | virtualPackModel.virtualPackRefresh += VirtualPackRefresh;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | ClearRuneData();
|
| | | m_RuneHoleItems.Clear();
|
| | | serverInited = false;
|
| | | playerLevelRefresh = false;
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageLoad.Instance.currentStage is DungeonStage))
|
| | | {
|
| | | specialItemColorMark = false;
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | serverInited = true;
|
| | | UpdateSpecialHoleRedpoint();
|
| | | RefreshRedpoint();
|
| | | RefreshSpecialHoleRedpoint();
|
| | | }
|
| | |
|
| | | #region 配置
|
| | | public const int RUNE_TYPE = 30;
|
| | | public const int RUNE_CREAMTYPE = 31;
|
| | | public const int RUNE_HOLE_COUNT = 9;
|
| | | public Dictionary<int, Dictionary<int, int>> runeBasePropretyDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | public Dictionary<int, Dictionary<int, float>> runeAttrDic = new Dictionary<int, Dictionary<int, float>>();
|
| | | public Dictionary<int, float> runeAttrAdditionDic = new Dictionary<int, float>();
|
| | | public Dictionary<int, float> runeExpDic = new Dictionary<int, float>();
|
| | | public Dictionary<int, float> runeEliteAdditonDic = new Dictionary<int, float>();
|
| | | Dictionary<int, int> runeQualityMaxLevel;
|
| | | public int[] runeUnlockArray { get; private set; }
|
| | | public float runeExpAddition { get; private set; }
|
| | | public string runeExpFormula { get; private set; }
|
| | | public int runePackMaxNum { get; private set; }
|
| | | public Dictionary<int, int> doublePropRuneInlayDict { get; private set; }
|
| | | public Dictionary<int,SpecialRuneHoleCondition> specialHoles = new Dictionary<int, SpecialRuneHoleCondition>();
|
| | | int[] specialRedLevels = null;
|
| | | private void ParseConfig()
|
| | | public override void UnInit()
|
| | | {
|
| | | virtualPackModel.virtualPackRefresh -= VirtualPackRefresh;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | }
|
| | |
|
| | | System.Threading.ThreadPool.QueueUserWorkItem(
|
| | | (object aaa) =>
|
| | | void ParseConfig()
|
| | | {
|
| | | List<int> runeTypes = new List<int>();
|
| | | var configs = RuneConfig.GetValues();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | for (int i = 0; i < config.AttrType.Length; i++)
|
| | | {
|
| | | foreach (var key in FuncConfigConfig.m_RuneAttrCfgs.Keys)
|
| | | if (!runeTypes.Contains(config.AttrType[i]))
|
| | | {
|
| | | runeAttrDic.Add(key, ConfigParse.GetDic<int, float>(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical2));
|
| | | runeAttrAdditionDic.Add(key, float.Parse(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical3));
|
| | | runeBasePropretyDict.Add(key, ConfigParse.GetDic<int, int>(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical4));
|
| | | runeTypes.Add(config.AttrType[i]);
|
| | | }
|
| | | runeExpDic = ConfigParse.GetDic<int, float>(FuncConfigConfig.GetRuneNeedExpFormula().Numerical2);
|
| | | runeExpAddition = float.Parse(FuncConfigConfig.GetRuneNeedExpFormula().Numerical3);
|
| | | runeEliteAdditonDic = ConfigParse.GetDic<int, float>(FuncConfigConfig.GetRuneNeedExpFormula().Numerical4);
|
| | | runeExpFormula = FuncConfigConfig.GetRuneNeedExpFormula().Numerical1;
|
| | | FuncConfigConfig config = FuncConfigConfig.Get("RuneUnlock");
|
| | | if (config != null)
|
| | | {
|
| | | runeUnlockArray = ConfigParse.GetMultipleStr<int>(config.Numerical1);
|
| | | var costDict = ConfigParse.GetDic<int, int>(config.Numerical2);
|
| | | var levelDict = ConfigParse.GetDic<int, int>(config.Numerical3);
|
| | | foreach (var _hole in costDict.Keys)
|
| | | {
|
| | | specialHoles.Add(_hole, new SpecialRuneHoleCondition()
|
| | | {
|
| | | cost = costDict[_hole],
|
| | | level = levelDict.ContainsKey(_hole) ? levelDict[_hole] : 0,
|
| | | });
|
| | | }
|
| | | }
|
| | | config = FuncConfigConfig.Get("RunePackageNum");
|
| | | runePackMaxNum = int.Parse(config.Numerical1);
|
| | |
|
| | | config = FuncConfigConfig.Get("RuneMaxLV");
|
| | | runeQualityMaxLevel = ConfigParse.GetDic<int, int>(config.Numerical1);
|
| | |
|
| | | var maxlevel = runeQualityMaxLevel != null ? runeQualityMaxLevel.Values.Last() : 0;
|
| | |
|
| | | for (int i = 1; i < maxlevel; i++)
|
| | | {
|
| | | Equation.Instance.Clear();
|
| | | Equation.Instance.AddKeyValue(replaceValStr, i + 1);
|
| | | var _result = Equation.Instance.Eval<float>(runeExpFormula);
|
| | | runeExpResultDict.Add(i + 1, _result);
|
| | | }
|
| | |
|
| | | config = FuncConfigConfig.Get("RuneDoubleInlayCnt");
|
| | | doublePropRuneInlayDict = ConfigParse.GetDic<int, int>(config.Numerical1);
|
| | |
|
| | | config = FuncConfigConfig.Get("RuneSpecialRedLevel");
|
| | | specialRedLevels = ConfigParse.GetMultipleStr<int>(config.Numerical1);
|
| | | }
|
| | | );
|
| | | if (config.AttrType.Length > 1)
|
| | | {
|
| | | m_MultiPropertyRunes.Add(config.ID);
|
| | | }
|
| | | m_RunePropertys.Add(config.ID, new List<int>(config.AttrType));
|
| | | }
|
| | | foreach (var propertyType in runeTypes)
|
| | | {
|
| | | var key = StringUtility.Contact("RuneAttr", propertyType);
|
| | | if (FuncConfigConfig.Has(key))
|
| | | {
|
| | | m_PropertyComputeDict.Add(propertyType, new PropertyCompute(FuncConfigConfig.Get(key)));
|
| | | }
|
| | | }
|
| | |
|
| | | var maxLevelConfig = FuncConfigConfig.Get("RuneMaxLV");
|
| | | m_QualityMaxLevels = ConfigParse.GetDic<int, int>(maxLevelConfig.Numerical1);
|
| | |
|
| | | var maxLevel = 0;
|
| | | foreach (var level in m_QualityMaxLevels.Values)
|
| | | {
|
| | | if (level > maxLevel)
|
| | | {
|
| | | maxLevel = level;
|
| | | }
|
| | | }
|
| | |
|
| | | var levelUpConfig = FuncConfigConfig.Get("RuneExp");
|
| | | levelUpCostFormula = levelUpConfig.Numerical1;
|
| | | levelUpQualityCostModulus = ConfigParse.GetDic<int, float>(levelUpConfig.Numerical2);
|
| | | levelUpMultiPropertyModulus = float.Parse(levelUpConfig.Numerical3);
|
| | |
|
| | | {
|
| | | var funcConfig = FuncConfigConfig.Get("RuneDoubleInlayCnt");
|
| | | m_MultiPropertyRuneInlayDict = ConfigParse.GetDic<int, int>(funcConfig.Numerical1);
|
| | |
|
| | | funcConfig = FuncConfigConfig.Get("RuneSpecialRedLevel");
|
| | | specialHoleRemindLevels = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1);
|
| | | }
|
| | |
|
| | |
|
| | | System.Threading.ThreadPool.QueueUserWorkItem((object _object) =>
|
| | | {
|
| | | foreach (var propertyCompute in m_PropertyComputeDict.Values)
|
| | | {
|
| | | propertyCompute.CacheFormulaResult(maxLevel);
|
| | | }
|
| | | });
|
| | |
|
| | | {
|
| | | var funcConfig = FuncConfigConfig.Get("RuneUnlock");
|
| | | var towerArray = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1);
|
| | | var diamondDict = ConfigParse.GetDic<int, int>(funcConfig.Numerical2);
|
| | | var playerLevelDict = ConfigParse.GetDic<int, int>(funcConfig.Numerical3);
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | m_RuneHoleConditions.Add(i, new RuneHoleCondition()
|
| | | {
|
| | | runeTowerFloor = i < towerArray.Length ? towerArray[i] : 0,
|
| | | diamond = diamondDict.ContainsKey(i) ? diamondDict[i] : 0,
|
| | | playerLevel = playerLevelDict.ContainsKey(i) ? playerLevelDict[i] : 0,
|
| | | });
|
| | | }
|
| | | specialHole = 8;
|
| | | }
|
| | |
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | m_RuneHoleRedpoints.Add(i, new RuneHoleRedpoint(RUNE_REDPOINT_BASE));
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private static StringBuilder _textBuilder = new StringBuilder();
|
| | | static readonly string replaceValStr = "level";
|
| | |
|
| | | bool serverInited = false;
|
| | |
|
| | | private void PlayerDataRefreshInfoEvent(PlayerDataType refreshType)
|
| | | public bool TryGetRuneHoleItem(int hole, out RuneItem runeItem)
|
| | | {
|
| | | if (refreshType == PlayerDataType.LV)
|
| | | {
|
| | | playerLevelRefresh = true;
|
| | | }
|
| | | return m_RuneHoleItems.TryGetValue(hole, out runeItem);
|
| | | }
|
| | |
|
| | | public int GetRuneMaxLevel(int _itemColor)
|
| | | public bool TryGetRuneHoleCondition(int hole, out RuneHoleCondition condition)
|
| | | {
|
| | | if (runeQualityMaxLevel != null && runeQualityMaxLevel.ContainsKey(_itemColor))
|
| | | return m_RuneHoleConditions.TryGetValue(hole, out condition);
|
| | | }
|
| | |
|
| | | public bool TryGetRunePropertys(int id, out List<int> propertys)
|
| | | {
|
| | | return m_RunePropertys.TryGetValue(id, out propertys);
|
| | | }
|
| | |
|
| | | public int TryGetComposeRuneCount(int id, out RuneItem item)
|
| | | {
|
| | | var count = 0;
|
| | | item = null;
|
| | | List<int> items = null;
|
| | | if (virtualPackModel.TryGetItems(PackType.RunePack, out items))
|
| | | {
|
| | | return runeQualityMaxLevel[_itemColor];
|
| | | foreach (var packIndex in items)
|
| | | {
|
| | | RuneItem _item;
|
| | | if (virtualPackModel.TryGetItem(PackType.RunePack, packIndex, out _item)
|
| | | && _item.id == id)
|
| | | {
|
| | | if (item == null || _item.level >= item.level)
|
| | | {
|
| | | item = _item;
|
| | | }
|
| | | count++;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (runeQualityMaxLevel != null)
|
| | | foreach (var _item in m_RuneHoleItems.Values)
|
| | | {
|
| | | return runeQualityMaxLevel.Values.Last();
|
| | | if (_item.id == id)
|
| | | {
|
| | | if (item == null || _item.level >= item.level)
|
| | | {
|
| | | item = _item;
|
| | | }
|
| | | count++;
|
| | | break;
|
| | | }
|
| | | }
|
| | | return count;
|
| | | }
|
| | |
|
| | | public bool TryEquipRuneByColor(int itemColor, out int hole)
|
| | | {
|
| | | if (!ExistEmptyHole(out hole))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | virtualPackModel.GetItemIndexs(PackType.RunePack, ref cacheItemIndexs);
|
| | | foreach (var index in cacheItemIndexs)
|
| | | {
|
| | | RuneItem item;
|
| | | if (virtualPackModel.TryGetItem(PackType.RunePack, index, out item))
|
| | | {
|
| | | var config = ItemConfig.Get(item.id);
|
| | | if (config.ItemColor < itemColor)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (SatisfyInlayHole(item, hole))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetRedpoint(int hole, out RuneHoleRedpoint redpoint)
|
| | | {
|
| | | return m_RuneHoleRedpoints.TryGetValue(hole, out redpoint);
|
| | | }
|
| | |
|
| | | public int GetPropertyValue(int id, int level, int type)
|
| | | {
|
| | | if (m_PropertyComputeDict.ContainsKey(type))
|
| | | {
|
| | | return m_PropertyComputeDict[type].GetPropertyValue(id, level);
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetRuneMaxLevelByItem(int _itemId)
|
| | | public string GetRunePropertyDescription(int id, int level)
|
| | | {
|
| | | var config = ItemConfig.Get(_itemId);
|
| | | return config == null ? 0 : GetRuneMaxLevel(config.ItemColor);
|
| | | }
|
| | | private Dictionary<int, float> runeExpResultDict = new Dictionary<int, float>();
|
| | | public int GetRuneNeedExp(int id, int level)
|
| | | {
|
| | | float _levelUpExp = 0;
|
| | | ItemConfig _tagChinModel = ItemConfig.Get(id);
|
| | | if (level < GetRuneMaxLevel(_tagChinModel.ItemColor))
|
| | | sb.Length = 0;
|
| | | var config = RuneConfig.Get(id);
|
| | | for (int i = 0; i < config.AttrType.Length; i++)
|
| | | {
|
| | | float _result = 0;
|
| | | if (runeExpResultDict.ContainsKey(level + 1))
|
| | | var property = config.AttrType[i];
|
| | | var propertyConfig = PlayerPropertyConfig.Get(property);
|
| | | var propertyValue = GetPropertyValue(id, level, property);
|
| | | var decimalCount = UIHelper.GetPropertyDecimalCount(property);
|
| | | var label = StringUtility.Contact(propertyConfig.Name, "+",
|
| | | PlayerPropertyConfig.GetValueDescription(property, propertyValue, decimalCount, false));
|
| | | sb.Append(label);
|
| | | if (i < config.AttrType.Length - 1)
|
| | | {
|
| | | _result = runeExpResultDict[level + 1];
|
| | | sb.Append('\n');
|
| | | }
|
| | | }
|
| | | return sb.ToString();
|
| | | }
|
| | |
|
| | | public int GetLevelUpRequireRuneEssence(int id, int level)
|
| | | {
|
| | | float requireEssence = 0;
|
| | | var itemConfig = ItemConfig.Get(id);
|
| | | if (!IsRuneMaxLevel(id, level))
|
| | | {
|
| | | var _result = 0f;
|
| | | if (levelUpFormulaCostDict.ContainsKey(level + 1))
|
| | | {
|
| | | _result = levelUpFormulaCostDict[level + 1];
|
| | | }
|
| | | else
|
| | | {
|
| | | Equation.Instance.Clear();
|
| | | Equation.Instance.AddKeyValue(replaceValStr, level + 1);
|
| | | _result = Equation.Instance.Eval<float>(runeExpFormula);
|
| | | runeExpResultDict.Add(level + 1, _result);
|
| | | Equation.Instance.AddKeyValue("level", level + 1);
|
| | | _result = Equation.Instance.Eval<float>(levelUpCostFormula);
|
| | | levelUpFormulaCostDict.Add(level + 1, _result);
|
| | | }
|
| | | RuneConfig cfg = RuneConfig.Get(id);
|
| | | if (cfg.AttrType.Length > 1)
|
| | | if (IsMultiPropertyRune(id))
|
| | | {
|
| | | _levelUpExp = _result * runeExpDic[_tagChinModel.ItemColor] * runeExpAddition;
|
| | | requireEssence = _result * levelUpQualityCostModulus[itemConfig.ItemColor]
|
| | | * levelUpMultiPropertyModulus;
|
| | | }
|
| | | else
|
| | | {
|
| | | _levelUpExp = _result * runeExpDic[_tagChinModel.ItemColor];
|
| | | requireEssence = _result * levelUpQualityCostModulus[itemConfig.ItemColor];
|
| | | }
|
| | | }
|
| | | return Mathf.FloorToInt(_levelUpExp);
|
| | | return Mathf.FloorToInt(requireEssence);
|
| | | }
|
| | |
|
| | | #endregion
|
| | | public const int RUNE_REDPOINT_INTERVAL = 100;
|
| | | private Redpoint runeRedpoint = new Redpoint(1, 108);
|
| | | private Redpoint m_RuneMosaicRedpoint = new Redpoint(108, 10801);
|
| | | public Redpoint runeLevelUpRedpoint = new Redpoint(1080120);
|
| | | public Redpoint runeReplaceRedpoint = new Redpoint(1080130);
|
| | | private List<Redpoint> runeHoleRedpoints = new List<Redpoint>();
|
| | | public Redpoint runeMosaicRedpoint { get { return m_RuneMosaicRedpoint; } }
|
| | | public Redpoint specialRuneRemindRedpoint = new Redpoint(10801, 1080140);
|
| | | public Redpoint GetRedpoint(int _hole)
|
| | | public int GetMultiPropertyInlayCount(int tower = 0)
|
| | | {
|
| | | return runeHoleRedpoints[_hole];
|
| | | }
|
| | |
|
| | | void UpdateSpecialHoleRedpoint()
|
| | | {
|
| | | specialRuneRemindRedpoint.state = RedPointState.None;
|
| | | if (DayRemind.Instance.GetDayRemind(DayRemind.RUNE_SPECIAL_HOLE))
|
| | | if (tower != 0 && m_MultiPropertyRuneInlayDict.ContainsKey(tower))
|
| | | {
|
| | | return;
|
| | | return m_MultiPropertyRuneInlayDict[tower];
|
| | | }
|
| | | foreach (var hole in specialHoles.Keys)
|
| | | var count = 0;
|
| | | foreach (var _key in m_MultiPropertyRuneInlayDict.Keys)
|
| | | {
|
| | | if (IsRuneHoleOpen(hole))
|
| | | if (passRuneTowerFloor >= _key)
|
| | | {
|
| | | continue;
|
| | | count = m_MultiPropertyRuneInlayDict[_key];
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.LV >= specialHoles[hole].level
|
| | | && PlayerDatas.Instance.baseData.LV >= specialRedLevels[0]
|
| | | && PlayerDatas.Instance.baseData.LV < specialRedLevels[1])
|
| | | else
|
| | | {
|
| | | specialRuneRemindRedpoint.state = RedPointState.Simple;
|
| | | break;
|
| | | }
|
| | | }
|
| | | return count;
|
| | | }
|
| | |
|
| | | public void SetDayRemind()
|
| | | public int GetMultiPropertyHoleCount()
|
| | | {
|
| | | if (specialRuneRemindRedpoint.state == RedPointState.Simple)
|
| | | var count = 0;
|
| | | foreach (var item in m_RuneHoleItems.Values)
|
| | | {
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.RUNE_SPECIAL_HOLE, true);
|
| | | UpdateSpecialHoleRedpoint();
|
| | | if (IsMultiPropertyRune(item.id))
|
| | | {
|
| | | count ++;
|
| | | }
|
| | | }
|
| | | return count;
|
| | | }
|
| | |
|
| | | public int GetRuneLevelBySplinters(int id, float essence)
|
| | | {
|
| | | var totalEssence = 0f;
|
| | | var config = ItemConfig.Get(id);
|
| | | var maxlevel = 0;
|
| | | if (m_QualityMaxLevels.ContainsKey(config.ItemColor))
|
| | | {
|
| | | maxlevel = m_QualityMaxLevels[config.ItemColor];
|
| | | }
|
| | | for (int i = 1; i < maxlevel; i++)
|
| | | {
|
| | | totalEssence += GetLevelUpRequireRuneEssence(id, i);
|
| | | if (totalEssence > essence)
|
| | | {
|
| | | return i;
|
| | | }
|
| | | }
|
| | | return maxlevel;
|
| | | }
|
| | |
|
| | | public int GetRuneInlayCount()
|
| | | {
|
| | | return m_RuneHoleItems.Count;
|
| | | }
|
| | |
|
| | | public int GetRuneTotalCount(int itemType = 0)
|
| | | {
|
| | | var count = 0;
|
| | | virtualPackModel.GetItemIndexs(PackType.RunePack, ref cacheItemIndexs);
|
| | | foreach (var index in cacheItemIndexs)
|
| | | {
|
| | | RuneItem item;
|
| | | if (virtualPackModel.TryGetItem(PackType.RunePack, index, out item))
|
| | | {
|
| | | if (itemType == 0 || item.itemType == itemType)
|
| | | {
|
| | | count++;
|
| | | }
|
| | | }
|
| | | }
|
| | | return count;
|
| | | }
|
| | |
|
| | | public List<int> GetUnlockRunes()
|
| | | {
|
| | | List<int> ids = new List<int>();
|
| | | var configs = RuneConfig.GetValues();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | if (passRuneTowerFloor >= config.TowerID
|
| | | && config.AttrType.Length == 1
|
| | | && ids.Contains(config.ID))
|
| | | {
|
| | | ids.Add(config.ID);
|
| | | }
|
| | | }
|
| | | return ids;
|
| | | }
|
| | |
|
| | | public bool IsRuneHoleOpen(int hole, uint state)
|
| | | {
|
| | | return MathUtility.GetBitValue(state, (ushort)hole);
|
| | | }
|
| | |
|
| | | public bool IsMultiPropertyRune(int id)
|
| | | {
|
| | | return m_MultiPropertyRunes.Contains(id);
|
| | | }
|
| | |
|
| | | public bool IsRuneMaxLevel(int id, int level)
|
| | | {
|
| | | var config = ItemConfig.Get(id);
|
| | | if (config != null)
|
| | | {
|
| | | if (m_QualityMaxLevels.ContainsKey(config.ItemColor))
|
| | | {
|
| | | return level >= m_QualityMaxLevels[config.ItemColor];
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public bool IsUnlockAllMultiPropertyInlay(out int tower)
|
| | | {
|
| | | tower = 0;
|
| | | foreach (var _key in m_MultiPropertyRuneInlayDict.Keys)
|
| | | {
|
| | | if (passRuneTowerFloor < _key)
|
| | | {
|
| | | tower = _key;
|
| | | break;
|
| | | }
|
| | | }
|
| | | return tower == 0;
|
| | | }
|
| | |
|
| | | public bool IsSameWithOtherRuneHole(int id, int hole)
|
| | | {
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | if (i == hole)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (IsSameWithRuneHole(id, i))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsSameWithRuneHole(int id, int hole)
|
| | | {
|
| | | RuneItem item;
|
| | | if (TryGetRuneHoleItem(hole, out item))
|
| | | {
|
| | | return item.IsExistSameProperty(id);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsBetterRuneWithHole(int id, int hole)
|
| | | {
|
| | | var itemConfig = ItemConfig.Get(id);
|
| | | if (itemConfig == null || itemConfig.Type == RUNE_CREAMTYPE)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | RuneItem item = null;
|
| | | if (!TryGetRuneHoleItem(hole, out item))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (!item.IsExistSameProperty(id))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | var itemHoleConfig = ItemConfig.Get(item.id);
|
| | | return itemConfig.ItemColor > itemHoleConfig.ItemColor;
|
| | | }
|
| | |
|
| | | public bool SatisfyLevelUpHole(int hole)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | RuneItem item;
|
| | | if (TryGetRuneHoleItem(hole, out item))
|
| | | {
|
| | | var essence = PlayerDatas.Instance.extersion.runeEssence;
|
| | | if (!IsRuneMaxLevel(item.id, item.level)
|
| | | && essence >= GetLevelUpRequireRuneEssence(item.id, item.level))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool SatisfyInlayHole(int hole)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | if (!IsRuneHoleOpen(hole, holeState) || m_RuneHoleItems.ContainsKey(hole))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | virtualPackModel.GetItemIndexs(PackType.RunePack, ref cacheItemIndexs);
|
| | | foreach (var index in cacheItemIndexs)
|
| | | {
|
| | | RuneItem item;
|
| | | if (virtualPackModel.TryGetItem(PackType.RunePack, index, out item))
|
| | | {
|
| | | if (SatisfyInlayHole(item, hole))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool SatisfyInlayHole(RuneItem item, int hole)
|
| | | {
|
| | | if (item.itemType == RUNE_CREAMTYPE
|
| | | || IsSameWithOtherRuneHole(item.id, hole))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | if (IsMultiPropertyRune(item.id)
|
| | | && GetMultiPropertyInlayCount() <= GetMultiPropertyHoleCount())
|
| | | {
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public bool SatisfyInlayBetterHole(int hole)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | if (!IsRuneHoleOpen(hole, holeState) || !m_RuneHoleItems.ContainsKey(hole))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | var runeHoleItem = m_RuneHoleItems[hole];
|
| | | var isDoubleRuneHole = IsMultiPropertyRune(runeHoleItem.id);
|
| | |
|
| | | var multiPropertyHoleCount = GetMultiPropertyHoleCount();
|
| | | var multiPropertyLimitCount = GetMultiPropertyInlayCount();
|
| | |
|
| | | virtualPackModel.GetItemIndexs(PackType.RunePack, ref cacheItemIndexs);
|
| | | foreach (var index in cacheItemIndexs)
|
| | | {
|
| | | RuneItem item;
|
| | | if (virtualPackModel.TryGetItem(PackType.RunePack, index, out item))
|
| | | {
|
| | | if (!IsBetterRuneWithHole(item.id, hole))
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var isDoubleRune = IsMultiPropertyRune(item.id);
|
| | | if (!isDoubleRuneHole && isDoubleRune)
|
| | | {
|
| | | if (multiPropertyHoleCount >= multiPropertyLimitCount)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool ExistEmptyHole(out int hole)
|
| | | {
|
| | | hole = 0;
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | if (!m_RuneHoleItems.ContainsKey(i))
|
| | | {
|
| | | hole = i;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void SelectRunePackItem(RuneItem item, int hole)
|
| | | {
|
| | | RuneItem holeItem = null;
|
| | | TryGetRuneHoleItem(hole, out holeItem);
|
| | | bool switchOtherSameHole = false;
|
| | | List<int> sameHoles = new List<int>();
|
| | | if (holeItem == null || IsMultiPropertyRune(holeItem.id)
|
| | | || !IsMultiPropertyRune(item.id))
|
| | | {
|
| | | if (IsSameWithOtherRuneHole(item.id, hole))
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("L1078"));
|
| | | return;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | if (IsSameWithRuneHole(item.id, i))
|
| | | {
|
| | | sameHoles.Add(i);
|
| | | }
|
| | | }
|
| | | if (sameHoles.Count > 0 && !sameHoles.Contains(hole))
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("L1078"));
|
| | | return;
|
| | | }
|
| | | if (sameHoles.Count > 1)
|
| | | {
|
| | | switchOtherSameHole = true;
|
| | | }
|
| | | }
|
| | |
|
| | | var multiPropertyLimitCount = GetMultiPropertyInlayCount();
|
| | | if (IsMultiPropertyRune(item.id) && multiPropertyLimitCount <= GetMultiPropertyHoleCount()
|
| | | && (holeItem == null || !IsMultiPropertyRune(holeItem.id)))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("RuneGridUnEnough", multiPropertyLimitCount);
|
| | | return;
|
| | | }
|
| | |
|
| | | if (switchOtherSameHole)
|
| | | {
|
| | | var otherSameHole = sameHoles[0] == hole ? sameHoles[1] : sameHoles[0];
|
| | | RuneItem sameHoleItem = null;
|
| | | if (TryGetRuneHoleItem(otherSameHole, out sameHoleItem))
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("SwitchDoublePropertyRune"),(bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | SwitchRune((int)PackType.InterimPack, otherSameHole, (int)PackType.RunePack, 0);
|
| | | SwitchRune((int)PackType.RunePack, item.index, (int)PackType.InterimPack, hole);
|
| | | WindowCenter.Instance.Close<RunePackWin>();
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchRune((int)PackType.RunePack, item.index, (int)PackType.InterimPack, hole);
|
| | | WindowCenter.Instance.Close<RunePackWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | void SwitchRune(int srcpackType, int scrIndex, int destpackType, int destIndex)
|
| | | {
|
| | | C073D_tagCPackItemExchange pak = new C073D_tagCPackItemExchange();
|
| | | pak.SrcBackpack = (byte)srcpackType;
|
| | | pak.SrcIndex = (ushort)scrIndex;
|
| | | pak.DesBackPack = (byte)destpackType;
|
| | | pak.DestIndex = (ushort)destIndex;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA31F_tagMCRuneInfo package)
|
| | | {
|
| | | var preholeState = holeState;
|
| | | holeState = package.RuneHoleOpenState;
|
| | |
|
| | | for (int i = 0; i < package.Count; i++)
|
| | | {
|
| | | if (package.RuneDataList[i] != 0)
|
| | | {
|
| | | RuneItem runeItem = null;
|
| | | if (!m_RuneHoleItems.TryGetValue(i, out runeItem))
|
| | | {
|
| | | runeItem = new RuneItem();
|
| | | m_RuneHoleItems.Add(i, runeItem);
|
| | | }
|
| | | runeItem.ParseHoleItem(i, package.RuneDataList[i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (m_RuneHoleItems.ContainsKey(i))
|
| | | {
|
| | | m_RuneHoleItems[i] = null;
|
| | | m_RuneHoleItems.Remove(i);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | if (!serverInited)
|
| | | {
|
| | | break;
|
| | | }
|
| | | var preOpen = IsRuneHoleOpen(i, preholeState);
|
| | | var nowOpen = IsRuneHoleOpen(i, holeState);
|
| | | if (!preOpen && nowOpen)
|
| | | {
|
| | | if (onOpenNewHole != null)
|
| | | {
|
| | | onOpenNewHole(i);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (onRuneHoleRefresh != null)
|
| | | {
|
| | | onRuneHoleRefresh();
|
| | | }
|
| | |
|
| | | RefreshRedpoint();
|
| | | RefreshSpecialHoleRedpoint();
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA3BA_tagMCTrialTowerInfo package)
|
| | | {
|
| | | passRuneTowerFloor = (int)package.PassLV;
|
| | | if (onRuneTowerRefresh != null)
|
| | | {
|
| | | onRuneTowerRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | private void VirtualPackRefresh(PackType packType)
|
| | | {
|
| | | if (packType == PackType.RunePack)
|
| | | {
|
| | | RefreshRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshEvent(PlayerDataType dataType)
|
| | | {
|
| | | if (dataType == PlayerDataType.RuneSplinters)
|
| | | {
|
| | | RefreshRedpoint();
|
| | | }
|
| | | if (dataType == PlayerDataType.LV)
|
| | | {
|
| | | RefreshSpecialHoleRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int id)
|
| | | {
|
| | | if (id == (int)FuncOpenEnum.Rune)
|
| | | {
|
| | | RefreshRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 新版符印红点
|
| | | ///1.有可操作的时候仅按优先级显示1个红点
|
| | | ///2.优先级:可镶嵌>可替换>可升级
|
| | | ///3.同时有可镶嵌,可替换,可升级的符印孔时,默认只显示1个红点在镶嵌孔上
|
| | |
| | | ///7.右下角操作按钮:可镶嵌时镶嵌按钮红点显示;替换和升级同时满足时,仅替换按钮显示红点;无镶嵌和替换时,升级按钮红点显示
|
| | | ///8.选中有红点的符印孔时,符印孔上的红点隐藏不显示
|
| | | /// </summary>
|
| | | List<int> runelevelUpSorts = new List<int>();
|
| | | public void UpdateRedpoint()
|
| | | List<int> cacheItemIndexs = new List<int>();
|
| | | List<int> levelUpSorts = new List<int>();
|
| | | void RefreshRedpoint()
|
| | | {
|
| | | for (int i = 0; i < runeHoleRedpoints.Count; i++)
|
| | | var levelUpHole = 100;
|
| | | var replaceHole = 100;
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | runeHoleRedpoints[i].state = RedPointState.None;
|
| | | }
|
| | | runeLevelUpRedpoint.state = RedPointState.None;
|
| | | runeReplaceRedpoint.state = RedPointState.None;
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | return;
|
| | | }
|
| | | var _holeCount = runeHoleRedpoints.Count;
|
| | | for (int i = 0; i < _holeCount; i++)
|
| | | {
|
| | | var _data = GetHoleRune(i);
|
| | | if (_data == null && CanMosaicRune(i))
|
| | | replaceHole = ExistEmptyHoleSatisfyInlay();
|
| | | if (replaceHole != 100)
|
| | | {
|
| | | runeHoleRedpoints[i].state = RedPointState.Simple;
|
| | | if (sltRuneHole == i)
|
| | | {
|
| | | runeReplaceRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | RefreshRedpoint(replaceHole, levelUpHole);
|
| | | return;
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < _holeCount; i++)
|
| | | {
|
| | | var _data = GetHoleRune(i);
|
| | | if (_data != null && CanEquipBetterRune(i))
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | runeHoleRedpoints[i].state = RedPointState.Simple;
|
| | | if (sltRuneHole == i)
|
| | | if (SatisfyInlayBetterHole(i))
|
| | | {
|
| | | runeReplaceRedpoint.state = RedPointState.Simple;
|
| | | replaceHole = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (replaceHole != 100)
|
| | | {
|
| | | RefreshRedpoint(replaceHole, levelUpHole);
|
| | | return;
|
| | | }
|
| | | }
|
| | | runelevelUpSorts.Clear();
|
| | | for (int i = 0; i < _holeCount; i++)
|
| | | {
|
| | | var _data = GetHoleRune(i);
|
| | | if (_data != null && RuneSplinters >= GetRuneNeedExp(_data.id, _data.lv)
|
| | | && _data.lv < GetRuneMaxLevelByItem(_data.id))
|
| | |
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | runelevelUpSorts.Add(i);
|
| | | }
|
| | | }
|
| | | if (runelevelUpSorts.Count > 0)
|
| | | {
|
| | | runelevelUpSorts.Sort(CompareLevelUp);
|
| | | runeHoleRedpoints[runelevelUpSorts[0]].state = RedPointState.Simple;
|
| | | if (sltRuneHole == runelevelUpSorts[0])
|
| | | {
|
| | | runeLevelUpRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int CompareLevelUp(int x, int y)
|
| | | {
|
| | | var _data_x = GetHoleRune(x);
|
| | | var _data_y = GetHoleRune(y);
|
| | | if (_data_x.lv != _data_y.lv)
|
| | | {
|
| | | return _data_x.lv.CompareTo(_data_y.lv);
|
| | | }
|
| | | var _cost_x = GetRuneNeedExp(_data_x.id, _data_x.lv);
|
| | | var _cost_y = GetRuneNeedExp(_data_y.id, _data_y.lv);
|
| | | if (_cost_x != _cost_y)
|
| | | {
|
| | | return _cost_x.CompareTo(_cost_y);
|
| | | }
|
| | | return x.CompareTo(y);
|
| | | }
|
| | |
|
| | | private Redpoint m_ResolveRedpoint = new Redpoint(108, 10802);
|
| | | public void UpdateBreakRedpoint()
|
| | | {
|
| | | m_ResolveRedpoint.state = RedPointState.None;
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | m_ResolveRedpoint.state = runePackData.Count >= runePackMaxNum && !IsEmptyHole() ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | |
|
| | | public bool CanLevelUpRune(int _hole)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | RuneData runeData = GetHoleRune(_hole);
|
| | | if (runeData != null)
|
| | | {
|
| | | if (RuneSplinters > GetRuneNeedExp(runeData.id, runeData.lv)
|
| | | && runeData.lv < GetRuneMaxLevelByItem(runeData.id))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool CanMosaicRune(int _hole)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | RuneData runeData = GetHoleRune(_hole);
|
| | | if (runeData == null && IsRuneHoleOpen(_hole))
|
| | | {
|
| | | foreach (var rune in runePackData.Values)
|
| | | {
|
| | | ItemConfig _itemCfg = ItemConfig.Get(rune.id);
|
| | | if (_itemCfg.Type == RUNE_CREAMTYPE)
|
| | | if (SatisfyLevelUpHole(i))
|
| | | {
|
| | | continue;
|
| | | levelUpSorts.Add(i);
|
| | | }
|
| | | if (!IsSameInHoleRune(_itemCfg.ID, _hole))
|
| | | }
|
| | | if (levelUpSorts.Count > 0)
|
| | | {
|
| | | levelUpSorts.Sort(CompareLevelUp);
|
| | | levelUpHole = levelUpSorts[0];
|
| | | }
|
| | | }
|
| | | RefreshRedpoint(replaceHole, levelUpHole);
|
| | | }
|
| | |
|
| | | void RefreshRedpoint(int replaceHole, int levelUpHole)
|
| | | {
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | m_RuneHoleRedpoints[i].SetRedpoint(levelUpHole == i, replaceHole == i);
|
| | | }
|
| | | }
|
| | |
|
| | | int ExistEmptyHoleSatisfyInlay()
|
| | | {
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | if (SatisfyInlayHole(i))
|
| | | {
|
| | | return i;
|
| | | }
|
| | | }
|
| | | return 100;
|
| | | }
|
| | |
|
| | | int CompareLevelUp(int lhs, int rhs)
|
| | | {
|
| | | RuneItem lhsItem;
|
| | | RuneItem rhsItem;
|
| | | if (TryGetRuneHoleItem(lhs, out lhsItem)
|
| | | && TryGetRuneHoleItem(rhs, out rhsItem))
|
| | | {
|
| | | if (lhsItem.level != rhsItem.level)
|
| | | {
|
| | | return lhsItem.level.CompareTo(rhsItem.level);
|
| | | }
|
| | | var _cost_x = GetLevelUpRequireRuneEssence(lhsItem.id, lhsItem.level);
|
| | | var _cost_y = GetLevelUpRequireRuneEssence(rhsItem.id, rhsItem.level);
|
| | | if (_cost_x != _cost_y)
|
| | | {
|
| | | return _cost_x.CompareTo(_cost_y);
|
| | | }
|
| | | }
|
| | | return lhs.CompareTo(rhs);
|
| | | }
|
| | |
|
| | | public void SetDayRemind()
|
| | | {
|
| | | if (specialHoleRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.RUNE_SPECIAL_HOLE, true);
|
| | | RefreshSpecialHoleRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshSpecialHoleRedpoint()
|
| | | {
|
| | | var requireRemind = false;
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Rune))
|
| | | {
|
| | | if (!DayRemind.Instance.GetDayRemind(DayRemind.RUNE_SPECIAL_HOLE))
|
| | | {
|
| | | RuneHoleCondition condition;
|
| | | if (IsRuneHoleOpen(specialHole, holeState)
|
| | | && TryGetRuneHoleCondition(specialHole, out condition))
|
| | | {
|
| | | if (runeComposeModel.m_RuneBothPropertys.Contains(rune.id)
|
| | | && GetDoublePropLimitCount() <= GetCurrentDoublePropCount())
|
| | | if (PlayerDatas.Instance.baseData.LV >= condition.playerLevel
|
| | | && PlayerDatas.Instance.baseData.LV >= specialHoleRemindLevels[0]
|
| | | && PlayerDatas.Instance.baseData.LV < specialHoleRemindLevels[1])
|
| | | {
|
| | | return false;
|
| | | requireRemind = true;
|
| | | }
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | specialHoleRedpoint.state = requireRemind ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | |
|
| | | public int GetDoublePropLimitCount()
|
| | | public void JumpToCompose()
|
| | | {
|
| | | var _count = 0;
|
| | | foreach (var _key in doublePropRuneInlayDict.Keys)
|
| | | if (onJumpToCompose != null)
|
| | | {
|
| | | if (RuneTowerOpenLV >= _key)
|
| | | {
|
| | | _count = doublePropRuneInlayDict[_key];
|
| | | }
|
| | | else
|
| | | {
|
| | | break;
|
| | | }
|
| | | onJumpToCompose();
|
| | | }
|
| | | return _count;
|
| | | }
|
| | |
|
| | | public int GetCurrentDoublePropCount()
|
| | | public class PropertyCompute
|
| | | {
|
| | | var _count = 0;
|
| | | foreach (var _rune in runeHoleData.Values)
|
| | | {
|
| | | if (runeComposeModel.m_RuneBothPropertys.Contains(_rune.id))
|
| | | {
|
| | | _count += 1;
|
| | | }
|
| | | }
|
| | | return _count;
|
| | | }
|
| | | string formula = string.Empty;
|
| | | Dictionary<int, float> qualityModulusDict;
|
| | | Dictionary<int, float> multiPropertyModulusDict;
|
| | | Dictionary<int, int> qualityBaseProperty;
|
| | | Dictionary<int, float> cacheFormulaResult;
|
| | |
|
| | | public int SurplusRunePackCnt {
|
| | | get {
|
| | | return runePackMaxNum - runePackData.Count;
|
| | | }
|
| | | }
|
| | | private Dictionary<int, RuneData> runePackData = new Dictionary<int, RuneData>();
|
| | | private Dictionary<int, RuneData> runeHoleData = new Dictionary<int, RuneData>();
|
| | | private uint runeTowerOpenLv = 0;
|
| | | public uint RuneTowerOpenLV {
|
| | | get { return runeTowerOpenLv; }
|
| | | }
|
| | | public event Action OnRefreshRuneHole;
|
| | | public event Action OnRefreshRunePack;
|
| | | public event Action OnRefreshRuneExp;
|
| | | public event Action OnRefreshRuneChip;
|
| | | public event Action OnRefreshRuneTowerLv;
|
| | | private uint holeState = 0;
|
| | | public int sltRuneHole = -1;
|
| | | private int runeSplinters = 0;
|
| | | public int RuneSplinters {
|
| | | get {
|
| | | return runeSplinters;
|
| | | }
|
| | | }
|
| | | private int runeChip = 0;
|
| | | public int RuneChip {
|
| | | get {
|
| | | return runeChip;
|
| | | }
|
| | | }
|
| | | public void SetRuneChip(int val)
|
| | | {
|
| | | runeChip = val;
|
| | | if (OnRefreshRuneChip != null)
|
| | | OnRefreshRuneChip();
|
| | | }
|
| | | public void SetRuneSplinters(int val)
|
| | | {
|
| | | runeSplinters = val;
|
| | | if (OnRefreshRuneExp != null)
|
| | | public PropertyCompute(FuncConfigConfig config)
|
| | | {
|
| | | OnRefreshRuneExp();
|
| | | formula = config.Numerical1;
|
| | | qualityModulusDict = ConfigParse.GetDic<int, float>(config.Numerical2);
|
| | | multiPropertyModulusDict = ConfigParse.GetDic<int, float>(config.Numerical3);
|
| | | qualityBaseProperty = ConfigParse.GetDic<int, int>(config.Numerical4);
|
| | | cacheFormulaResult = new Dictionary<int, float>();
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | | public void OnRunePackRefresh(HA204_tagMCVPackRefresh vNetData)
|
| | | {
|
| | | for (ushort i = 0; i < vNetData.Count; i++)
|
| | | {
|
| | | HA204_tagMCVPackRefresh.tagMCVPackItem item = vNetData.VPacklItemList[i];
|
| | | string runeData = item.ItemData.ToString();
|
| | | int dlt = 10 - runeData.Length;
|
| | | _textBuilder.Length = 0;
|
| | | _textBuilder.Append('0', dlt);
|
| | | runeData = runeData.Insert(0, _textBuilder.ToString());
|
| | | int id = int.Parse(runeData.Substring(5, 5));
|
| | | int lv = int.Parse(runeData.Substring(2, 3)) + 1;
|
| | | int sourceType = int.Parse(runeData.Substring(1, 1));
|
| | | int packType = vNetData.PackType;
|
| | | int index = item.ItemPlace;
|
| | | RuneData data = null;
|
| | | runePackData.TryGetValue(index, out data);
|
| | | if (data == null)
|
| | | {
|
| | | data = new RuneData(index, id, lv, packType, sourceType, 0);
|
| | | runePackData.Add(index, data);
|
| | | }
|
| | | else
|
| | | {
|
| | | data.SetRuneData(index, id, lv, packType, sourceType, 0);
|
| | | }
|
| | | }
|
| | | if (OnRefreshRunePack != null)
|
| | | {
|
| | | OnRefreshRunePack();
|
| | | }
|
| | | UpdateRedpoint();
|
| | | UpdateBreakRedpoint();
|
| | | }
|
| | | public void OnRunePackClear(HA205_tagMCVPackClear vNetData)
|
| | | {
|
| | | for (ushort i = 0; i < vNetData.Count; i++)
|
| | | {
|
| | | int index = vNetData.ItemPlaceList[i];
|
| | | if (runePackData.ContainsKey(index))
|
| | | {
|
| | | runePackData.Remove(index);
|
| | | }
|
| | | }
|
| | | if (OnRefreshRunePack != null)
|
| | | {
|
| | | OnRefreshRunePack();
|
| | | }
|
| | | UpdateRedpoint();
|
| | | UpdateBreakRedpoint();
|
| | | }
|
| | |
|
| | | public event Action<int> openNewHoleEvent;
|
| | | public void OnRuneHoleRefresh(HA31F_tagMCRuneInfo vNetData)
|
| | | {
|
| | | uint oldHoleState = holeState;
|
| | | holeState = vNetData.RuneHoleOpenState;
|
| | | for (byte i = 0; i < vNetData.Count; i++)
|
| | | public int GetPropertyValue(int id, int level)
|
| | | {
|
| | | RuneData data = null;
|
| | | runeHoleData.TryGetValue(i, out data);
|
| | | if (IsRuneHoleOpen(i) && vNetData.RuneDataList[i] != 0)
|
| | | var itemConfig = ItemConfig.Get(id);
|
| | | var runeConfig = RuneConfig.Get(id);
|
| | | float result = 0;
|
| | | if (itemConfig != null)
|
| | | {
|
| | | _textBuilder.Length = 0;
|
| | | string runeData = vNetData.RuneDataList[i].ToString();
|
| | | int dlt = 10 - runeData.Length;
|
| | | _textBuilder.Length = 0;
|
| | | _textBuilder.Append('0', dlt);
|
| | | runeData = runeData.Insert(0, _textBuilder.ToString());
|
| | | int id = int.Parse(runeData.Substring(5, 5));
|
| | | if (id == 0)
|
| | | var formulaResult = 0f;
|
| | | if (cacheFormulaResult.ContainsKey(level))
|
| | | {
|
| | | continue;
|
| | | formulaResult = cacheFormulaResult[level];
|
| | | }
|
| | | int lv = int.Parse(runeData.Substring(2, 3)) + 1;
|
| | | int sourceType = int.Parse(runeData.Substring(1, 1));
|
| | | int placetype = 1;
|
| | | if (data == null)
|
| | | if (!cacheFormulaResult.ContainsKey(level))
|
| | | {
|
| | | data = new RuneData(i, id, lv, (int)PackType.InterimPack, sourceType, placetype);
|
| | | runeHoleData.Add(i, data);
|
| | | Equation.Instance.Clear();
|
| | | Equation.Instance.AddKeyValue("level", level);
|
| | | formulaResult = Equation.Instance.Eval<float>(formula);
|
| | | cacheFormulaResult.Add(level, formulaResult);
|
| | | }
|
| | |
|
| | | var quality = itemConfig.ItemColor;
|
| | | var propertyCount = 1;
|
| | | if (runeConfig != null)
|
| | | {
|
| | | propertyCount = runeConfig.AttrType.Length;
|
| | | }
|
| | |
|
| | | float qualityModulus = qualityModulusDict[quality];
|
| | | var baseValue = 0;
|
| | | if (qualityBaseProperty.ContainsKey(quality))
|
| | | {
|
| | | baseValue = qualityBaseProperty[quality];
|
| | | }
|
| | |
|
| | | if (multiPropertyModulusDict.ContainsKey(propertyCount))
|
| | | {
|
| | | var multiPropertyModulus = multiPropertyModulusDict[propertyCount];
|
| | | result = (formulaResult * qualityModulus + baseValue) * multiPropertyModulus;
|
| | | }
|
| | | else
|
| | | {
|
| | | data.SetRuneData(i, id, lv, (int)PackType.InterimPack, sourceType, placetype);
|
| | | result = formulaResult * qualityModulus + baseValue;
|
| | | }
|
| | | }
|
| | | else
|
| | | return Mathf.FloorToInt(result);
|
| | | }
|
| | |
|
| | | public void CacheFormulaResult(int level)
|
| | | {
|
| | | for (int i = 1; i <= level; i++)
|
| | | {
|
| | | if (data != null)
|
| | | if (!cacheFormulaResult.ContainsKey(i))
|
| | | {
|
| | | data = null;
|
| | | runeHoleData.Remove(i);
|
| | | Equation.Instance.Clear();
|
| | | Equation.Instance.AddKeyValue("level", i);
|
| | | var result = Equation.Instance.Eval<float>(formula);
|
| | | cacheFormulaResult.Add(i, result);
|
| | | }
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | }
|
| | |
|
| | | public class RuneHoleRedpoint
|
| | | {
|
| | | public readonly Redpoint redpoint;
|
| | | public readonly Redpoint levelUpRedpoint;
|
| | | public readonly Redpoint replaceRedpoint;
|
| | |
|
| | | public RuneHoleRedpoint(int baseId)
|
| | | {
|
| | | if (!serverInited)
|
| | | {
|
| | | break;
|
| | | }
|
| | | int k = 1 << i;
|
| | | var oldOpen = (oldHoleState & k) == k;
|
| | | if (!oldOpen && IsRuneHoleOpen(i))
|
| | | {
|
| | | if (openNewHoleEvent != null)
|
| | | {
|
| | | openNewHoleEvent(i);
|
| | | }
|
| | | }
|
| | | redpoint = new Redpoint(baseId, RuneModel.redpointIndex++);
|
| | | levelUpRedpoint = new Redpoint(redpoint.id, RuneModel.redpointIndex++);
|
| | | replaceRedpoint = new Redpoint(redpoint.id, RuneModel.redpointIndex++);
|
| | | }
|
| | | if (OnRefreshRuneHole != null)
|
| | |
|
| | | public void SetRedpoint(bool levelUp, bool replace)
|
| | | {
|
| | | OnRefreshRuneHole();
|
| | | }
|
| | | UpdateRedpoint();
|
| | | UpdateBreakRedpoint();
|
| | | UpdateSpecialHoleRedpoint();
|
| | | }
|
| | |
|
| | | public void UnlockSpecialHole(int hole)
|
| | | {
|
| | | if (IsSpeicalHole(hole))
|
| | | {
|
| | | if (IsRuneHoleOpen(hole))
|
| | | {
|
| | | return;
|
| | | }
|
| | | int error = 0;
|
| | | if (!TestUnlockSpeicalHole(hole, out error))
|
| | | {
|
| | | ProcessUnlockError(error, specialHoles[hole]);
|
| | | return;
|
| | | }
|
| | | CA513_tagCMUnlockRuneHole pak = new CA513_tagCMUnlockRuneHole();
|
| | | pak.HoleIndex = (byte)hole;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TestUnlockSpeicalHole(int hole, out int error)
|
| | | {
|
| | | error = 0;
|
| | | SpecialRuneHoleCondition speicalHole;
|
| | | if (specialHoles.TryGetValue(hole, out speicalHole))
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV < speicalHole.level)
|
| | | {
|
| | | error = 1;
|
| | | return false;
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.diamond < speicalHole.cost)
|
| | | {
|
| | | error = 2;
|
| | | return false;
|
| | | }
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void ProcessUnlockError(int error, SpecialRuneHoleCondition specialHole)
|
| | | {
|
| | | switch (error)
|
| | | {
|
| | | case 1:
|
| | | SysNotifyMgr.Instance.ShowTip("RuneSpecialHoleLevelError", specialHole.level);
|
| | | break;
|
| | | case 2:
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool ResolveFusionStone(int sourceType)
|
| | | {
|
| | | if (sourceType == 0 || sourceType == 2)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsSpeicalHole(int hole)
|
| | | {
|
| | | return specialHoles.ContainsKey(hole);
|
| | | }
|
| | |
|
| | | public bool IsRuneHoleOpen(int hole)
|
| | | {
|
| | | if (holeState < 1)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | int k = 1 << hole;
|
| | | if ((holeState & k) == k)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | | public RuneData GetHoleRune(int hole)
|
| | | {
|
| | | RuneData data = null;
|
| | | runeHoleData.TryGetValue(hole, out data);
|
| | | return data;
|
| | | }
|
| | | public Dictionary<int, RuneData> GetAllRuneData()
|
| | | {
|
| | | return runeHoleData;
|
| | | }
|
| | | public int GetHoleRuneCnt()
|
| | | {
|
| | | return runeHoleData.Count;
|
| | | }
|
| | |
|
| | | public bool IsEmptyHole()
|
| | | {
|
| | | for (int i = 0; i < RUNE_HOLE_COUNT; i++)
|
| | | {
|
| | | if (IsRuneHoleOpen(i) && !runeHoleData.ContainsKey(i))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public Dictionary<int, RuneData> GetPackRune()
|
| | | {
|
| | | return runePackData;
|
| | | }
|
| | |
|
| | | public int RuneCount {
|
| | | get {
|
| | | var _count = 0;
|
| | | foreach (var _rune in runePackData.Values)
|
| | | {
|
| | | if (!_rune.IsRuneCream)
|
| | | {
|
| | | _count++;
|
| | | }
|
| | | }
|
| | | return _count;
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | ///得到所有的解锁符印Id
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | public Dictionary<int, List<int>> GetAllUnlockRuneIdlist()
|
| | | {
|
| | | List<RuneConfig> runes = RuneConfig.GetValues();
|
| | | if (runes == null) return null;
|
| | |
|
| | | Dictionary<int, List<int>> unlockDict = new Dictionary<int, List<int>>();
|
| | | for (int i = 0; i < runes.Count; i++)
|
| | | {
|
| | | int offset = (int)RuneTowerOpenLV - runes[i].TowerID;
|
| | | if (offset >= 0 && runes[i].AttrType.Length < 2)
|
| | | {
|
| | | if (!unlockDict.ContainsKey(runes[i].TowerID))
|
| | | {
|
| | | List<int> unlocklist = new List<int>();
|
| | | unlocklist.Add(runes[i].ID);
|
| | | unlockDict.Add(runes[i].TowerID, unlocklist);
|
| | | }
|
| | | else
|
| | | {
|
| | | unlockDict[runes[i].TowerID].Add(runes[i].ID);
|
| | | }
|
| | | }
|
| | | }
|
| | | return unlockDict;
|
| | | }
|
| | |
|
| | | public event Action JumpToComposeEvent;
|
| | | public void JumpToRuneCompose()
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<RunePanel>())
|
| | | {
|
| | | if (JumpToComposeEvent != null)
|
| | | {
|
| | | JumpToComposeEvent();
|
| | | }
|
| | | levelUpRedpoint.state = levelUp ? RedPointState.Simple : RedPointState.None;
|
| | | replaceRedpoint.state = replace ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct SpecialRuneHoleCondition
|
| | | public class RuneItem : VirtualPackItem
|
| | | {
|
| | | public int level;
|
| | | public int cost;
|
| | | }
|
| | | public int placeType { get; private set; }//0-背包 1-孔
|
| | | public int sourceType { get; private set; }//来源(老号0,默认1,合成2)
|
| | | public int itemType { get; private set; }
|
| | |
|
| | | public enum RuneSource
|
| | | {
|
| | | Normal,
|
| | | Compose,
|
| | | }
|
| | | static RuneModel model { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
|
| | |
|
| | | public class RuneData
|
| | | {
|
| | | /// <summary>
|
| | | /// 符印对应位置索引,若在孔上则对应孔id,若在背包,则对应背包位置索引
|
| | | /// </summary>
|
| | | private int m_Index = -1;
|
| | | public int index { get { return m_Index; } }
|
| | | /// <summary>
|
| | | /// 符印对应物品id
|
| | | /// </summary>
|
| | | private int m_Id = -1;
|
| | | public int id { get { return m_Id; } }
|
| | | /// <summary>
|
| | | /// 符印对应强化等级
|
| | | /// </summary>
|
| | | private int m_Level = 0;
|
| | | public int lv { get { return m_Level; } }
|
| | | /// <summary>
|
| | | /// 预留字段
|
| | | /// </summary>
|
| | | private int m_Lock = -1;
|
| | | public int locked { get { return m_Lock; } }
|
| | | /// <summary>
|
| | | /// 背包类型,符印背包255
|
| | | /// </summary>
|
| | | private int m_PackType = -1;
|
| | | public int packtype { get { return m_PackType; } }
|
| | | /// <summary>
|
| | | /// 符印放置位置,默认为符印背包
|
| | | /// </summary>
|
| | | private int m_PlaceType = 0;
|
| | | public int placetype { get { return m_PlaceType; } }
|
| | |
|
| | | public int m_SourceType = 0;
|
| | | public int sourceType { get { return m_SourceType; } }//来源(老号0,默认1,合成2)
|
| | |
|
| | | public bool IsRuneCream { get; private set; }
|
| | |
|
| | | public RuneData(int index, int id, int level, int packtype, int sourcetype, int placetype = 0)
|
| | | public void ParseHoleItem(int index, uint data)
|
| | | {
|
| | | m_Index = index;
|
| | | m_Id = id;
|
| | | m_Level = level;
|
| | | m_PackType = packtype;
|
| | | m_PlaceType = placetype;
|
| | | m_SourceType = sourcetype;
|
| | | ParsePackItem(index, data);
|
| | | placeType = 1;
|
| | | }
|
| | |
|
| | | public override void ParsePackItem(int index, uint data)
|
| | | {
|
| | | base.ParsePackItem(index, data);
|
| | | placeType = 0;
|
| | | var config = ItemConfig.Get(id);
|
| | | if (config != null)
|
| | | {
|
| | | IsRuneCream = config.Type == RuneModel.RUNE_CREAMTYPE;
|
| | | }
|
| | | itemType = config.Type;
|
| | | sourceType = int.Parse(dataString.Substring(1, 1));
|
| | | }
|
| | |
|
| | | public void SetRuneData(int index, int id, int level, int packtype, int sourcetype, int placetype = 0)
|
| | | public override void Release()
|
| | | {
|
| | | m_Index = index;
|
| | | m_Id = id;
|
| | | m_Level = level;
|
| | | m_PackType = packtype;
|
| | | m_PlaceType = placetype;
|
| | | m_SourceType = sourcetype;
|
| | | var config = ItemConfig.Get(id);
|
| | | if (config != null)
|
| | | base.Release();
|
| | | }
|
| | |
|
| | | public bool IsExistSameProperty(int _id)
|
| | | {
|
| | | List<int> propertys;
|
| | | if (model.TryGetRunePropertys(id, out propertys))
|
| | | {
|
| | | IsRuneCream = config.Type == RuneModel.RUNE_CREAMTYPE;
|
| | | var config = RuneConfig.Get(_id);
|
| | | if (config != null)
|
| | | {
|
| | | for (int i = 0; i < config.AttrType.Length; i++)
|
| | | {
|
| | | if (propertys.Contains(config.AttrType[i]))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public struct RuneHoleCondition
|
| | | {
|
| | | public int runeTowerFloor;
|
| | | public int playerLevel;
|
| | | public int diamond;
|
| | | }
|
| | | } |
| | | |