示例#1
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();
                        }
                    }
                }
            }
        }
示例#2
0
        private void ReplaceKeyToString_Say(int nDialogID, SHDialogSay dialogSay, SHStringXml DialogString)
        {
            m_nSaySelectID++;

            string szKey = "DIALOG_SAY_TEXT_" + nDialogID.ToString() + "_" + m_nSaySelectID.ToString();

            if (DialogString.IsValid(szKey))
            {
                dialogSay.text = DialogString[szKey].ToString();
            }

            foreach (SHDialogSelect dialogSelect in dialogSay.dataList)
            {
                ReplaceKeyToString_Select(nDialogID, dialogSelect, DialogString);
            }
        }
示例#3
0
        private void ReplaceKeyToString_Select(int nDialogID, SHDialogSelect dialogSelect, SHStringXml DialogString)
        {
            m_nSaySelectID++;

            string szKey = "DIALOG_SELECT_TEXT_" + nDialogID.ToString() + "_" + m_nSaySelectID.ToString();

            if (DialogString.IsValid(szKey))
            {
                dialogSelect.text = DialogString[szKey].ToString();
            }

            if (dialogSelect.Say != null)
            {
                ReplaceKeyToString_Say(nDialogID, dialogSelect.Say, DialogString);
            }
        }
示例#4
0
        public void ReplaceKeyToString(ref SHDialogsXml Dialogs, ref SHStringXml DialogString, bool bReplaceDialogText)
        {
            foreach (SHDialog dialog in Dialogs.dataList)
            {
                m_nSaySelectID = 0;

                string szKey;

                if (bReplaceDialogText)
                {
                    szKey = "DIALOG_TEXT_" + dialog.id.ToString();

                    if (DialogString.IsValid(szKey))
                    {
                        dialog.text = DialogString[szKey].ToString();
                    }
                }

                if (dialog.Say != null)
                {
                    ReplaceKeyToString_Say(dialog.id, dialog.Say, DialogString);
                }
            }
        }