From a3a7578fd994a4508679e4d969f5f518b443c2bb Mon Sep 17 00:00:00 2001 From: kozhilya Date: Mon, 15 Sep 2025 11:39:24 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B5=D0=B9=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D0=B8=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BE=D1=81?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BE=D0=B1=D0=BD=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MissingLegacyRemasterProcessorFactory.cs | 14 ++++++++++++++ .../Processors/FoundryEnAbstractProcessor.cs | 2 +- Pf2eDataScrapper/Resources/ImportAdaptation.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) 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",