Esempio n. 1
0
        public override IQuestAction CreateNew(string source, Quest parentQuest)
        {
            // Source must match pattern
            Match match = Test(source);

            if (!match.Success)
            {
                return(null);
            }

            // Factory new action
            DialogLink action = new DialogLink(parentQuest);

            if (!string.IsNullOrEmpty(match.Groups["aSite"].Value))
            {
                action.placeSymbol = new Symbol(match.Groups["aSite"].Value);
            }
            if (!string.IsNullOrEmpty(match.Groups["anNPC"].Value))
            {
                action.npcSymbol = new Symbol(match.Groups["anNPC"].Value);
            }
            if (!string.IsNullOrEmpty(match.Groups["anItem"].Value))
            {
                action.itemSymbol = new Symbol(match.Groups["anItem"].Value);
            }

            return(action);
        }
Esempio n. 2
0
        public override IQuestAction CreateNew(string source, Quest parentQuest)
        {
            // Source must match pattern
            Match match = Test(source);

            if (!match.Success)
            {
                return(null);
            }

            // Factory new action
            DialogLink action = new DialogLink(parentQuest);

            return(action);
        }