예제 #1
0
        /// <summary>
        /// Get full description of stage
        /// </summary>
        /// <param name="stageID">Stage ID to use</param>
        /// <returns>Full description for stage</returns>
        public static string GetFullDescriptionForStage(string stageID)
        {
            List <XmlDataNode> foundDataNodes = DM.GameInfos.staticInfos["StageInfo"].rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Stage",
                                                                                                                                    attributeToCheck: new Dictionary <string, string>()
            {
                { "id", stageID }
            });

            if (foundDataNodes.Count <= 0)
            {
                foundDataNodes = DM.EditGameData_StageInfo.StaticStageInfo.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Stage",
                                                                                                                         attributeToCheck: new Dictionary <string, string>()
                {
                    { "id", stageID }
                });
            }

            if (foundDataNodes.Count > 0)
            {
                XmlDataNode STAGE_NODE  = foundDataNodes[0];
                string      STAGE_ID    = STAGE_NODE.GetAttributesSafe("id");
                string      CHPATER_NUM = STAGE_NODE.GetInnerTextByPath("Chapter");

                string STAGE_DES   = LocalizedGameDescriptions.GetDescriptionForStage(STAGE_ID);
                string CHAPTER_DES = LocalizedGameDescriptions.GetDescriptionForChapter(CHPATER_NUM);
                return($"{CHAPTER_DES} / {STAGE_DES}:{STAGE_ID}");
            }
            else
            {
                return($"Stage ID :{stageID}");
            }
        }
예제 #2
0
        /// <summary>
        /// Get full description for Card
        /// </summary>
        /// <param name="cardID">Card id to use</param>
        /// <returns>Card full desscription</returns>
        public static string GetFullDescriptionForCard(string cardID)
        {
            List <XmlDataNode> foundDataNodes = DM.GameInfos.staticInfos["Card"].rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Card",
                                                                                                                               attributeToCheck: new Dictionary <string, string>()
            {
                { "ID", cardID }
            });

            if (foundDataNodes.Count <= 0)
            {
                foundDataNodes = DM.EditGameData_CardInfos.StaticCard.rootDataNode.GetXmlDataNodesByPathWithXmlInfo("Card",
                                                                                                                    attributeToCheck: new Dictionary <string, string>()
                {
                    { "ID", cardID }
                });
            }

            if (foundDataNodes.Count > 0)
            {
                XmlDataNode CARD_NODE     = foundDataNodes[0];
                string      CARD_NAME_DES = LocalizedGameDescriptions.GetDecriptionForCard(CARD_NODE.GetAttributesSafe("ID"));
                string      CHAPTER_DES   = LocalizedGameDescriptions.GetDescriptionForChapter(CARD_NODE.GetInnerTextByPath("Chapter"));
                string      DIV_INFO_DES  = GetDivideInfo.GetDividedCardInfo(cardID);

                return($"{DIV_INFO_DES} {CHAPTER_DES} / {CARD_NAME_DES}:{cardID}");
            }
            else
            {
                return($"Card ID :{cardID}");
            }
        }