diff --git a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Finalization/MissingLegacyRemasterProcessorFactory.cs b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Finalization/MissingLegacyRemasterProcessorFactory.cs index 2a09d99..8e25adb 100644 --- a/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Finalization/MissingLegacyRemasterProcessorFactory.cs +++ b/Pf2eDataScrapper/Importers/Implementations/Aonprd/Processors/Finalization/MissingLegacyRemasterProcessorFactory.cs @@ -71,6 +71,8 @@ internal class MissingLegacyRemasterProcessor(string legacyId, string remasterId Entity legacyEntity = GetEntity(LegacyId); Entity remasterEntity = GetEntity(RemasterId); + TestExist(legacyEntity, remasterEntity); + Context.LegacyRemasters.Add( new() { LegacyId = legacyEntity.Id, RemasterId = remasterEntity.Id } ); @@ -83,6 +85,18 @@ internal class MissingLegacyRemasterProcessor(string legacyId, string remasterId } } + public void TestExist(Entity legacyEntity, Entity remasterEntity) + { + if ( + Context + .LegacyRemasters.AsNoTracking() + .Any(x => x.LegacyId == legacyEntity.Id && x.RemasterId == remasterEntity.Id) + ) + { + throw new SilentSkipItemException(); + } + } + public void Save() { Context.SaveChanges(); diff --git a/Pf2eDataScrapper/Importers/Implementations/FoundryEn/Processors/FoundryEnAbstractProcessor.cs b/Pf2eDataScrapper/Importers/Implementations/FoundryEn/Processors/FoundryEnAbstractProcessor.cs index bd24e9c..3057261 100644 --- a/Pf2eDataScrapper/Importers/Implementations/FoundryEn/Processors/FoundryEnAbstractProcessor.cs +++ b/Pf2eDataScrapper/Importers/Implementations/FoundryEn/Processors/FoundryEnAbstractProcessor.cs @@ -82,7 +82,7 @@ internal abstract class FoundryEnAbstractProcessor( /// public virtual void CheckEntity() { - string id = Input.GetRequired("id"); + string id = Input.GetRequired("_id"); if (Globals.Ignore.Any(s => s == id)) { diff --git a/Pf2eDataScrapper/Resources/ImportAdaptation.json b/Pf2eDataScrapper/Resources/ImportAdaptation.json index 71fe152..fbee6df 100644 --- a/Pf2eDataScrapper/Resources/ImportAdaptation.json +++ b/Pf2eDataScrapper/Resources/ImportAdaptation.json @@ -91,7 +91,7 @@ "Mystery": "Oracle", "Conscious Mind": "Psychic", "Subconscious Mind": "Psychic", - "Hunters Edge": "Ranger", + "Hunter's Edge": "Ranger", "Racket": "Rogue", "Bloodline": "Sorcerer", "Style": "Swashbuckler",