/// <summary> /// Returns the value object to use /// </summary> /// <param name="project">Project</param> /// <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(GoNorthProject project, ShowFloatingTextAboveObjectActionRenderer.FloatingTextActionData parsedData, KortistoNpc npc, ExportPlaceholderErrorCollection errorCollection) { if (_isPlayer) { return(await _cachedDbAccess.GetPlayerNpc(project.Id)); } return(npc); }
/// <summary> /// Returns the value object to use /// </summary> /// <param name="project">Project</param> /// <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(GoNorthProject project, ShowFloatingTextAboveObjectActionRenderer.FloatingTextActionData parsedData, FlexFieldObject flexFieldObject, ExportPlaceholderErrorCollection errorCollection) { if (string.IsNullOrEmpty(parsedData.NpcId)) { return(null); } return(await _cachedDbAccess.GetNpcById(parsedData.NpcId)); }