| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, February 07, 2018 |
| | | // [ Date ]: Tuesday, February 12, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public partial class DailyQuestConfig : ConfigBase { |
| | | |
| | | public int ID { get ; private set ; } |
| | | public string Title { get ; private set; } |
| | | public int RelatedType { get ; private set ; } |
| | | public int RelatedID { get ; private set ; } |
| | | public int UnLockFuncID { get ; private set ; } |
| | | public int OnceActivityTime { get ; private set ; } |
| | | public int OnceActivity { get ; private set ; } |
| | | public int TotalActiveValue { get ; private set ; } |
| | | public int ID; |
| | | public string Title; |
| | | public int RelatedType; |
| | | public int RelatedID; |
| | | public int UnLockFuncID; |
| | | public int OnceActivityTime; |
| | | public int OnceActivity; |
| | | public int TotalActiveValue; |
| | | public int[] RewardID; |
| | | public string Icon { get ; private set; } |
| | | public string Description { get ; private set; } |
| | | public string QuestTypeDescribe { get ; private set; } |
| | | public int order { get ; private set ; } |
| | | public string Icon; |
| | | public string Description; |
| | | public string QuestTypeDescribe; |
| | | public int order; |
| | | |
| | | public override string getKey() |
| | | { |
| | | return ID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | public override void Parse(string content) { |
| | | try |
| | | { |
| | | ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | var contents = content.Split('\t'); |
| | | |
| | | int.TryParse(contents[0],out ID); |
| | | |
| | | Title = rawContents[1].Trim(); |
| | | Title = contents[1]; |
| | | |
| | | RelatedType=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | int.TryParse(contents[2],out RelatedType); |
| | | |
| | | RelatedID=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | | int.TryParse(contents[3],out RelatedID); |
| | | |
| | | UnLockFuncID=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; |
| | | int.TryParse(contents[4],out UnLockFuncID); |
| | | |
| | | OnceActivityTime=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; |
| | | int.TryParse(contents[5],out OnceActivityTime); |
| | | |
| | | OnceActivity=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; |
| | | int.TryParse(contents[6],out OnceActivity); |
| | | |
| | | TotalActiveValue=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; |
| | | int.TryParse(contents[7],out TotalActiveValue); |
| | | |
| | | string[] RewardIDStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | var RewardIDStringArray = contents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RewardID = new int[RewardIDStringArray.Length]; |
| | | for (int i=0;i<RewardIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RewardIDStringArray[i],out RewardID[i]); |
| | | } |
| | | |
| | | Icon = rawContents[9].Trim(); |
| | | Icon = contents[9]; |
| | | |
| | | Description = rawContents[10].Trim(); |
| | | Description = contents[10]; |
| | | |
| | | QuestTypeDescribe = rawContents[11].Trim(); |
| | | QuestTypeDescribe = contents[11]; |
| | | |
| | | order=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; |
| | | int.TryParse(contents[12],out order); |
| | | } |
| | | catch (Exception ex) |
| | | { |