/// <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); }
/// <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); }
/// <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); }
/// <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)); }