| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Thursday, June 13, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class SpiritWeaponPropertyConfig |
| | | { |
| | | |
| | | public readonly int ItemID; |
| | | public readonly int[] AttrIDList; |
| | | public readonly int[] AttrValueList; |
| | | public readonly int[] AttrColorList; |
| | | public readonly int AttrScore; |
| | | |
| | | public SpiritWeaponPropertyConfig() |
| | | { |
| | | } |
| | | |
| | | public SpiritWeaponPropertyConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out ItemID); |
| | | |
| | | string[] AttrIDListStringArray = tables[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AttrIDList = new int[AttrIDListStringArray.Length]; |
| | | for (int i=0;i<AttrIDListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]); |
| | | } |
| | | |
| | | string[] AttrValueListStringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AttrValueList = new int[AttrValueListStringArray.Length]; |
| | | for (int i=0;i<AttrValueListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AttrValueListStringArray[i],out AttrValueList[i]); |
| | | } |
| | | |
| | | string[] AttrColorListStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | AttrColorList = new int[AttrColorListStringArray.Length]; |
| | | for (int i=0;i<AttrColorListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(AttrColorListStringArray[i],out AttrColorList[i]); |
| | | } |
| | | |
| | | int.TryParse(tables[4],out AttrScore); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, SpiritWeaponPropertyConfig> configs = new Dictionary<string, SpiritWeaponPropertyConfig>(); |
| | | public static SpiritWeaponPropertyConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("SpiritWeaponPropertyConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | SpiritWeaponPropertyConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new SpiritWeaponPropertyConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static SpiritWeaponPropertyConfig Get(int id) |
| | | { |
| | | return Get(id.ToString()); |
| | | } |
| | | |
| | | public static List<string> GetKeys() |
| | | { |
| | | var keys = new List<string>(); |
| | | keys.AddRange(configs.Keys); |
| | | keys.AddRange(rawDatas.Keys); |
| | | return keys; |
| | | } |
| | | |
| | | public static List<SpiritWeaponPropertyConfig> GetValues() |
| | | { |
| | | var values = new List<SpiritWeaponPropertyConfig>(); |
| | | values.AddRange(configs.Values); |
| | | |
| | | var keys = new List<string>(rawDatas.Keys); |
| | | foreach (var key in keys) |
| | | { |
| | | values.Add(Get(key)); |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | public static bool Has(string id) |
| | | { |
| | | return configs.ContainsKey(id) || rawDatas.ContainsKey(id); |
| | | } |
| | | |
| | | public static bool Has(int id) |
| | | { |
| | | return Has(id.ToString()); |
| | | } |
| | | |
| | | public static bool inited { get; private set; } |
| | | protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>(); |
| | | public static void Init(bool sync=false) |
| | | { |
| | | inited = false; |
| | | var path = string.Empty; |
| | | if (AssetSource.refdataFromEditor) |
| | | { |
| | | path = ResourcesPath.CONFIG_FODLER +"/SpiritWeaponProperty.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/SpiritWeaponProperty.txt"); |
| | | } |
| | | |
| | | configs.Clear(); |
| | | var tempConfig = new SpiritWeaponPropertyConfig(); |
| | | var preParse = tempConfig is IConfigPostProcess; |
| | | |
| | | if (sync) |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new SpiritWeaponPropertyConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | inited = true; |
| | | } |
| | | else |
| | | { |
| | | ThreadPool.QueueUserWorkItem((object _object) => |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new SpiritWeaponPropertyConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f9b0ccc7d480fff4eafa16d2c5443d60 |
| | | timeCreated: 1560392719 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | public BaseInfo baseInfo; |
| | | public BaseProperty baseProperty; |
| | | public BaseProperty petMountBaseProperty; |
| | | public SpiritWeaponProperty spiritWeaponProperty; |
| | | public LegendProperty legendProperty; |
| | | public SkillInfo skillInfo; |
| | | public SuitInfo suitInfo; |
| | |
| | | public List<Int2> baseProperties; |
| | | public int star; |
| | | public List<Int2> starProperties; |
| | | } |
| | | |
| | | public struct SpiritWeaponProperty
|
| | | {
|
| | | public List<Int3> properties;
|
| | | } |
| | | |
| | | public struct LegendProperty |
| | |
| | | guid = guid, |
| | | |
| | | baseInfo = GetBaseInfo(guid), |
| | | baseProperty = GetBaseProperty(guid), |
| | | baseProperty = GetBaseProperty(guid),
|
| | | spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId), |
| | | legendProperty = GetLegendProperty(guid), |
| | | skillInfo = GetSkillInfo(item.itemId), |
| | | suitInfo = GetSuitInfo(guid), |
| | |
| | | |
| | | baseInfo = GetBaseInfo(itemId), |
| | | baseProperty = GetBaseProperty(itemId), |
| | | legendProperty = GetLegendProperty(itemId), |
| | | legendProperty = GetLegendProperty(itemId),
|
| | | spiritWeaponProperty = GetSpiritWeaponProperty(itemId), |
| | | skillInfo = GetSkillInfo(itemId), |
| | | suitInfo = GetSuitInfo(itemId), |
| | | gemInfo = GetGemInfo(itemId), |
| | |
| | | goodId = goodId, |
| | | |
| | | baseInfo = GetBaseInfo(itemId), |
| | | baseProperty = GetBaseProperty(itemId), |
| | | baseProperty = GetBaseProperty(itemId),
|
| | | spiritWeaponProperty = GetSpiritWeaponProperty(itemId), |
| | | legendProperty = GetLegendProperty(itemId), |
| | | skillInfo = GetSkillInfo(itemId), |
| | | suitInfo = GetSuitInfo(itemId), |
| | |
| | | guid = guid, |
| | | |
| | | baseInfo = GetBaseInfo(guid), |
| | | baseProperty = GetBaseProperty(item.itemId), |
| | | baseProperty = GetBaseProperty(item.itemId),
|
| | | spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId), |
| | | legendProperty = GetLegendProperty(item.itemId), |
| | | skillInfo = GetSkillInfo(item.itemId), |
| | | suitInfo = GetSuitInfo(item.itemId), |
| | |
| | | |
| | | baseInfo = GetBaseInfo(guid), |
| | | baseProperty = GetBaseProperty(item.itemId), |
| | | spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId), |
| | | legendProperty = GetLegendProperty(guid), |
| | | petMountBaseProperty = GetPetMountBaseProperty(item.itemId), |
| | | operates = operatable ? GetOperates(guid) : null, |
| | |
| | | { |
| | | itemId = itemId, |
| | | baseInfo = GetBaseInfo(itemId), |
| | | baseProperty = GetBaseProperty(itemId), |
| | | baseProperty = GetBaseProperty(itemId),
|
| | | spiritWeaponProperty = GetSpiritWeaponProperty(itemId), |
| | | legendProperty = GetLegendProperty(itemId), |
| | | petMountBaseProperty = GetPetMountBaseProperty(itemId), |
| | | getWay = GetGetWay(itemId), |
| | |
| | | var config = ItemConfig.Get(itemId); |
| | | switch (config.Type) |
| | | { |
| | | case 113: |
| | | data.trueCount = LegendPropertyUtility.GetWingPropertyCount(config.LV); |
| | | var ids = LegendPropertyUtility.GetWingProperties(config.LV); |
| | | var values = LegendPropertyUtility.GetWingProperties(config.LV); |
| | | data.properties = new List<Int2>(); |
| | | if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty()) |
| | | { |
| | | var min = Mathf.Min(ids.Count, values.Count); |
| | | for (int i = 0; i < min; i++) |
| | | { |
| | | data.properties.Add(new Int2(ids[i], values[i])); |
| | | } |
| | | } |
| | | |
| | | break;
|
| | | case 119:
|
| | | case 120:
|
| | | case 121:
|
| | |
| | | return data; |
| | | } |
| | | |
| | | private static SpiritWeaponProperty GetSpiritWeaponProperty(int itemId)
|
| | | {
|
| | | var config = SpiritWeaponPropertyConfig.Get(itemId);
|
| | | if (config == null)
|
| | | {
|
| | | return default(SpiritWeaponProperty);
|
| | | }
|
| | |
|
| | | var properties = new List<Int3>();
|
| | | for (var i = 0; i < config.AttrIDList.Length; i++)
|
| | | {
|
| | | properties.Add(new Int3(config.AttrIDList[i], config.AttrValueList[i], config.AttrColorList[i]));
|
| | | }
|
| | |
|
| | | var spiritWeaponProperty = new SpiritWeaponProperty();
|
| | | spiritWeaponProperty.properties = properties;
|
| | | return spiritWeaponProperty;
|
| | | } |
| | | |
| | | private static LegendProperty GetLegendProperty(string guid) |
| | | { |
| | | var item = packModel.GetItemByGuid(guid); |
| | |
| | | { |
| | | [SerializeField] TipItemBaseInfoWidget m_BaseInfoWidget; |
| | | [SerializeField] TipBasePropertyWidget m_BasePropertyWidget; |
| | | [SerializeField] TipSpiritWeaponPropertyWidget m_SpiritWeaponPropertyWidget; |
| | | [SerializeField] TipItemDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] TipBuyItemWidget m_BuyItemWidget; |
| | | [SerializeField] TipGetWayEntranceWidget m_GetWayEntranceWidget; |
| | |
| | | |
| | | DisplayBaseInfo(); |
| | | DisplayBaseProperty(); |
| | | DisplaySpiritWeaponProperty(); |
| | | DisplayItemDescription(); |
| | | DisplayBuyItem(); |
| | | DisplayJobAndPlace(); |
| | |
| | | m_BasePropertyWidget.Display(baseProperty); |
| | | } |
| | | |
| | | private void DisplaySpiritWeaponProperty() |
| | | { |
| | | var property = ItemTipUtility.mainTipData.spiritWeaponProperty; |
| | | m_SpiritWeaponPropertyWidget.Display(property); |
| | | } |
| | | |
| | | private void DisplayItemDescription() |
| | | { |
| | | var itemId = ItemTipUtility.mainTipData.baseInfo.itemId; |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class TipSpiritWeaponPropertyWidget : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_PropertyBehaviour; |
| | | |
| | | public void Display(ItemTipUtility.SpiritWeaponProperty data) |
| | | { |
| | | var count = data.properties.Count; |
| | | var lines = new string[count]; |
| | | var lineIndex = 0; |
| | | foreach (var property in data.properties) |
| | | { |
| | | var config = PlayerPropertyConfig.Get(property.x); |
| | | var name = config.Name; |
| | | var valueDescription = PlayerPropertyConfig.GetValueDescription(property.x, property.y); |
| | | lines[lineIndex++] = UIHelper.AppendColor(property.z, string.Format("{0}: {1}", name, valueDescription)); |
| | | } |
| | | |
| | | m_PropertyBehaviour.text = string.Join("\r\n", lines); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e8a2a13359501454a909545b991ddcb3 |
| | | timeCreated: 1560392049 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | |
| | | public class WingTipWin : Window |
| | | { |
| | | |
| | | [SerializeField] TipItemBaseInfoWidget m_BaseInfoWidget; |
| | | |
| | | [SerializeField] ScrollRect m_SrollRect; |
| | | [SerializeField] TipBasePropertyWidget m_BasePropertyWidget; |
| | | [SerializeField] TipLegendPropertyWidget m_LegendPropertyWidget; |
| | | [SerializeField] TipSpiritWeaponPropertyWidget m_SpiritWeaponPropertyWidget; |
| | | [SerializeField] TipWingRefineMaterialsWidget m_RefineMaterialsWidget; |
| | | [SerializeField] TipItemDescriptionWidget m_DescriptionWidget; |
| | | [SerializeField] TipBuyItemWidget m_BuyItemWidget; |
| | |
| | | m_SrollRect.verticalNormalizedPosition = 1f; |
| | | DisplayBaseInfo(); |
| | | DisplayBaseProperty(); |
| | | DisplayLegendProperty(); |
| | | DisplaySpiritWeaponProperty(); |
| | | DisplayRefineMaterials(); |
| | | DisplayItemDescription(); |
| | | DisplayBuyItem(); |
| | |
| | | m_BasePropertyWidget.Display(baseProperty); |
| | | } |
| | | |
| | | private void DisplayLegendProperty() |
| | | private void DisplaySpiritWeaponProperty() |
| | | { |
| | | var legendProperty = ItemTipUtility.mainTipData.legendProperty; |
| | | m_LegendPropertyWidget.gameObject.SetActive(!legendProperty.properties.IsNullOrEmpty()); |
| | | if (!legendProperty.properties.IsNullOrEmpty()) |
| | | { |
| | | m_LegendPropertyWidget.Display(legendProperty); |
| | | } |
| | | var property = ItemTipUtility.mainTipData.spiritWeaponProperty; |
| | | m_SpiritWeaponPropertyWidget.Display(property); |
| | | } |
| | | |
| | | private void DisplayRefineMaterials() |
| | |
| | | case RoleEquipType.Jade: |
| | | properties.AddRange(GetEquipLegendProperties(itemId)); |
| | | break; |
| | | case RoleEquipType.Wing: |
| | | properties.AddRange(GetWingsLegendProperties(itemId)); |
| | | break; |
| | | } |
| | | |
| | | return CalculateEquipScore(type, itemId, properties); |
| | |
| | | foreach (var item in legendProperties) |
| | | { |
| | | properties[item.x] = item.y; |
| | | } |
| | | } |
| | | |
| | | return properties; |
| | | } |
| | | |
| | | private Dictionary<int, int> GetWingsLegendProperties(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | var properties = new Dictionary<int, int>(); |
| | | var level = config.LV; |
| | | var count = LegendPropertyUtility.GetWingPropertyCount(level); |
| | | var ids = LegendPropertyUtility.GetWingProperties(level); |
| | | if (ids != null) |
| | | { |
| | | for (var i = 0; properties.Count < count && i < properties.Count; i++) |
| | | { |
| | | var propertyId = ids[i]; |
| | | properties[propertyId] = LegendPropertyUtility.GetWingPropertyValues(level, propertyId)[0]; |
| | | } |
| | | } |
| | | |
| | |
| | | skillScore += equipSkillScores[config.AddSkill2]; |
| | | } |
| | | |
| | | var spiritWeaponScore = 0; |
| | | if (SpiritWeaponPropertyConfig.Has(itemId))
|
| | | {
|
| | | spiritWeaponScore = SpiritWeaponPropertyConfig.Get(itemId).AttrScore;
|
| | | } |
| | | |
| | | switch (type) |
| | | { |
| | | case PackType.DogzEquip: |
| | | case PackType.DogzItem: |
| | | return Equation.Instance.Eval<int>(dogzGSFormula); |
| | | default: |
| | | return skillScore + Equation.Instance.Eval<int>(normalGSFormula); |
| | | return spiritWeaponScore + skillScore + Equation.Instance.Eval<int>(normalGSFormula); |
| | | } |
| | | } |
| | | |
| | |
| | | static PropertyMap dogzPropertyMap; |
| | | static PropertyCount dogzPropertyCount; |
| | | static QualityPropertyValue dogzQualityPropertyValue; |
| | | static WingPropertyCount wingPropertyCount; |
| | | static WingPropertyValue wingPropertyValue; |
| | | |
| | | public static void Init() |
| | | { |
| | |
| | | FuncConfigConfig.Get("DogzLegendAttrRulePreview").Numerical1); |
| | | dogzPropertyCount = new PropertyCount(FuncConfigConfig.Get("DogzLegendAttrCountPreview").Numerical1); |
| | | dogzQualityPropertyValue = new QualityPropertyValue(FuncConfigConfig.Get("DogzLegendAttrValueByColorPreview").Numerical1); |
| | | |
| | | wingPropertyCount = new WingPropertyCount(); |
| | | wingPropertyValue = new WingPropertyValue(); |
| | | } |
| | | |
| | | public static List<Int2> GetEquipProperties(int itemId) |
| | |
| | | return legendPropertyConfig.propertyCount; |
| | | } |
| | | |
| | | public static string GetWingPropertyColor(int propertyId, int value) |
| | | { |
| | | return propertyColor.GetWingPropertyColor(propertyId, value); |
| | | } |
| | | |
| | | public static LegendAttrType GetDogzPropertyType(int propertyId) |
| | | { |
| | | return dogzPropertyMap.GetPropertyType(propertyId); |
| | |
| | | public static int GetDogzQualityPropertyValue(int property, int quality) |
| | | { |
| | | return dogzQualityPropertyValue.GetValue(property, quality); |
| | | } |
| | | |
| | | public static int GetWingPropertyCount(int level) |
| | | { |
| | | return wingPropertyCount.GetValue(level); |
| | | } |
| | | |
| | | public static int GetWingPropertyMinValue(int level, int property) |
| | | { |
| | | return wingPropertyValue.GetMin(level, property); |
| | | } |
| | | |
| | | public static int GetWingPropertyMaxValue(int level, int property) |
| | | { |
| | | return wingPropertyValue.GetMax(level, property); |
| | | } |
| | | |
| | | public static bool HasWingProperties(int level) |
| | | { |
| | | return wingPropertyValue.Has(level); |
| | | } |
| | | |
| | | public static List<int> GetWingProperties(int level) |
| | | { |
| | | return wingPropertyValue.GetProperties(level); |
| | | } |
| | | |
| | | public static List<int> GetWingPropertyValues(int level, int property) |
| | | { |
| | | return wingPropertyValue.GetValues(level, property); |
| | | } |
| | | |
| | | public class PropertyColor |
| | |
| | | } |
| | | } |
| | | |
| | | public class WingPropertyCount |
| | | { |
| | | Dictionary<int, int> counts = new Dictionary<int, int>(); |
| | | |
| | | public WingPropertyCount() |
| | | { |
| | | var json = JsonMapper.ToObject(FuncConfigConfig.Get("WingLegendAttrCountPreview").Numerical1); |
| | | for (int i = 0; i < json.Count; i++) |
| | | { |
| | | counts[(int)json[i][0]] = (int)json[i][1]; |
| | | } |
| | | } |
| | | |
| | | public bool Has(int level) |
| | | { |
| | | return counts.ContainsKey(level); |
| | | } |
| | | |
| | | public int GetValue(int level) |
| | | { |
| | | if (Has(level)) |
| | | { |
| | | return counts[level]; |
| | | } |
| | | else |
| | | { |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public class WingPropertyValue |
| | | { |
| | | Dictionary<int, Dictionary<int, List<int>>> levelPropertyValues = new Dictionary<int, Dictionary<int, List<int>>>(); |
| | | |
| | | public WingPropertyValue() |
| | | { |
| | | var json = JsonMapper.ToObject(FuncConfigConfig.Get("WingLegendAttrValuePreview").Numerical1); |
| | | foreach (var key in json.Keys) |
| | | { |
| | | var levelValues = new Dictionary<int, List<int>>(); |
| | | levelPropertyValues.Add(int.Parse(key), levelValues); |
| | | |
| | | var subJson = json[key]; |
| | | foreach (var propertyId in subJson.Keys) |
| | | { |
| | | var count = subJson[propertyId].Count; |
| | | var values = new List<int>(); |
| | | levelValues[int.Parse(propertyId)] = values; |
| | | |
| | | if (subJson[propertyId].IsArray) |
| | | { |
| | | for (var i = 0; i < subJson[propertyId].Count; i++) |
| | | { |
| | | values.Add((int)subJson[propertyId][i]); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | public bool Has(int level) |
| | | { |
| | | return levelPropertyValues.ContainsKey(level); |
| | | } |
| | | |
| | | public bool Has(int level, int propertyId) |
| | | { |
| | | if (!levelPropertyValues.ContainsKey(level)) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | return levelPropertyValues[level].ContainsKey(propertyId); |
| | | } |
| | | |
| | | public int GetMin(int level, int propertyId) |
| | | { |
| | | if (Has(level, propertyId)) |
| | | { |
| | | return levelPropertyValues[level][propertyId][0]; |
| | | } |
| | | else |
| | | { |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | public int GetMax(int level, int propertyId) |
| | | { |
| | | if (Has(level, propertyId)) |
| | | { |
| | | var count = levelPropertyValues[level][propertyId].Count; |
| | | return levelPropertyValues[level][propertyId][count - 1]; |
| | | } |
| | | else |
| | | { |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | public List<int> GetProperties(int level) |
| | | { |
| | | if (Has(level)) |
| | | { |
| | | return new List<int>(levelPropertyValues[level].Keys); |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public List<int> GetValues(int level, int propertyId) |
| | | { |
| | | if (Has(level, propertyId)) |
| | | { |
| | | return levelPropertyValues[level][propertyId]; |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | normalTasks.Add(new ConfigInitTask("TreasureChapterConfig", () => { TreasureChapterConfig.Init(); }, () => { return TreasureChapterConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TaskFeedbackConfig", () => { TaskFeedbackConfig.Init(); }, () => { return TaskFeedbackConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TaskFeedbackFuncConfig", () => { TaskFeedbackFuncConfig.Init(); }, () => { return TaskFeedbackFuncConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("VipPrivilegeInfoConfig", () => { VipPrivilegeInfoConfig.Init(); }, () => { return VipPrivilegeInfoConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("VipPrivilegeInfoConfig", () => { VipPrivilegeInfoConfig.Init(); }, () => { return VipPrivilegeInfoConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("SpiritWeaponPropertyConfig", () => { SpiritWeaponPropertyConfig.Init(); }, () => { return SpiritWeaponPropertyConfig.inited; }));
|
| | | } |
| | | |
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>(); |