コード例 #1
0
        /// <summary>
        /// Returns the value object to use
        /// </summary>
        /// <param name="parsedData">Parsed data</param>
        /// <param name="flexFieldObject">Flex field object</param>
        /// <param name="errorCollection">Error Collection</param>
        /// <returns>Value Object</returns>
        protected override async Task <IFlexFieldExportable> GetValueObject(ValueActionRenderBase.ValueFieldActionData parsedData, FlexFieldObject flexFieldObject, ExportPlaceholderErrorCollection errorCollection)
        {
            AikaQuest quest = await _cachedDbAccess.GetQuestById(parsedData.ObjectId);

            if (quest == null)
            {
                errorCollection.AddDialogQuestNotFoundError();
                return(null);
            }

            return(quest);
        }
コード例 #2
0
        /// <summary>
        /// Returns the value object to use
        /// </summary>
        /// <param name="parsedData">Parsed data</param>
        /// <param name="flexFieldObject">Flex field object</param>
        /// <param name="errorCollection">Error Collection</param>
        /// <returns>Value Object</returns>
        protected override async Task <IFlexFieldExportable> GetValueObject(ValueActionRenderBase.ValueFieldActionData parsedData, FlexFieldObject flexFieldObject, ExportPlaceholderErrorCollection errorCollection)
        {
            EvneSkill skill = await _cachedDbAccess.GetSkillById(parsedData.ObjectId);

            if (skill == null)
            {
                errorCollection.AddDialogSkillNotFoundError();
                return(null);
            }

            return(skill);
        }
コード例 #3
0
        /// <summary>
        /// Returns the value object to use
        /// </summary>
        /// <param name="parsedData">Parsed data</param>
        /// <param name="npc">Npc</param>
        /// <param name="errorCollection">Error Collection</param>
        /// <returns>Value Object</returns>
        protected override async Task <IFlexFieldExportable> GetValueObject(ValueActionRenderBase.ValueFieldActionData parsedData, KortistoNpc npc, ExportPlaceholderErrorCollection errorCollection)
        {
            if (_isPlayer)
            {
                GoNorthProject curProject = await _cachedDbAccess.GetDefaultProject();

                npc = await _cachedDbAccess.GetPlayerNpc(curProject.Id);

                if (npc == null)
                {
                    errorCollection.AddNoPlayerNpcExistsError();
                    return(null);
                }
            }

            return(npc);
        }
コード例 #4
0
 /// <summary>
 /// Returns the value object to use
 /// </summary>
 /// <param name="parsedData">Parsed data</param>
 /// <param name="flexFieldObject">Flex field object</param>
 /// <param name="errorCollection">Error Collection</param>
 /// <returns>Value Object</returns>
 protected override Task <IFlexFieldExportable> GetValueObject(ValueActionRenderBase.ValueFieldActionData parsedData, FlexFieldObject flexFieldObject, ExportPlaceholderErrorCollection errorCollection)
 {
     return(Task.FromResult(flexFieldObject as IFlexFieldExportable));
 }