Ejemplo n.º 1
0
        public void Save(SHQuestsXml Quests, ref SHStringXml QuestString)
        {
            // 문자열 저장
            File.Copy(SHGlobal.GetClientSystemFolder() + "\\lang\\ko_KR\\name_quest.xml", Directory.GetCurrentDirectory() + "\\Backup\\string_name_quest." + DateTime.Now.ToString("yy-MM-dd-HHmmss") + ".xml", true);

            QuestString.Clear();

            foreach (SHQuest quest in Quests.dataList)
            {
                string szKey = "QUEST_TITLE_" + quest.id.ToString();
                AddString(szKey, quest.title, ref QuestString);

                szKey = "QUEST_DESC_" + quest.id.ToString();
                AddString(szKey, quest.desc, ref QuestString);

                szKey = "QUEST_CATEGORY_" + quest.id.ToString();
                AddString(szKey, quest.category, ref QuestString);

                if (quest.Objectives != null)
                {
                    for (int r = 0; r < quest.Objectives.dataList.Count; r++)
                    {
                        SHQuestObjective obj = (SHQuestObjective)quest.Objectives.dataList[r];

                        szKey = "QUEST_OBJ_DESC_" + quest.id.ToString();
                        szKey = szKey + "_" + obj.id.ToString();
                        AddString(szKey, obj.desc, ref QuestString);
                    }
                }
            }
            QuestString.Compile();

            // Save
            SHGlobal.Serialize <SHStringXml>(SHGlobal.GetClientSystemFolder() + SHGlobal.Locale.Path(SHLocaleType.KO_KR) + "name_quest.xml", QuestString, Encoding.UTF8);
        }
Ejemplo n.º 2
0
        public void Save(SHDialogsXml Dialogs, ref SHStringXml DialogString)
        {
            // 문자열 저장
            File.Copy(SHGlobal.GetClientSystemFolder() + "\\lang\\ko_KR\\name_dialog.xml", Directory.GetCurrentDirectory() + "\\Backup\\string_name_dialog." + DateTime.Now.ToString("yy-MM-dd-HHmmss") + ".xml", true);

            DialogString.Clear();

            foreach (SHDialog dialog in Dialogs.dataList)
            {
                m_nSaySelectID = 0;

                string szKey = "DIALOG_TEXT_" + dialog.id.ToString();
                AddString(szKey, dialog.text, ref DialogString);

                if (dialog.Say != null)
                {
                    AddStringSay(dialog, dialog.Say, ref DialogString);
                }
            }

            DialogString.Compile();

            // Save
            SHGlobal.Serialize <SHStringXml>(SHGlobal.GetClientSystemFolder() + SHGlobal.Locale.Path(SHLocaleType.KO_KR) + "name_dialog.xml", DialogString, Encoding.UTF8);
        }