Exemplo n.º 1
0
		public static void LoadFromXml(QuestInfo info, XmlNode node)
		{
			foreach (XmlAttribute attribute in node.Attributes)
			{
				switch (attribute.Name)
				{
					case "ID":
						info.ID = Convert.ToInt32(attribute.Value);
						break;

					case "Type":
						info.QuestType = (QuestType)Convert.ToInt32(attribute.Value);
						break;

					case "DailyLevel":
						info.DailyLevel = (DailyQuestLevel)Convert.ToInt32(attribute.Value);
						break;

					case "Repeat":
						info.Repeat = Convert.ToByte(attribute.Value);
						break;

					case "SuggestNPC":
						info.QuestSuggestNpcID = Convert.ToInt32(attribute.Value);
						break;

					case "CompleteNPC":
						info.QuestCompleteNpcID = Convert.ToInt32(attribute.Value);
						break;

					case "MapID":
						info.QuestMapID = Convert.ToInt32(attribute.Value);
						break;

					case "ClearType":
						info.QuestClearType = (QuestClearType)Convert.ToInt32(attribute.Value);
						break;

					case "ClearPrice":
						info.ClearPrice = Convert.ToInt32(attribute.Value);
						break;

					case "QuestLocationNameID":
						info.QuestLocationNameID = Convert.ToInt32(attribute.Value);
						break;

					case "QuestGuideDirection":
						info.QuestGuideDirect = (QuestGuideDirection)Enum.Parse(typeof(QuestGuideDirection), attribute.Value, true);
						break;

					case "Party":
						info.PartyQuest = bool.Parse(attribute.Value);
						break;

					case "NpcDailyGroupID":
						info.NpcDailyGroupID = Int32.Parse(attribute.Value);
						break;
				}
			}
		}
Exemplo n.º 2
0
 public void Reset()
 {
     NowQuestProgressState = QuestProgressState.QUEST_PROGRESS_NOTHING;
     Info                  = new QuestInfo();
     Condition             = new QuestCondition();
     Preparation           = new QuestPreparation();
     Talk                  = new QuestTalk();
     Achievement           = new QuestAchievement();
     dicQuestTalks.Clear();
 }