| | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class NpcPreloadConfig : ConfigBase { |
| | | public partial class NpcPreloadConfig : ConfigBase {
|
| | |
|
| | | public int MapID { get ; private set ; }
|
| | | public int[] NpcIDs;
|
| | | public int[] NpcCount;
|
| | | |
| | | public int MapID { get ; private set ; } |
| | | public int[] NpcIDs; |
| | | public int[] NpcCount; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return MapID.ToString(); |
| | | public override string getKey()
|
| | | {
|
| | | return MapID.ToString();
|
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | MapID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | try
|
| | | {
|
| | | MapID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | string[] NpcIDsStringArray = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NpcIDs = new int[NpcIDsStringArray.Length]; |
| | | for (int i=0;i<NpcIDsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NpcIDsStringArray[i],out NpcIDs[i]); |
| | | } |
| | | |
| | | }
|
| | | |
| | | string[] NpcCountStringArray = rawContents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | NpcCount = new int[NpcCountStringArray.Length]; |
| | | for (int i=0;i<NpcCountStringArray.Length;i++) |
| | | { |
| | | int.TryParse(NpcCountStringArray[i],out NpcCount[i]); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DesignDebug.Log(ex); |
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | } |
| | | } |
| | | |