Пример #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);
        }
Пример #2
0
        public void ReplaceKeyToString(ref SHQuestsXml Quests, ref SHStringXml QuestString, bool bReplaceTitle)
        {
            foreach (SHQuest quest in Quests.dataList)
            {
                string szKey;

                if (bReplaceTitle)
                {
                    szKey = "QUEST_TITLE_" + quest.id.ToString();

                    if (QuestString.IsValid(szKey))
                    {
                        quest.title = QuestString[szKey].ToString();
                    }
                }

                szKey = "QUEST_DESC_" + quest.id.ToString();

                if (QuestString.IsValid(szKey))
                {
                    quest.desc = QuestString[szKey].ToString();
                }

                szKey = "QUEST_CATEGORY_" + quest.id.ToString();

                if (QuestString.IsValid(szKey))
                {
                    quest.category = QuestString[szKey].ToString();
                }

                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() + "_" + obj.id.ToString();

                        if (QuestString.IsValid(szKey))
                        {
                            obj.desc = QuestString[szKey].ToString();
                        }
                    }
                }
            }
        }
Пример #3
0
        public void ReplaceStringToKey(ref SHQuestsXml Quests)
        {
            foreach (SHQuest quest in Quests.dataList)
            {
                //                quest.title = "QUEST_TITLE_" + quest.id.ToString();
                quest.desc     = "QUEST_DESC_" + quest.id.ToString();
                quest.category = "QUEST_CATEGORY_" + quest.id.ToString();

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

                        obj.desc = "QUEST_OBJ_DESC_" + quest.id.ToString() + "_" + obj.id.ToString();
                    }
                }
            }
        }
Пример #4
0
        public object Clone()
        {
            SHQuestObjective clone = new SHQuestObjective();

            clone._id         = this._id;
            clone.idSpecified = this.idSpecified;

            clone._desc         = this._desc;
            clone.descSpecified = this.descSpecified;

            clone._type         = this._type;
            clone.typeSpecified = this.typeSpecified;

            clone._param1         = this._param1;
            clone.param1Specified = this.param1Specified;

            clone._param2         = this._param2;
            clone.param2Specified = this.param2Specified;

            clone._field         = this._field;
            clone.fieldSpecified = this.fieldSpecified;

            clone._marker         = this._marker;
            clone.markerSpecified = this.markerSpecified;

            clone._field2         = this._field2;
            clone.field2Specified = this.field2Specified;

            clone._marker2         = this._marker2;
            clone.marker2Specified = this.marker2Specified;

            clone._public_progress         = this._public_progress;
            clone.public_progressSpecified = this.public_progressSpecified;


            return(clone);
        }
Пример #5
0
 public void Add(SHQuestObjective i)
 {
     dataList.Add(i);
 }