//Unlock이 True인 NPc의 Ment들을 로드한다. public MentList LoadXml_Npc_Ment(string name) { MentList mentList = new MentList(); XmlDocument doc = LoadXml("ExternalData/Npc/" + name + ".xml"); XmlNode node = doc.SelectSingleNode("npc/greeting"); XmlNodeList nodes = node.SelectNodes("desc"); mentList.greeting = LoadMent(nodes[0], "ment"); MentArray[] greeting_Front = new MentArray[2]; for (int i = 0; i < 2; i++) { greeting_Front[i] = LoadMentArray(nodes[i + 1]); } mentList.greeting_Front_Favor = greeting_Front; node = doc.SelectSingleNode("npc/keyword"); nodes = node.SelectNodes("key"); for (int i = 0; i < nodes.Count; i++) { string value = nodes[i].Attributes["id"].Value; switch (value) { case "like": mentList.keyword_Like = LoadMent(nodes[i]); break; case "nomal": mentList.keyword_Nomal = LoadMent(nodes[i]); break; case "hate": mentList.keyword_Hate = LoadMent(nodes[i]); break; case "none": mentList.keyword_None = LoadMent(nodes[i]); break; default: int num = Convert.ToInt32(value); mentList.keyword.Add(new MentArray_Keyword(num, LoadMentArray(nodes[i]))); break; } } return(mentList); }
public void LoadMent() { mentList = DataController.Instance.LoadXml_Npc_Ment(NpcData.Instance.npcName[num]); }