| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, January 06, 2018 |
| | | // [ Date ]: Tuesday, February 12, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public partial class ElderGodAreaConfig : ConfigBase { |
| | | |
| | | public int NPCID { get ; private set ; } |
| | | public int MonsterType { get ; private set ; } |
| | | public int MonsterAnger { get ; private set ; } |
| | | public int NPCID; |
| | | public int MonsterType; |
| | | public int MonsterAnger; |
| | | public int[] RareItemID; |
| | | public string PortraitID { get ; private set; } |
| | | public string PortraitID; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return NPCID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | public override void Parse(string content) { |
| | | try |
| | | { |
| | | NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | var contents = content.Split('\t'); |
| | | |
| | | int.TryParse(contents[0],out NPCID); |
| | | |
| | | MonsterType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | int.TryParse(contents[1],out MonsterType); |
| | | |
| | | MonsterAnger=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | int.TryParse(contents[2],out MonsterAnger); |
| | | |
| | | string[] RareItemIDStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | var RareItemIDStringArray = contents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RareItemID = new int[RareItemIDStringArray.Length]; |
| | | for (int i=0;i<RareItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | } |
| | | |
| | | PortraitID = rawContents[4].Trim(); |
| | | PortraitID = contents[4]; |
| | | } |
| | | catch (Exception ex) |
| | | { |