コード例 #1
0
        protected override bool TestRunInt(Slate slate)
        {
            string value = prefix.GetValue(slate);
            List <Slate.VarRestoreInfo> varsRestoreInfo = QuestGenUtility.SetVarsForPrefix(parms, value, slate);

            if (!value.NullOrEmpty())
            {
                slate.PushPrefix(value, allowNonPrefixedLookup.GetValue(slate));
            }
            try
            {
                return(def.GetValue(slate).root.TestRun(slate));
            }
            finally
            {
                if (!value.NullOrEmpty())
                {
                    slate.PopPrefix();
                }
                QuestGenUtility.GetReturnedVars(returnVarNames, value, slate);
                QuestGenUtility.RestoreVarsForPrefix(varsRestoreInfo, slate);
            }
        }
コード例 #2
0
        protected override void RunInt()
        {
            Slate  slate = QuestGen.slate;
            string value = prefix.GetValue(slate);
            List <Slate.VarRestoreInfo> varsRestoreInfo = QuestGenUtility.SetVarsForPrefix(parms, value, QuestGen.slate);

            if (!value.NullOrEmpty())
            {
                QuestGen.slate.PushPrefix(value, allowNonPrefixedLookup.GetValue(slate));
            }
            try
            {
                def.GetValue(slate).Run();
            }
            finally
            {
                if (!value.NullOrEmpty())
                {
                    QuestGen.slate.PopPrefix();
                }
                QuestGenUtility.GetReturnedVars(returnVarNames, value, QuestGen.slate);
                QuestGenUtility.RestoreVarsForPrefix(varsRestoreInfo, QuestGen.slate);
            }
        }