using System.IO; using XmlTool.Importers; namespace XmlTool { public partial class Form1 : Form { private readonly ImporterConfig? _config; private readonly List _profiles = new(); public Form1(ImporterConfig config) { _config = config; InitializeComponent(); InitializeProfiles(); } public Form1() { _config = TryLoadConfig(); InitializeComponent(); InitializeProfiles(); } private void Form1_Load(object sender, EventArgs e) { if (_config == null) { statusValueLabel.Text = "Config missing"; AppendLog($"config.txt is missing or invalid. Expected at: {DatabaseHelper.GetConfigPath()}"); return; } AppendLog($"Loaded config from: {_config.ConfigPath}"); AppendLog($"XML root path: {_config.XmlRootPath}"); if (profileComboBox.SelectedItem is ImportProfileViewModel selectedProfile) { statusValueLabel.Text = selectedProfile.StatusText; } } private void testConnectionButton_Click(object sender, EventArgs e) { bool success = DatabaseHelper.TestConnection(out string result); statusValueLabel.Text = success ? "Connection OK" : "Connection Error"; AppendLog(success ? "Database connection successful." : "Database connection failed."); MessageBox.Show( result, success ? "Connection OK" : "Connection Error", MessageBoxButtons.OK, success ? MessageBoxIcon.Information : MessageBoxIcon.Error ); } private void profileComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (profileComboBox.SelectedItem is not ImportProfileViewModel profile) { return; } descriptionValueLabel.Text = profile.Description; xmlPathValueTextBox.Text = ResolveProfileXmlPath(profile); targetTablesListBox.BeginUpdate(); targetTablesListBox.Items.Clear(); foreach (string targetTable in profile.TargetTables) { targetTablesListBox.Items.Add(targetTable); } targetTablesListBox.EndUpdate(); notesListBox.BeginUpdate(); notesListBox.Items.Clear(); foreach (string note in profile.Notes) { notesListBox.Items.Add(note); } notesListBox.EndUpdate(); validateButton.Enabled = profile.SupportsValidation; previewButton.Enabled = profile.SupportsValidation; importButton.Enabled = profile.SupportsImport && _config != null; statusValueLabel.Text = profile.StatusText; AppendLog($"Profile selected: {profile.Name}"); } private void validateButton_Click(object sender, EventArgs e) { if (profileComboBox.SelectedItem is not ImportProfileViewModel profile) { return; } string resolvedPath = ResolveProfileXmlPath(profile); if (!File.Exists(resolvedPath)) { statusValueLabel.Text = "Validation failed"; AppendLog($"Validation failed. XML not found: {resolvedPath}"); MessageBox.Show( $"XML file not found:\n{resolvedPath}", "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (profile.Name == "Digimon_List") { try { DigimonBaseInfoImportSummary summary = DigimonBaseInfoImporter.ValidateXml(resolvedPath); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for Digimon_List. Records found: {summary.RecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nRecords: {summary.RecordCount}\nTarget: Asset.DigimonBaseInfo", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Digimon_List: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Monster") { try { MonsterPackageImportSummary summary = MonsterPackageImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveMonsterSkillXmlPath()); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for Monster. Base records: {summary.MonsterRecordCount}, skill records: {summary.MonsterSkillRecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nMonster rows: {summary.MonsterRecordCount}\nMonster skill rows: {summary.MonsterSkillRecordCount}\nTargets: Asset.MonsterBaseInfo, Asset.MonsterSkill, Asset.MonsterSkillInfo", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Monster: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Buff") { try { BuffAssetImportSummary summary = BuffAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for Buff. Records found: {summary.RecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nRecords: {summary.RecordCount}\nTarget: Asset.Buff", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Buff: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Achieve") { try { AchievementAssetImportSummary summary = AchievementAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveAchieveHeaderXmlPath()); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for Achieve. Asset rows: {summary.RecordCount}, header rows: {summary.HeaderRecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nAsset rows ready for import: {summary.RecordCount}\nClient-only header rows: {summary.HeaderRecordCount}\nTarget: Asset.Achievement", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Achieve: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "DigimonEvo") { try { DigimonEvolutionImportSummary summary = DigimonEvolutionAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveBattleEvoXmlPath()); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for DigimonEvo. Evolutions: {summary.EvolutionRecordCount}, lines: {summary.EvolutionLineRecordCount}, stages: {summary.EvolutionStageRecordCount}, battle evo rows left client-side: {summary.BattleEvolutionRecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nEvolution rows: {summary.EvolutionRecordCount}\nEvolution line rows: {summary.EvolutionLineRecordCount}\nEvolution stage rows: {summary.EvolutionStageRecordCount}\nClient-only BattleEvo rows: {summary.BattleEvolutionRecordCount}\nTargets: Asset.Evolution, Asset.EvolutionLine, Asset.EvolutionStage", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for DigimonEvo: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Digimon_Book") { try { DigimonBookImportSummary summary = DigimonBookAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveDigimonBookDeckOptionXmlPath(), ResolveDigimonBookEncyclopediaExceptionXmlPath(), ResolveDigimonBookDeckCompositionXmlPath()); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for Digimon_Book. BookInfo XML rows: {summary.BookInfoXmlRecordCount}, synthetic rows: {summary.SyntheticBookInfoCount}, deck buff rows: {summary.DeckBuffRecordCount}, option rows: {summary.DeckBuffOptionRecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nBookInfo XML rows: {summary.BookInfoXmlRecordCount}\nSynthetic BookInfo rows added by importer: {summary.SyntheticBookInfoCount}\nDeck buff rows: {summary.DeckBuffRecordCount}\nDeck buff option rows: {summary.DeckBuffOptionRecordCount}\nClient-only EncyclopediaException rows: {summary.EncyclopediaExceptionRecordCount}\nClient-only DeckComposition rows: {summary.DeckCompositionRecordCount}\nTargets: Asset.DeckBookInfo, Asset.DeckBuff, Asset.DeckBuffOption", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Digimon_Book: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "DMBase") { try { DMBaseStatusApplyImportSummary summary = DMBaseStatusApplyImporter.ValidateXml(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for DMBase. StatusApply rows found: {summary.RecordCount}, tamer base rows: {summary.TamerBaseStatusRecordCount}, tamer level rows: {summary.TamerLevelStatusRecordCount}, digimon level rows: {summary.DigimonLevelStatusRecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nStatusApply rows ready for import: {summary.RecordCount}\nTamer base rows ready for import: {summary.TamerBaseStatusRecordCount}\nTamer level rows ready for import: {summary.TamerLevelStatusRecordCount}\nDigimon level rows ready for import: {summary.DigimonLevelStatusRecordCount}\nTargets: Asset.StatusApply, Asset.CharacterBaseStatus, Asset.CharacterLevelStatus, Asset.DigimonLevelStatus", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for DMBase: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Event") { try { EventAssetImportSummary summary = EventAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for Event. Monthly reward rows: {summary.MonthlyRecordCount}, time reward rows: {summary.TimeRewardRecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nMonthly reward rows ready for import: {summary.MonthlyRecordCount}\nTime reward groups in Event.xml: {summary.TimeRewardGroupCount}\nTime reward groups imported by current server: {summary.TimeRewardGroupCount - summary.IgnoredTimeRewardGroupCount}\nTime reward item rows ready for import: {summary.TimeRewardRecordCount}\nIgnored extra time reward groups until server supports them: {summary.IgnoredTimeRewardGroupCount}\nTargets: Asset.MonthlyEvent, Asset.TimeEvent", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Event: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "ExtraExchange") { try { ExtraEvolutionImportSummary summary = ExtraEvolutionAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for ExtraExchange. NPC rows: {summary.NpcRecordCount}, info rows: {summary.InformationRecordCount}, evolution rows: {summary.EvolutionRecordCount}, material rows: {summary.MaterialRecordCount}, required rows: {summary.RequiredRecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nNPC rows ready for import: {summary.NpcRecordCount}\nInfo rows ready for import: {summary.InformationRecordCount}\nEvolution rows ready for import: {summary.EvolutionRecordCount}\nMaterial rows ready for import: {summary.MaterialRecordCount}\nRequired rows ready for import: {summary.RequiredRecordCount}\nTargets: Asset.ExtraEvolutionNpc, Asset.ExtraEvolutionInformation, Asset.ExtraEvolution, Asset.ExtraEvolutionMaterial, Asset.ExtraEvolutionRequired", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for ExtraExchange: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "InfiniteWar") { try { InfiniteWarArenaDailyImportSummary summary = InfiniteWarArenaDailyImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveInfiniteWarStageInfoXmlPath(), ResolveInfiniteWarSummonMonsterXmlPath(), ResolveInfiniteWarRankRewardXmlPath(), ResolveInfiniteWarAwardNpcXmlPath()); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for InfiniteWar. Daily groups: {summary.DailyRewardGroupCount}, daily reward rows: {summary.DailyRewardItemCount}. Client-only rows - StageInfo: {summary.StageInfoRecordCount}, SummonMonster: {summary.SummonMonsterRecordCount}, RankReward: {summary.RankRewardRecordCount}, AwardNpc: {summary.AwardNpcRecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nArena daily reward groups ready for import: {summary.DailyRewardGroupCount}\nArena daily reward item rows ready for import: {summary.DailyRewardItemCount}\nClient-only StageInfo rows: {summary.StageInfoRecordCount}\nClient-only SummonMonster rows: {summary.SummonMonsterRecordCount}\nClient-only RankReward rows: {summary.RankRewardRecordCount}\nClient-only AwardNpc rows: {summary.AwardNpcRecordCount}\nTargets: Asset.ArenaDailyItemRewards, Asset.ArenaDailyItemReward", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for InfiniteWar: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "ItemList") { try { ItemListAssetImportSummary summary = ItemListAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveItemMakingXmlPath(), ResolveItemAccessoryXmlPath(), ResolveItemXaiXmlPath()); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for ItemList. ItemInfo rows: {summary.ItemInfoCount}, craft rows: {summary.ItemCraftCount}, craft material rows: {summary.ItemCraftMaterialCount}, accessory rows: {summary.AccessoryRollCount}, accessory status rows: {summary.AccessoryRollStatusCount}, xai rows: {summary.XaiCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nItemInfo rows ready for import: {summary.ItemInfoCount}\nItemCraft rows ready for import: {summary.ItemCraftCount}\nItemCraftMaterial rows ready for import: {summary.ItemCraftMaterialCount}\nAccessoryRoll rows ready for import: {summary.AccessoryRollCount}\nAccessoryRollStatus rows ready for import: {summary.AccessoryRollStatusCount}\nXai rows ready for import: {summary.XaiCount}\nTargets: Asset.ItemInfo, Asset.ItemCraft, Asset.ItemCraftMaterial, Asset.AccessoryRoll, Asset.AccessoryRollStatus, Asset.Xai", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for ItemList: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapList") { try { MapAssetImportSummary summary = MapAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for MapList. Map rows found: {summary.RecordCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nMap rows ready for import: {summary.RecordCount}\nTarget: Asset.Map", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for MapList: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapMonsterList") { try { MapMonsterListConfigSummary summary = _config == null ? MapMonsterListConfigImporter.ValidateXml(ResolveProfileXmlPath(profile)) : MapMonsterListConfigImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); statusValueLabel.Text = summary.MissingConfigMapCount == 0 && summary.MissingMonsterBaseInfoCount == 0 ? "Validation OK" : "Validation failed"; importButton.Enabled = profile.SupportsImport && _config != null && summary.MissingConfigMapCount == 0 && summary.MissingMonsterBaseInfoCount == 0; AppendLog($"Validation OK for MapMonsterList. Spawn groups: {summary.SpawnRecordCount}, expanded mobs: {summary.ExpandedMobRecordCount}, reward template types: {summary.RewardTemplateTypeCount}, missing reward template types: {summary.MissingRewardTemplateTypeCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nSpawn groups in XML: {summary.SpawnRecordCount}\nExpanded Config.Mob rows: {summary.ExpandedMobRecordCount}\nDistinct maps: {summary.DistinctMapCount}\nDistinct monster types: {summary.DistinctMonsterTypeCount}\nDuplicate spawn keys: {summary.DuplicateSpawnKeyCount}\nMissing Config.Map references: {summary.MissingConfigMapCount}\nMissing Asset.MonsterBaseInfo references: {summary.MissingMonsterBaseInfoCount}\nExisting reward template types reused: {summary.RewardTemplateTypeCount}\nMonster types that will get empty reward shells: {summary.MissingRewardTemplateTypeCount}\nTargets: Config.Mob, Config.MobLocation, Config.MobDropReward, Config.MobExpReward, Config.ItemDropReward, Config.BitsDropReward", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for MapMonsterList: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapNpc") { try { MapNpcAssetImportSummary summary = _config == null ? MapNpcAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)) : MapNpcAssetImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); bool valid = summary.MissingAssetMapCount == 0; statusValueLabel.Text = valid ? "Validation OK" : "Validation failed"; importButton.Enabled = valid && profile.SupportsImport && _config != null; AppendLog($"Validation {(valid ? "OK" : "failed")} for MapNpc. XML rows: {summary.XmlRecordCount}, importable rows: {summary.ImportableRecordCount}, missing Asset.Map refs: {summary.MissingAssetMapCount}."); MessageBox.Show( $"Validation {(valid ? "succeeded" : "failed")}.\n\nProfile: {profile.Name}\nXML rows: {summary.XmlRecordCount}\nImportable NPC/map rows: {summary.ImportableRecordCount}\nIgnored invalid/sentinel map rows: {summary.IgnoredInvalidMapCount}\nDistinct maps: {summary.DistinctMapCount}\nCurrent Asset.Npc rows: {summary.CurrentNpcCount}\nExisting XML rows already in DB: {summary.ExistingMatchCount}\nMissing rows that merge import can add: {summary.MissingNpcCount}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\n\nImport mode: non-destructive merge insert. Existing NPC IDs and child shop/portal rows are preserved.", valid ? "Validation OK" : "Validation Error", MessageBoxButtons.OK, valid ? MessageBoxIcon.Information : MessageBoxIcon.Error); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for MapNpc: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapPortal") { try { MapPortalAssetImportSummary summary = _config == null ? MapPortalAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)) : MapPortalAssetImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); bool valid = summary.DuplicatePortalIdCount == 0 && summary.MissingAssetMapCount == 0; statusValueLabel.Text = valid ? "Validation OK" : "Validation failed"; importButton.Enabled = profile.SupportsImport && _config != null && valid; AppendLog($"Validation {(valid ? "OK" : "failed")} for MapPortal. XML portals: {summary.XmlPortalCount}, existing matches: {summary.ExistingXmlPortalCount}, missing inserts: {summary.MissingXmlPortalCount}, DB-only preserved: {summary.PreservedDbOnlyPortalCount}."); MessageBox.Show( $"Validation {(valid ? "succeeded" : "failed")}.\n\nProfile: {profile.Name}\nPortal groups: {summary.PortalGroupCount}\nXML portal rows: {summary.XmlPortalCount}\nIgnored invalid destination rows: {summary.IgnoredInvalidDestinationPortalCount}\nDuplicate portal ids: {summary.DuplicatePortalIdCount}\nPortalCount mismatched groups: {summary.PortalCountMismatchGroupCount}\nDistinct source maps: {summary.DistinctSourceMapCount}\nDistinct destination maps: {summary.DistinctDestinationMapCount}\nLocal/same-map portals: {summary.LocalPortalCount}\nMissing destination Asset.Map references: {summary.MissingAssetMapCount}\n\nCurrent Asset.Portal rows: {summary.CurrentPortalCount}\nExisting XML portal ids to update: {summary.ExistingXmlPortalCount}\nMissing XML portal ids to insert: {summary.MissingXmlPortalCount}\nDB-only portal rows preserved: {summary.PreservedDbOnlyPortalCount}\nTarget: Asset.Portal", valid ? "Validation OK" : "Validation Warning", MessageBoxButtons.OK, valid ? MessageBoxIcon.Information : MessageBoxIcon.Warning); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for MapPortal: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Npc") { try { NpcPackageImportSummary summary = _config == null ? NpcPackageImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveNpcModelInfoXmlPath(), ResolveNpcEventXmlPath()) : NpcPackageImporter.AssessDatabase( _config.ConnectionString, ResolveProfileXmlPath(profile), ResolveNpcModelInfoXmlPath(), ResolveNpcEventXmlPath()); bool valid = summary.MissingAssetMapCount == 0; statusValueLabel.Text = valid ? "Validation OK" : "Validation failed"; importButton.Enabled = valid && profile.SupportsImport && _config != null; AppendLog($"Validation {(valid ? "OK" : "failed")} for Npc. Importable NPC rows: {summary.NpcRecordCount}, ignored no-map rows: {summary.IgnoredNoMapNpcCount}, empty portal blocks: {summary.IgnoredEmptyPortalCount}, trade items: {summary.TradeItemCount}, portal requirements: {summary.PortalRequirementCount}, missing Asset.Map refs: {summary.MissingAssetMapCount}."); MessageBox.Show( $"Validation {(valid ? "succeeded" : "failed")}.\n\nProfile: {profile.Name}\nImportable NPC rows: {summary.NpcRecordCount}\nIgnored no-map NPC rows: {summary.IgnoredNoMapNpcCount}\nIgnored empty portal blocks: {summary.IgnoredEmptyPortalCount}\nDistinct NPC ids: {summary.DistinctNpcCount}\nDistinct maps: {summary.DistinctMapCount}\nShop NPC rows: {summary.ShopNpcCount}\nTrade item rows: {summary.TradeItemCount}\nPortal NPC rows: {summary.PortalNpcCount}\nPortal entries: {summary.PortalEntryCount}\nPortal requirement rows: {summary.PortalRequirementCount}\nModelInfo rows client-side only: {summary.ModelInfoCount}\nNpcEvent rows client-side only: {summary.NpcEventCount}\nCurrent Asset.Npc rows: {summary.CurrentNpcCount}\nExisting XML NPC/map rows already in DB: {summary.ExistingNpcCount}\nMissing NPC/map rows that import can add: {summary.MissingNpcCount}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\nExisting child rows for XML NPCs: items {summary.ExistingNpcItemCount}, portals {summary.ExistingNpcPortalCount}, portal entry rows {summary.ExistingNpcPortalAmountCount}, portal requirements {summary.ExistingNpcPortalRequirementCount}\n\nImport mode: insert missing Asset.Npc rows, then rebuild NpcItem/NpcPortal children only for NPC rows present in Npc.xml.", valid ? "Validation OK" : "Validation Error", MessageBoxButtons.OK, valid ? MessageBoxIcon.Information : MessageBoxIcon.Error); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Npc: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapObject") { try { MapObjectProfileSummary summary = _config == null ? MapObjectProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)) : MapObjectProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for MapObject. Map groups: {summary.MapGroupCount}, buckets: {summary.ObjectBucketCount}, map objects: {summary.MapObjectCount}, factors: {summary.FactorCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nMap groups: {summary.MapGroupCount}\nObject buckets: {summary.ObjectBucketCount}\nMap object rows: {summary.MapObjectCount}\nFactor rows: {summary.FactorCount}\nDistinct maps: {summary.DistinctMapCount}\nDistinct object ids: {summary.DistinctObjectIdCount}\nOpen types: {summary.OpenTypes}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\n\nNo SQL import is enabled because the current server schema has no Asset.MapObject or Config.MapObject table.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for MapObject: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MasterCard") { try { MasterCardProfileSummary summary = MasterCardProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for MasterCard. Cards: {summary.MasterCardCount}, card grades: {summary.MasterCardGradeCount}, filters: {summary.MasterFilterCount}, leaders: {summary.LeaderCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nMaster card rows: {summary.MasterCardCount}\nCard grade rows: {summary.MasterCardGradeCount}\nLeader rows: {summary.LeaderCount}\nLeader ability rows: {summary.LeaderAbilityCount}\nLeader ability term rows: {summary.LeaderAbilityTermCount}\nMaster filter rows: {summary.MasterFilterCount}\nDistinct seal item ids in filters: {summary.DistinctSealItemCount}\nDigimon image path rows: {summary.DigimonImagePathCount}\nAttribute rows: {summary.AttributeCount}\nElemental rows: {summary.ElementalCount}\nPlate path rows: {summary.PlatePathCount}\nDuplicate card ids: {summary.DuplicateCardIdCount}\nDuplicate leader ids: {summary.DuplicateLeaderIdCount}\n\nNo SQL import is enabled because the current server schema/source has no matching MasterCard/SealMaster asset tables.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for MasterCard: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Nature") { try { NatureProfileSummary summary = NatureProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for Nature. Nature rows: {summary.NatureCount}, nature matrix rows: {summary.NatureElementCount}, base-element points: {summary.PointCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nNature rows: {summary.NatureCount}\nNature element matrix rows: {summary.NatureElementCount}\nNature ids: {summary.NatureIds}\nNature value range: {summary.NatureValueRange}\nBaseElement compare types: {summary.CompareTypeCount} ({summary.CompareTypes})\nBaseElement base-type rows: {summary.BaseTypeCount}\nBaseElement point rows: {summary.PointCount}\nBaseElement value range: {summary.BaseElementValueRange}\nDuplicate nature ids: {summary.DuplicateNatureIdCount}\n\nNo SQL import is enabled because the current server uses hardcoded enum/helper logic for attribute and element advantage instead of database tables.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Nature: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "New_Element") { try { NewElementProfileSummary summary = NewElementProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for New_Element. Attribute UI rows: {summary.AttributeTypeUiCount}, nature UI rows: {summary.NatureTypeUiCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nAttributeTypeUI rows: {summary.AttributeTypeUiCount}\nAttribute ids: {summary.AttributeIds}\nNatureTypeUI rows: {summary.NatureTypeUiCount}\nNature ids: {summary.NatureIds}\nDuplicate attribute ids: {summary.DuplicateAttributeIdCount}\nDuplicate nature ids: {summary.DuplicateNatureIdCount}\n\nNo SQL import is enabled because these XML files contain client UI icon/gauge placement data.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for New_Element: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Passive_Ability") { try { PassiveAbilityProfileSummary summary = PassiveAbilityProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for Passive_Ability. Passive types: {summary.PassiveTypeCount}, entries: {summary.EntryCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nPassive type rows: {summary.PassiveTypeCount}\nType ids: {summary.TypeIds}\nPassive entries: {summary.EntryCount}\nDuplicate type ids: {summary.DuplicateTypeCount}\n\nNo SQL import is enabled because PassiveAbility.xml currently contains only an empty passive ability table and the current server schema/source has no PassiveAbility table.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Passive_Ability: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Quest") { try { QuestAssetImportSummary summary = _config == null ? QuestAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)) : QuestAssetImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for Quest. Quests: {summary.QuestCount}, conditions: {summary.ConditionCount}, goals: {summary.GoalCount}, rewards: {summary.RewardCount}, supplies: {summary.SupplyCount}, events: {summary.EventCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nQuest rows: {summary.QuestCount}\nCondition rows: {summary.ConditionCount}\nGoal rows: {summary.GoalCount}\nReward rows: {summary.RewardCount}\nReward object rows: {summary.RewardObjectCount}\nSupply rows: {summary.SupplyCount}\nEvent rows: {summary.EventCount}\nUnsupported reward type rows kept for XML fidelity: {summary.UnsupportedRewardTypeCount}\n\nCurrent DB rows\nAsset.Quest: {summary.CurrentQuestCount}\nAsset.QuestCondition: {summary.CurrentConditionCount}\nAsset.QuestGoal: {summary.CurrentGoalCount}\nAsset.QuestReward: {summary.CurrentRewardCount}\nAsset.QuestRewardObject: {summary.CurrentRewardObjectCount}\nAsset.QuestSupply: {summary.CurrentSupplyCount}\nAsset.QuestEvent: {summary.CurrentEventCount}\n\nImport mode: full replace of static Asset quest tables only. Character.InProgressQuest is player progress and is not touched.", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Quest: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Passive_Ability") { try { PassiveAbilityProfileSummary summary = PassiveAbilityProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Passive_Ability. Passive types: {summary.PassiveTypeCount}, entries: {summary.EntryCount}."); MessageBox.Show( $"Passive_Ability summary\n\nPassive type rows: {summary.PassiveTypeCount}\nType ids: {summary.TypeIds}\nPassive entries: {summary.EntryCount}\nDuplicate type ids: {summary.DuplicateTypeCount}\n\nCurrent decision\nNo import is available. PassiveAbility.xml currently contains one passive type with an empty list, and there is no matching Asset/Config/Character passive-ability table in the current server schema.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Passive_Ability: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Reward") { try { RewardProfileSummary summary = _config == null ? RewardProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)) : RewardProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); statusValueLabel.Text = "No import required"; importButton.Enabled = false; AppendLog($"Validation OK for Reward. Server groups: {summary.ServerGroupCount}, reward rows: {summary.RewardCount}, active rows: {summary.ActiveRewardCount}, missing Asset.ItemInfo refs: {summary.MissingItemInfoCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nServer groups: {summary.ServerGroupCount}\nServer indexes: {summary.ServerIndexes}\nReward rows: {summary.RewardCount}\nActive reward rows now: {summary.ActiveRewardCount}\nFuture reward rows: {summary.FutureRewardCount}\nExpired reward rows: {summary.ExpiredRewardCount}\nReward ID range: {summary.MinRewardId} to {summary.MaxRewardId}\nDistinct reward ids: {summary.DistinctRewardIdCount}\nDuplicate reward ids within same server: {summary.DuplicateRewardIdWithinServerCount}\nDistinct item codes: {summary.DistinctItemCodeCount}\nMissing Asset.ItemInfo references: {summary.MissingItemInfoCount}\nDate range: {summary.DateRange}\n\nNo SQL import is needed for the current package because every Reward.xml row is historical/expired. The current server also has no active scheduled-reward runtime; RewardStorage is only a player storage shell.", "Validation OK - No Import Required", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Reward: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Ride") { try { RideProfileSummary summary = _config == null ? RideProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)) : RideProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Server update required"; importButton.Enabled = false; AppendLog($"Validation OK for Ride. Ride rows: {summary.RideCount}, open item rows: {summary.OpenInfoCount}, missing DigimonBaseInfo refs: {summary.MissingDigimonBaseInfoCount}, missing ItemInfo refs: {summary.MissingItemInfoCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nRide rows: {summary.RideCount}\nDistinct digimon ids: {summary.DistinctDigimonCount}\nDigimon id range: {summary.DigimonIdRange}\nDuplicate digimon ids: {summary.DuplicateDigimonIdCount}\nRide types: {summary.RideTypes}\nChange ride values: {summary.ChangeRideValues}\nMove speed range: {summary.MoveSpeedRange}\nRun animation rate range: {summary.AnimationRateRange}\nOpenInfo rows: {summary.OpenInfoCount}\nEmpty OpenInfo slots: {summary.EmptyOpenInfoSlotCount}\nInvalid OpenInfo slots: {summary.InvalidOpenInfoSlotCount}\nDistinct unlock item ids: {summary.DistinctOpenItemCount}\nUnlock item count range: {summary.NeedCountRange}\nMissing Asset.DigimonBaseInfo references: {summary.MissingDigimonBaseInfoCount}\nMissing Asset.ItemInfo references: {summary.MissingItemInfoCount}\n\nNo SQL import is enabled because the current server has ride packets and per-digimon runtime unlock flags, but no static Ride asset/config table for Ride.xml's speed, ride type, and unlock item rules.", "Validation OK - Server Update Required", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Ride: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Scene") { try { SceneProfileSummary summary = _config == null ? SceneProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)) : SceneProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for Scene. Scenes: {summary.SceneCount}, actions: {summary.ActionCount}, targets: {summary.SceneTargetCount}, maps: {summary.DistinctMapCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nScene rows: {summary.SceneCount}\nUsed scenes: {summary.UsedSceneCount}\nSkippable scenes: {summary.SkippableSceneCount}\nAction/dialogue rows: {summary.ActionCount}\nScene target rows: {summary.SceneTargetCount}\nScene ID range: {summary.SceneIdRange}\nDistinct maps: {summary.DistinctMapCount}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\nDistinct referenced scene targets: {summary.DistinctReferencedTargetCount}\nMissing SceneTargets references: {summary.MissingSceneTargetReferenceCount}\nActions with effect file: {summary.ActionWithEffectCount}\nActions with sound file: {summary.ActionWithSoundCount}\nDuplicate scene ids: {summary.DuplicateSceneIdCount}\nDuplicate target UIDs: {summary.DuplicateSceneTargetUidCount}\n\nNo SQL import is enabled because Scene.xml is client cutscene/dialogue presentation data and the current server source/schema has no matching Scene/Cutscene tables.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Scene: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "ServerTransfer") { try { ServerTransferProfileSummary summary = _config == null ? ServerTransferProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)) : ServerTransferProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for ServerTransfer. Transfer servers: {summary.ServerTransferCount}, enabled: {summary.EnabledServerTransferCount}, limits: {summary.LimitCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nTransfer server rows: {summary.ServerTransferCount}\nEnabled transfer servers: {summary.EnabledServerTransferCount}\nLimit rows: {summary.LimitCount}\nDuplicate ServerIndex values: {summary.DuplicateServerIndexCount}\nServer indexes: {summary.ServerIndexes}\nCurrent Account.Server rows: {summary.CurrentAccountServerCount}\n\nNo SQL import is enabled. ServerTransfer.xml is a transfer-rule package, while Account.Server is the normal login server-list config. The current XML is empty, so there is nothing safe to import.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for ServerTransfer: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Tactics") { try { TacticsProfileSummary summary = _config == null ? TacticsProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)) : TacticsProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Server update required"; importButton.Enabled = false; AppendLog($"Validation OK for Tactics. TDB rows: {summary.TacticCount}, requirements: {summary.TacticRequirementCount}, transcend evo rows: {summary.TranscendEvoCount}, missing refs: digimon {summary.MissingDigimonBaseInfoCount}, item {summary.MissingItemInfoCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nTDB tactic rows: {summary.TacticCount}\nTDB requirement rows: {summary.TacticRequirementCount}\nDistinct tactic digimon ids: {summary.DistinctTacticDigimonCount}\nDistinct referenced digimon ids: {summary.DistinctReferencedDigimonCount}\nMissing Asset.DigimonBaseInfo references: {summary.MissingDigimonBaseInfoCount}\nDistinct referenced item ids: {summary.DistinctReferencedItemCount}\nMissing Asset.ItemInfo references: {summary.MissingItemInfoCount}\nTactic id range: {summary.TacticIdRange}\nTactic digimon id range: {summary.TacticDigimonIdRange}\nTacticsPlain rows: {summary.TacticsPlainCount}\nEnchant item rows: {summary.EnchantItemCount}\nEnchant stat rows: {summary.EnchantStatCount}\nEnchant stat value rows: {summary.EnchantStatValueCount}\nTranscend info groups: {summary.TranscendInfoGroupCount}\nTranscend info rows: {summary.TranscendInfoCount}\nTranscend max exp values: {summary.TranscendMaxExpValues}\nTranscend evo rows: {summary.TranscendEvoCount}\nTranscend evo use-type rows: {summary.TranscendEvoUseTypeCount}\nTranscend evo material rows: {summary.TranscendEvoMaterialCount}\nExpDigimon rows: {summary.ExpDigimonCount}\nExpDigimon value rows: {summary.ExpDigimonValueCount}\nTranscend same-type groups: {summary.TranscendSameTypeGroupCount}\nTranscend correct value rows: {summary.TranscendCorrectValueCount}\nDuplicate TDB tactic ids: {summary.DuplicateTacticIdCount}\nDuplicate TacticsPlain ids: {summary.DuplicatePlainIdCount}\n\nNo SQL import is enabled because the current server stores owned digimon/transcendence as runtime Digimon rows and does not have static Asset/Config tables for this full Tactics package.", "Validation OK - Server Update Required", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Tactics: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Talk") { try { TalkProfileSummary summary = TalkProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for Talk. Digimon: {summary.DigimonTalkCount}, events: {summary.EventTalkCount}, messages: {summary.MessageTalkCount}, tips: {summary.TipCount}, loading tips: {summary.LoadingTipCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nDigimon talk rows: {summary.DigimonTalkCount}\nEvent talk rows: {summary.EventTalkCount}\nMessage rows: {summary.MessageTalkCount}\nTip rows: {summary.TipCount}\nLoading tip rows: {summary.LoadingTipCount}\nDigimon talk id range: {summary.DigimonTalkIdRange}\nEvent talk id range: {summary.EventTalkIdRange}\nMessage id range: {summary.MessageTalkIdRange}\nTip id range: {summary.TipIdRange}\nLoading tip id range: {summary.LoadingTipIdRange}\nDigimon talk types: {summary.DigimonTalkTypes}\nMessage types: {summary.MessageTypes}\nMessage button types: {summary.MessageButtonTypes}\nLoading tip level range: {summary.LoadingTipLevelRange}\nDuplicate digimon talk ids: {summary.DuplicateDigimonTalkIdCount}\nDuplicate event talk ids: {summary.DuplicateEventTalkIdCount}\nDuplicate message ids: {summary.DuplicateMessageTalkIdCount}\nDuplicate tip ids: {summary.DuplicateTipIdCount}\nDuplicate loading tip ids: {summary.DuplicateLoadingTipIdCount}\nStrings longer than fixed BIN capacity: {summary.LongStringCount}\n\nNo SQL import is enabled because Talk.bin is client UI/dialogue/tip presentation data. No matching Talk tables or columns were found in the live ODMO database, and the server source only uses TalkToNpc as a quest-goal type.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Talk: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "UIText") { try { UITextProfileSummary summary = UITextProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for UIText. Rows: {summary.UITextCount}, non-empty text rows: {summary.NonEmptyTextCount}, duplicate hashes: {summary.DuplicateHashKeyCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nUI text rows: {summary.UITextCount}\nNon-empty text rows: {summary.NonEmptyTextCount}\nEmpty text rows: {summary.EmptyTextCount}\nHash key range: {summary.HashKeyRange}\nText length range: {summary.TextLengthRange}\nMax text length: {summary.MaxTextLength}\nRows with format markers: {summary.FormatTextCount}\nNegative hash keys: {summary.NegativeHashKeyCount}\nDuplicate hash keys: {summary.DuplicateHashKeyCount}\n\nNo SQL import is enabled because UIText.bin is a client UI string table keyed by the client hash function. No matching UIText table or column was found in the live ODMO database, and the current server source does not load this text package.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for UIText: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Tutorial") { try { TutorialProfileSummary summary = TutorialProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for Tutorial. Rows: {summary.TutorialCount}, non-empty text rows: {summary.NonEmptyTextCount}, max text length: {summary.MaxTextLength}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nTutorial rows: {summary.TutorialCount}\nNon-empty text rows: {summary.NonEmptyTextCount}\nIndex range: {summary.IndexRange}\nText length range: {summary.TextLengthRange}\nMax text length: {summary.MaxTextLength}\nMissing index rows: {summary.MissingIndexCount}\nDuplicate indexes: {summary.DuplicateIndexCount}\nNon-contiguous index sequence: {summary.NonContiguousIndexCount}\nTexts longer than fixed BIN capacity: {summary.LongTextCount}\n\nNo SQL import is enabled because Tutorial.bin is client tutorial text/UI data. No matching Tutorial table or column was found in the live ODMO database; the server only stores client-option/tutorial flags and tutorial quest type behavior separately.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Tutorial: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "TimeCharge") { try { TimeChargeProfileSummary summary = TimeChargeProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for TimeCharge. Charge items: {summary.ChargeItemCount}, bit codes: {summary.BitCodeCount}, cash codes: {summary.CashCodeCount}, need rows: {summary.CashNeedInfoCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nCharge item rows: {summary.ChargeItemCount}\nBit code rows: {summary.BitCodeCount}\nCash code rows: {summary.CashCodeCount}\nCash need rows: {summary.CashNeedInfoCount}\nCharge item code range: {summary.ChargeItemCodeRange}\nBit code range: {summary.BitCodeRange}\nCash code range: {summary.CashCodeRange}\nKeep time range: {summary.KeepTimeRange}\nCharge time range: {summary.ChargeTimeRange}\nKeep price range: {summary.KeepPriceRange}\nCash need time-index range: {summary.CashNeedTimeIndexRange}\nCash need count range: {summary.CashNeedCountRange}\nMissing bit-code references: {summary.MissingBitCodeReferenceCount}\nMissing cash-code references: {summary.MissingCashCodeReferenceCount}\nEmpty cash-code groups: {summary.EmptyCashCodeGroupCount}\nDuplicate charge item codes: {summary.DuplicateChargeItemCodeCount}\nDuplicate bit codes: {summary.DuplicateBitCodeCount}\nDuplicate cash codes: {summary.DuplicateCashCodeCount}\n\nNo SQL import is enabled because TimeCharge.bin is client equipment-recharge UI/config data. No matching TimeCharge tables or columns were found in the live ODMO database, and the current server only sends a stub TimeRecharge result packet.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for TimeCharge: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Weather") { try { WeatherProfileSummary summary = WeatherProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for Weather. Groups: {summary.WeatherGroupCount}, weather rows: {summary.WeatherCount}, elements: {summary.WeatherElementCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nWeather groups: {summary.WeatherGroupCount}\nWeather rows: {summary.WeatherCount}\nWeather element rows: {summary.WeatherElementCount}\nDistinct maps: {summary.DistinctMapCount}\nMap id range: {summary.MapIdRange}\nRadius range: {summary.RadiusRange}\nTotal loop range: {summary.TotalLoopRange}\nWeather types: {summary.WeatherTypes}\nWeather level range: {summary.WeatherLevelRange}\nElement time range: {summary.ElementTimeRange}\nFatigue range: {summary.FatigueRange}\nEmpty groups: {summary.EmptyGroupCount}\nEmpty weather element rows: {summary.EmptyWeatherElementCount}\nElement count mismatches: {summary.ElementCountMismatchCount}\nTotal loop mismatches: {summary.TotalLoopMismatchCount}\nDuplicate group indexes: {summary.DuplicateGroupIndexCount}\n\nNo SQL import is enabled because Weather.bin is client map weather presentation/config data. No matching Weather table or column was found in the live ODMO database, and the current server source does not load this package.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Weather: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "WorldMap") { try { WorldMapProfileSummary summary = WorldMapProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); statusValueLabel.Text = "Client side only"; importButton.Enabled = false; AppendLog($"Validation OK for WorldMap. Worlds: {summary.WorldCount}, areas: {summary.AreaCount}, duplicate area map ids: {summary.DuplicateAreaMapIdCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nWorld rows: {summary.WorldCount}\nArea rows: {summary.AreaCount}\nWorld id range: {summary.WorldIdRange}\nArea map id range: {summary.AreaMapIdRange}\nWorld types: {summary.WorldTypes}\nArea types: {summary.AreaTypes}\nField types: {summary.FieldTypes}\nWorld UI X range: {summary.WorldUiXRange}\nWorld UI Y range: {summary.WorldUiYRange}\nArea UI X range: {summary.AreaUiXRange}\nArea UI Y range: {summary.AreaUiYRange}\nDuplicate world ids: {summary.DuplicateWorldIdCount}\nDuplicate area map ids: {summary.DuplicateAreaMapIdCount}\nInvalid gaussian blur rows: {summary.InvalidGaussianBlurCount}\nStrings longer than fixed BIN capacity: {summary.LongStringCount}\n\nNo SQL import is enabled because WorldMap.bin is client world/area map UI data. Asset.Map is the server map table, but there is no matching server table for this UI layout package.", "Validation OK - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for WorldMap: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapRegion") { try { MapRegionAssetImportSummary summary = _config == null ? MapRegionAssetImporter.ValidateXml(ResolveProfileXmlPath(profile), ResolveMapBuffRegionXmlPath(), ResolveMapLimitEvoXmlPath()) : MapRegionAssetImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile), ResolveMapBuffRegionXmlPath(), ResolveMapLimitEvoXmlPath()); bool valid = summary.MissingAssetMapCount == 0; statusValueLabel.Text = valid ? "Validation OK" : "Validation failed"; importButton.Enabled = valid && profile.SupportsImport && _config != null; AppendLog($"Validation {(valid ? "OK" : "failed")} for MapRegion. Map groups: {summary.MapGroupCount}, region rows: {summary.RegionCount}, missing Asset.Map refs: {summary.MissingAssetMapCount}."); MessageBox.Show( $"Validation {(valid ? "succeeded" : "failed")}.\n\nProfile: {profile.Name}\nMap groups: {summary.MapGroupCount}\nRegion rows: {summary.RegionCount}\nDistinct maps: {summary.DistinctMapCount}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\nCurrent Asset.MapRegionList rows: {summary.CurrentMapRegionListCount}\nCurrent Asset.MapRegion rows: {summary.CurrentMapRegionCount}\nClient-only MapBuffRegion rows: {summary.BuffRegionCount}\nClient-only MapLimitEvo rows: {summary.LimitEvoRegionCount}\n\nImport mode: targeted merge-replace for maps present in MapRegion.xml. Unrelated map region lists are preserved.", valid ? "Validation OK" : "Validation Error", MessageBoxButtons.OK, valid ? MessageBoxIcon.Information : MessageBoxIcon.Error); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for MapRegion: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Skill") { try { SkillAssetImportSummary summary = SkillAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveSkillTamerSkillXmlPath(), ResolveSkillAreaCheckXmlPath()); statusValueLabel.Text = "Validation OK"; importButton.Enabled = profile.SupportsImport && _config != null; AppendLog($"Validation OK for Skill. SkillInfo rows: {summary.SkillInfoCount}, SkillCode rows: {summary.SkillCodeCount}, apply rows: {summary.SkillCodeApplyCount}, tamer skills: {summary.TamerSkillCount}, area checks client-only: {summary.AreaCheckCount}."); MessageBox.Show( $"Validation succeeded.\n\nProfile: {profile.Name}\nSkillInfo rows: {summary.SkillInfoCount}\nSkillCode rows: {summary.SkillCodeCount}\nSkillCodeApply rows: {summary.SkillCodeApplyCount}\nTamerSkill rows: {summary.TamerSkillCount}\nClient-only AreaCheck rows: {summary.AreaCheckCount}\nInvalid invoke-rate rows clamped to chance 0: {summary.InvalidInvokeRateCount}\nIgnored s_nMemorySkill rows because current DB column is tinyint and server does not consume it: {summary.IgnoredMemorySkillCount}\nTargets: Asset.SkillInfo, Asset.SkillCode, Asset.SkillCodeApply, Asset.TamerSkill", "Validation OK", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Validation failed"; importButton.Enabled = false; AppendLog($"Validation failed for Skill: {ex.Message}"); MessageBox.Show(ex.Message, "Validation Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } statusValueLabel.Text = "Mapping pending"; MessageBox.Show( $"Profile '{profile.Name}' is listed in the importer, but its SQL mapping is not implemented yet.", "Profile Not Ready", MessageBoxButtons.OK, MessageBoxIcon.Information); } private void previewButton_Click(object sender, EventArgs e) { if (profileComboBox.SelectedItem is not ImportProfileViewModel profile) { return; } if (profile.Name == "Digimon_List") { try { DigimonBaseInfoImportSummary summary = DigimonBaseInfoImporter.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Digimon_List. Records: {summary.RecordCount}."); MessageBox.Show( $"Digimon_List summary\n\nRecords ready for replace import: {summary.RecordCount}\nTarget table: Asset.DigimonBaseInfo", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Digimon_List: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Monster") { try { MonsterPackageImportSummary summary = MonsterPackageImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveMonsterSkillXmlPath()); AppendLog($"Preview requested for Monster. Base records: {summary.MonsterRecordCount}, skill records: {summary.MonsterSkillRecordCount}."); MessageBox.Show( $"Monster package summary\n\nMonster rows ready for replace import: {summary.MonsterRecordCount}\nMonster skill rows ready for replace import: {summary.MonsterSkillRecordCount}\nTargets: Asset.MonsterBaseInfo, Asset.MonsterSkill, Asset.MonsterSkillInfo\nClient-only: MonsterHit.xml, MonsterSkillTerms.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Monster: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Buff") { try { BuffAssetImportSummary summary = BuffAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Buff. Records: {summary.RecordCount}."); MessageBox.Show( $"Buff summary\n\nRecords ready for replace import: {summary.RecordCount}\nTarget table: Asset.Buff\nIgnored on SQL import: comment, icon, delete flag, and effect file", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Buff: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Achieve") { try { AchievementAssetImportSummary summary = AchievementAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveAchieveHeaderXmlPath()); AppendLog($"Preview requested for Achieve. Asset rows: {summary.RecordCount}, header rows: {summary.HeaderRecordCount}."); MessageBox.Show( $"Achieve summary\n\nAsset rows ready for replace import: {summary.RecordCount}\nClient-only header rows: {summary.HeaderRecordCount}\nTarget table: Asset.Achievement\nIgnored on SQL import: name, comment, title, icon, point, group, subgroup, display flags, and AchieveHeader.xml UI data", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Achieve: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "DigimonEvo") { try { DigimonEvolutionImportSummary summary = DigimonEvolutionAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveBattleEvoXmlPath()); AppendLog($"Preview requested for DigimonEvo. Evolutions: {summary.EvolutionRecordCount}, lines: {summary.EvolutionLineRecordCount}, stages: {summary.EvolutionStageRecordCount}."); MessageBox.Show( $"DigimonEvo summary\n\nEvolution rows ready for replace import: {summary.EvolutionRecordCount}\nEvolution line rows ready for replace import: {summary.EvolutionLineRecordCount}\nEvolution stage rows ready for replace import: {summary.EvolutionStageRecordCount}\nClient-only BattleEvo rows: {summary.BattleEvolutionRecordCount}\nTargets: Asset.Evolution, Asset.EvolutionLine, Asset.EvolutionStage\nIgnored on SQL import: BattleEvo.xml and client visual/layout fields from DigimonEvo.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for DigimonEvo: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Digimon_Book") { try { DigimonBookImportSummary summary = DigimonBookAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveDigimonBookDeckOptionXmlPath(), ResolveDigimonBookEncyclopediaExceptionXmlPath(), ResolveDigimonBookDeckCompositionXmlPath()); AppendLog($"Preview requested for Digimon_Book. BookInfo XML rows: {summary.BookInfoXmlRecordCount}, synthetic rows: {summary.SyntheticBookInfoCount}, deck buff rows: {summary.DeckBuffRecordCount}, option rows: {summary.DeckBuffOptionRecordCount}."); MessageBox.Show( $"Digimon_Book summary\n\nBookInfo XML rows ready for import: {summary.BookInfoXmlRecordCount}\nSynthetic BookInfo rows added by importer: {summary.SyntheticBookInfoCount}\nDeck buff rows ready for import: {summary.DeckBuffRecordCount}\nDeck buff option rows ready for import: {summary.DeckBuffOptionRecordCount}\nClient-only EncyclopediaException rows: {summary.EncyclopediaExceptionRecordCount}\nClient-only DeckComposition rows: {summary.DeckCompositionRecordCount}\nTargets: Asset.DeckBookInfo, Asset.DeckBuff, Asset.DeckBuffOption\nIgnored on SQL import: EncyclopediaException.xml and DeckComposition.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Digimon_Book: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "DMBase") { try { DMBaseStatusApplyImportSummary summary = DMBaseStatusApplyImporter.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for DMBase. StatusApply rows: {summary.RecordCount}, tamer base rows: {summary.TamerBaseStatusRecordCount}, tamer level rows: {summary.TamerLevelStatusRecordCount}, digimon level rows: {summary.DigimonLevelStatusRecordCount}."); MessageBox.Show( $"DMBase summary\n\nStatusApply rows ready for import: {summary.RecordCount}\nTamer base rows ready for import: {summary.TamerBaseStatusRecordCount}\nTamer level rows ready for import: {summary.TamerLevelStatusRecordCount}\nDigimon level rows ready for import: {summary.DigimonLevelStatusRecordCount}\nTargets: Asset.StatusApply, Asset.CharacterBaseStatus, Asset.CharacterLevelStatus, Asset.DigimonLevelStatus\nImported XML: EvolutionBaseApply.xml, TamerBaseInfo.xml, DigimonBaseInfo.xml\nClient/config-only support remains in XML: JumpBooster.xml, Party.xml, Guild.xml, Limit.xml, Store.xml, PaneltyInfo.xml, DigimonEvoMaxSkill.xml, ExpansionData.xml, CsBaseMapInfo.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for DMBase: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Event") { try { EventAssetImportSummary summary = EventAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Event. Monthly reward rows: {summary.MonthlyRecordCount}, time reward rows: {summary.TimeRewardRecordCount}."); MessageBox.Show( $"Event summary\n\nMonthly reward rows ready for replace import: {summary.MonthlyRecordCount}\nTime reward groups in Event.xml: {summary.TimeRewardGroupCount}\nTime reward groups imported by current server: {summary.TimeRewardGroupCount - summary.IgnoredTimeRewardGroupCount}\nTime reward item rows ready for replace import: {summary.TimeRewardRecordCount}\nIgnored extra time reward groups until server supports them: {summary.IgnoredTimeRewardGroupCount}\n\nTargets: Asset.MonthlyEvent, Asset.TimeEvent\nImported XML: MonthlyEvent.xml, Event.xml\nClient-side/hot-time XML left untouched: AttendenceTime.xml, MensalEvent.xml, TimeEvent.xml, Event100Days.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Event: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "ExtraExchange") { try { ExtraEvolutionImportSummary summary = ExtraEvolutionAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for ExtraExchange. NPC rows: {summary.NpcRecordCount}, info rows: {summary.InformationRecordCount}, evolution rows: {summary.EvolutionRecordCount}, material rows: {summary.MaterialRecordCount}, required rows: {summary.RequiredRecordCount}."); MessageBox.Show( $"ExtraExchange summary\n\nNPC rows ready for replace import: {summary.NpcRecordCount}\nInfo rows ready for replace import: {summary.InformationRecordCount}\nEvolution rows ready for replace import: {summary.EvolutionRecordCount}\nMaterial rows ready for replace import: {summary.MaterialRecordCount}\nRequired rows ready for replace import: {summary.RequiredRecordCount}\nTargets: Asset.ExtraEvolutionNpc, Asset.ExtraEvolutionInformation, Asset.ExtraEvolution, Asset.ExtraEvolutionMaterial, Asset.ExtraEvolutionRequired\nIgnored on SQL import: client-only unknown/count bookkeeping fields from ExtraExchange.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for ExtraExchange: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "InfiniteWar") { try { InfiniteWarArenaDailyImportSummary summary = InfiniteWarArenaDailyImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveInfiniteWarStageInfoXmlPath(), ResolveInfiniteWarSummonMonsterXmlPath(), ResolveInfiniteWarRankRewardXmlPath(), ResolveInfiniteWarAwardNpcXmlPath()); AppendLog($"Preview requested for InfiniteWar. Daily groups: {summary.DailyRewardGroupCount}, daily reward rows: {summary.DailyRewardItemCount}."); MessageBox.Show( $"InfiniteWar summary\n\nArena daily reward groups ready for replace import: {summary.DailyRewardGroupCount}\nArena daily reward item rows ready for replace import: {summary.DailyRewardItemCount}\nClient-only StageInfo rows: {summary.StageInfoRecordCount}\nClient-only SummonMonster rows: {summary.SummonMonsterRecordCount}\nClient-only RankReward rows: {summary.RankRewardRecordCount}\nClient-only AwardNpc rows: {summary.AwardNpcRecordCount}\nTargets: Asset.ArenaDailyItemRewards, Asset.ArenaDailyItemReward\nImported XML: DailyReward.xml\nClient-side only for now: StageInfo.xml, SummonMonster.xml, RankReward.xml, AwardNpc.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for InfiniteWar: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "ItemList") { try { ItemListAssetImportSummary summary = ItemListAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveItemMakingXmlPath(), ResolveItemAccessoryXmlPath(), ResolveItemXaiXmlPath()); AppendLog($"Preview requested for ItemList. ItemInfo rows: {summary.ItemInfoCount}, craft rows: {summary.ItemCraftCount}, craft material rows: {summary.ItemCraftMaterialCount}, accessory rows: {summary.AccessoryRollCount}, accessory status rows: {summary.AccessoryRollStatusCount}, xai rows: {summary.XaiCount}."); MessageBox.Show( $"ItemList summary\n\nItemInfo rows ready for replace import: {summary.ItemInfoCount}\nItemCraft rows ready for replace import: {summary.ItemCraftCount}\nItemCraftMaterial rows ready for replace import: {summary.ItemCraftMaterialCount}\nAccessoryRoll rows ready for replace import: {summary.AccessoryRollCount}\nAccessoryRollStatus rows ready for replace import: {summary.AccessoryRollStatusCount}\nXai rows ready for replace import: {summary.XaiCount}\nTargets: Asset.ItemInfo, Asset.ItemCraft, Asset.ItemCraftMaterial, Asset.AccessoryRoll, Asset.AccessoryRollStatus, Asset.Xai\nImported XML: ItemList.xml, ItemMaking.xml, ItemAcessorys.xml, ItemXai.xml\nClient-side only for now: ItemCoolTime.xml, ItemDisplay.xml, ItemExchange.xml, ItemLook.xml, ItemRank.xml, ItemRankEffectList.xml, ItemTap.xml, ItemTypeName.xml, ElementItem.xml, ElementItem1.xml, AcessorysEnchant.xml, ItemMakingGroupList.xml, ServerItemList.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for ItemList: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapList") { try { MapAssetImportSummary summary = MapAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for MapList. Map rows: {summary.RecordCount}."); MessageBox.Show( $"MapList summary\n\nMap rows ready for replace import: {summary.RecordCount}\nTarget table: Asset.Map\nImported fields: MapId, Name, RegionIndex, ResurrectionMapID, XgConsumeType, BattleTagUse\nDefaulted on SQL import: Type = 0\nClient-side only in XML: map path, background sound, dimensions, fatigue settings, and camera settings", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for MapList: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapMonsterList") { try { MapMonsterListConfigSummary summary = _config == null ? MapMonsterListConfigImporter.ValidateXml(ResolveProfileXmlPath(profile)) : MapMonsterListConfigImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for MapMonsterList. Expanded mobs: {summary.ExpandedMobRecordCount}, current Config.Mob rows: {summary.CurrentConfigMobCount}, reward rows: drop {summary.CurrentMobDropRewardCount}, exp {summary.CurrentMobExpRewardCount}."); MessageBox.Show( $"MapMonsterList summary\n\nSpawn groups in XML: {summary.SpawnRecordCount}\nExpanded Config.Mob rows: {summary.ExpandedMobRecordCount}\nDistinct maps: {summary.DistinctMapCount}\nDistinct monster types: {summary.DistinctMonsterTypeCount}\nDuplicate spawn keys: {summary.DuplicateSpawnKeyCount}\nMissing Config.Map references: {summary.MissingConfigMapCount}\nMissing Asset.MonsterBaseInfo references: {summary.MissingMonsterBaseInfoCount}\nExisting reward template types reused: {summary.RewardTemplateTypeCount}\nMonster types that will get empty reward shells: {summary.MissingRewardTemplateTypeCount}\n\nCurrent DB rows\nConfig.Mob: {summary.CurrentConfigMobCount}\nConfig.MobLocation: {summary.CurrentMobLocationCount}\nConfig.MobDropReward: {summary.CurrentMobDropRewardCount}\nConfig.MobExpReward: {summary.CurrentMobExpRewardCount}\nConfig.ItemDropReward: {summary.CurrentItemDropRewardCount}\nConfig.BitsDropReward: {summary.CurrentBitsDropRewardCount}\n\nImport mode: full rebuild of regular mob spawn tables. Drop, bits, and exp rewards are rebuilt by cloning the existing reward template for each monster type.", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for MapMonsterList: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapNpc") { try { MapNpcAssetImportSummary summary = _config == null ? MapNpcAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)) : MapNpcAssetImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for MapNpc. Importable rows: {summary.ImportableRecordCount}, missing rows: {summary.MissingNpcCount}, sentinel rows ignored: {summary.IgnoredInvalidMapCount}."); MessageBox.Show( $"MapNpc summary\n\nXML rows: {summary.XmlRecordCount}\nImportable NPC/map rows: {summary.ImportableRecordCount}\nIgnored invalid/sentinel map rows: {summary.IgnoredInvalidMapCount}\nDistinct maps: {summary.DistinctMapCount}\nCurrent Asset.Npc rows: {summary.CurrentNpcCount}\nExisting XML rows already in DB: {summary.ExistingMatchCount}\nMissing rows that merge import can add: {summary.MissingNpcCount}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\n\nImport behavior\nNon-destructive merge insert only.\nNo rows are deleted from Asset.Npc.\nExisting shop/portal child tables are preserved.\nIgnored on SQL import: X/Y position and rotation because the current Asset.Npc table only stores NpcId and MapId.", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for MapNpc: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapPortal") { try { MapPortalAssetImportSummary summary = _config == null ? MapPortalAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)) : MapPortalAssetImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for MapPortal. XML portals: {summary.XmlPortalCount}, current Asset.Portal rows: {summary.CurrentPortalCount}, update {summary.ExistingXmlPortalCount}, insert {summary.MissingXmlPortalCount}."); MessageBox.Show( $"MapPortal summary\n\nPortal groups: {summary.PortalGroupCount}\nXML portal rows: {summary.XmlPortalCount}\nIgnored invalid destination rows: {summary.IgnoredInvalidDestinationPortalCount}\nDuplicate portal ids: {summary.DuplicatePortalIdCount}\nPortalCount mismatched groups: {summary.PortalCountMismatchGroupCount}\nDistinct source maps: {summary.DistinctSourceMapCount}\nDistinct destination maps: {summary.DistinctDestinationMapCount}\nLocal/same-map portals: {summary.LocalPortalCount}\nMissing destination Asset.Map references: {summary.MissingAssetMapCount}\n\nCurrent DB rows\nAsset.Portal: {summary.CurrentPortalCount}\nExisting XML portal ids to update: {summary.ExistingXmlPortalCount}\nMissing XML portal ids to insert: {summary.MissingXmlPortalCount}\nDB-only portal rows preserved: {summary.PreservedDbOnlyPortalCount}\n\nImport mode: non-destructive sync. Existing XML portal ids are updated from MapPortal.xml, missing XML portal ids are inserted, DB-only portal rows are left untouched, and destination-map 0 rows are ignored.", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for MapPortal: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Npc") { try { NpcPackageImportSummary summary = _config == null ? NpcPackageImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveNpcModelInfoXmlPath(), ResolveNpcEventXmlPath()) : NpcPackageImporter.AssessDatabase( _config.ConnectionString, ResolveProfileXmlPath(profile), ResolveNpcModelInfoXmlPath(), ResolveNpcEventXmlPath()); AppendLog($"Preview requested for Npc. Importable NPC rows: {summary.NpcRecordCount}, ignored no-map rows: {summary.IgnoredNoMapNpcCount}, empty portal blocks: {summary.IgnoredEmptyPortalCount}, shops: {summary.ShopNpcCount}, trade items: {summary.TradeItemCount}, portal requirements: {summary.PortalRequirementCount}."); MessageBox.Show( $"Npc summary\n\nImportable NPC rows: {summary.NpcRecordCount}\nIgnored no-map NPC rows: {summary.IgnoredNoMapNpcCount}\nIgnored empty portal blocks: {summary.IgnoredEmptyPortalCount}\nDistinct NPC ids: {summary.DistinctNpcCount}\nDistinct maps: {summary.DistinctMapCount}\nShop NPC rows: {summary.ShopNpcCount}\nTrade item rows ready for sync: {summary.TradeItemCount}\nPortal NPC rows: {summary.PortalNpcCount}\nPortal entries ready for sync: {summary.PortalEntryCount}\nPortal requirement rows ready for sync: {summary.PortalRequirementCount}\nModelInfo rows client-side only: {summary.ModelInfoCount}\nNpcEvent rows client-side only: {summary.NpcEventCount}\n\nCurrent DB rows for XML NPCs\nAsset.Npc existing matches: {summary.ExistingNpcCount}\nMissing NPC/map rows to add: {summary.MissingNpcCount}\nExisting NpcItem rows to rebuild: {summary.ExistingNpcItemCount}\nExisting NpcPortal rows to rebuild: {summary.ExistingNpcPortalCount}\nExisting portal entry rows to rebuild: {summary.ExistingNpcPortalAmountCount}\nExisting portal requirement rows to rebuild: {summary.ExistingNpcPortalRequirementCount}\n\nTargets: Asset.Npc, Asset.NpcItem, Asset.NpcPortal, Asset.NpcPortalsAmount, Asset.NpcPortals\nIgnored on SQL import: name, pen name, talk text, model info, type/display/move flags, no-map rows, empty portal wrappers, and NpcEvent.xml because the current server has no matching columns/tables for those fields.", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Npc: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Quest") { try { QuestAssetImportSummary summary = _config == null ? QuestAssetImporter.ValidateXml(ResolveProfileXmlPath(profile)) : QuestAssetImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Quest. Quests: {summary.QuestCount}, conditions: {summary.ConditionCount}, goals: {summary.GoalCount}, rewards: {summary.RewardCount}, supplies: {summary.SupplyCount}, events: {summary.EventCount}."); MessageBox.Show( $"Quest summary\n\nQuest rows ready for replace import: {summary.QuestCount}\nCondition rows ready for import: {summary.ConditionCount}\nGoal rows ready for import: {summary.GoalCount}\nReward rows ready for import: {summary.RewardCount}\nReward object rows ready for import: {summary.RewardObjectCount}\nSupply rows ready for import: {summary.SupplyCount}\nEvent rows ready for import: {summary.EventCount}\nUnsupported reward type rows kept but ignored by current server reward switch: {summary.UnsupportedRewardTypeCount}\n\nTargets: Asset.Quest, Asset.QuestCondition, Asset.QuestGoal, Asset.QuestReward, Asset.QuestRewardObject, Asset.QuestSupply, Asset.QuestEvent\n\nImportant\nThis imports static quest asset data only. Character.InProgressQuest and other Character quest-progress tables are player save data and are not touched.", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Quest: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Reward") { try { RewardProfileSummary summary = _config == null ? RewardProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)) : RewardProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Reward. Server groups: {summary.ServerGroupCount}, reward rows: {summary.RewardCount}, active rows: {summary.ActiveRewardCount}."); MessageBox.Show( $"Reward summary\n\nServer groups: {summary.ServerGroupCount}\nServer indexes: {summary.ServerIndexes}\nReward rows: {summary.RewardCount}\nActive reward rows now: {summary.ActiveRewardCount}\nFuture reward rows: {summary.FutureRewardCount}\nExpired reward rows: {summary.ExpiredRewardCount}\nReward ID range: {summary.MinRewardId} to {summary.MaxRewardId}\nDistinct reward ids: {summary.DistinctRewardIdCount}\nDuplicate reward ids within same server: {summary.DuplicateRewardIdWithinServerCount}\nDistinct item codes: {summary.DistinctItemCodeCount}\nMissing Asset.ItemInfo references: {summary.MissingItemInfoCount}\nDate range: {summary.DateRange}\n\nCurrent decision\nNo import is required for this package. Reward.xml is historical scheduled compensation/gift data, not Asset.TimeEvent login reward data and not Event.TimeReward/AttendanceReward player progress. All rows are currently expired, so keeping this profile as validation/preview-only avoids fake SQL mappings.", "Profile Summary - No Import Required", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Reward: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Ride") { try { RideProfileSummary summary = _config == null ? RideProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)) : RideProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Ride. Ride rows: {summary.RideCount}, unlock item ids: {summary.DistinctOpenItemCount}, missing refs: digimon {summary.MissingDigimonBaseInfoCount}, item {summary.MissingItemInfoCount}."); MessageBox.Show( $"Ride summary\n\nRide rows: {summary.RideCount}\nDistinct digimon ids: {summary.DistinctDigimonCount}\nDigimon id range: {summary.DigimonIdRange}\nDuplicate digimon ids: {summary.DuplicateDigimonIdCount}\nRide types: {summary.RideTypes}\nChange ride values: {summary.ChangeRideValues}\nMove speed range: {summary.MoveSpeedRange}\nRun animation rate range: {summary.AnimationRateRange}\nOpenInfo rows: {summary.OpenInfoCount}\nEmpty OpenInfo slots: {summary.EmptyOpenInfoSlotCount}\nInvalid OpenInfo slots: {summary.InvalidOpenInfoSlotCount}\nDistinct unlock item ids: {summary.DistinctOpenItemCount}\nUnlock item count range: {summary.NeedCountRange}\nMissing Asset.DigimonBaseInfo references: {summary.MissingDigimonBaseInfoCount}\nMissing Asset.ItemInfo references: {summary.MissingItemInfoCount}\n\nCurrent decision\nNo import is available yet. Ride.xml is server-relevant because ride unlock/start packets exist, but the current server does not load static ride rules. It hardcodes ride speed as double movement speed and unlocks ride by consuming the selected inventory item without checking Ride.xml's allowed item list.", "Profile Summary - Server Update Required", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Ride: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Scene") { try { SceneProfileSummary summary = _config == null ? SceneProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)) : SceneProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Scene. Scenes: {summary.SceneCount}, actions: {summary.ActionCount}, targets: {summary.SceneTargetCount}."); MessageBox.Show( $"Scene summary\n\nScene rows: {summary.SceneCount}\nUsed scenes: {summary.UsedSceneCount}\nSkippable scenes: {summary.SkippableSceneCount}\nAction/dialogue rows: {summary.ActionCount}\nScene target rows: {summary.SceneTargetCount}\nScene ID range: {summary.SceneIdRange}\nDistinct maps: {summary.DistinctMapCount}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\nDistinct referenced scene targets: {summary.DistinctReferencedTargetCount}\nMissing SceneTargets references: {summary.MissingSceneTargetReferenceCount}\nActions with effect file: {summary.ActionWithEffectCount}\nActions with sound file: {summary.ActionWithSoundCount}\nDuplicate scene ids: {summary.DuplicateSceneIdCount}\nDuplicate target UIDs: {summary.DuplicateSceneTargetUidCount}\n\nCurrent decision\nNo import is available. SceneData.xml and SceneTargets.xml are client cutscene/dialogue/camera target data. The current server source does not reference scene ids and the current database has no Asset.Scene, Config.Scene, or Character.Scene table.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Scene: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "ServerTransfer") { try { ServerTransferProfileSummary summary = _config == null ? ServerTransferProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)) : ServerTransferProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for ServerTransfer. Transfer servers: {summary.ServerTransferCount}, limits: {summary.LimitCount}."); MessageBox.Show( $"ServerTransfer summary\n\nTransfer server rows: {summary.ServerTransferCount}\nEnabled transfer servers: {summary.EnabledServerTransferCount}\nLimit rows: {summary.LimitCount}\nDuplicate ServerIndex values: {summary.DuplicateServerIndexCount}\nServer indexes: {summary.ServerIndexes}\nCurrent Account.Server rows: {summary.CurrentAccountServerCount}\n\nCurrent decision\nNo import is available. ServerTransfer.xml currently exports as an empty . Even if rows are added later, this package describes transfer rules/limits, not the current Account.Server login list table.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for ServerTransfer: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Tactics") { try { TacticsProfileSummary summary = _config == null ? TacticsProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)) : TacticsProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Tactics. TDB rows: {summary.TacticCount}, requirements: {summary.TacticRequirementCount}, transcend evo materials: {summary.TranscendEvoMaterialCount}, missing refs: digimon {summary.MissingDigimonBaseInfoCount}, item {summary.MissingItemInfoCount}."); MessageBox.Show( $"Tactics summary\n\nTDB tactic rows: {summary.TacticCount}\nTDB requirement rows: {summary.TacticRequirementCount}\nDistinct tactic digimon ids: {summary.DistinctTacticDigimonCount}\nDistinct referenced digimon ids: {summary.DistinctReferencedDigimonCount}\nMissing Asset.DigimonBaseInfo references: {summary.MissingDigimonBaseInfoCount}\nDistinct referenced item ids: {summary.DistinctReferencedItemCount}\nMissing Asset.ItemInfo references: {summary.MissingItemInfoCount}\nTactic id range: {summary.TacticIdRange}\nTactic digimon id range: {summary.TacticDigimonIdRange}\nTacticsPlain rows: {summary.TacticsPlainCount}\nEnchant item rows: {summary.EnchantItemCount}\nEnchant stat rows: {summary.EnchantStatCount}\nEnchant stat value rows: {summary.EnchantStatValueCount}\nTranscend info groups: {summary.TranscendInfoGroupCount}\nTranscend info rows: {summary.TranscendInfoCount}\nTranscend max exp values: {summary.TranscendMaxExpValues}\nTranscend evo rows: {summary.TranscendEvoCount}\nTranscend evo use-type rows: {summary.TranscendEvoUseTypeCount}\nTranscend evo material rows: {summary.TranscendEvoMaterialCount}\nExpDigimon rows: {summary.ExpDigimonCount}\nExpDigimon value rows: {summary.ExpDigimonValueCount}\nTranscend same-type groups: {summary.TranscendSameTypeGroupCount}\nTranscend correct value rows: {summary.TranscendCorrectValueCount}\nDuplicate TDB tactic ids: {summary.DuplicateTacticIdCount}\nDuplicate TacticsPlain ids: {summary.DuplicatePlainIdCount}\n\nCurrent decision\nNo import is available. The current server has runtime Digimon.TranscendenceExperience and transcendence packet logic, but no static Asset/Config tables for TDBTactic, TacticsPlain, enchant matrices, or transcend material tables. The server currently hardcodes transcendence thresholds and exp/correction formulas that should eventually come from this package.", "Profile Summary - Server Update Required", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Tactics: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Talk") { try { TalkProfileSummary summary = TalkProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Talk. Digimon: {summary.DigimonTalkCount}, events: {summary.EventTalkCount}, messages: {summary.MessageTalkCount}, tips: {summary.TipCount}, loading tips: {summary.LoadingTipCount}."); MessageBox.Show( $"Talk summary\n\nDigimon talk rows: {summary.DigimonTalkCount}\nEvent talk rows: {summary.EventTalkCount}\nMessage rows: {summary.MessageTalkCount}\nTip rows: {summary.TipCount}\nLoading tip rows: {summary.LoadingTipCount}\nDigimon talk id range: {summary.DigimonTalkIdRange}\nEvent talk id range: {summary.EventTalkIdRange}\nMessage id range: {summary.MessageTalkIdRange}\nTip id range: {summary.TipIdRange}\nLoading tip id range: {summary.LoadingTipIdRange}\nDigimon talk types: {summary.DigimonTalkTypes}\nMessage types: {summary.MessageTypes}\nMessage button types: {summary.MessageButtonTypes}\nLoading tip level range: {summary.LoadingTipLevelRange}\nDuplicate digimon talk ids: {summary.DuplicateDigimonTalkIdCount}\nDuplicate event talk ids: {summary.DuplicateEventTalkIdCount}\nDuplicate message ids: {summary.DuplicateMessageTalkIdCount}\nDuplicate tip ids: {summary.DuplicateTipIdCount}\nDuplicate loading tip ids: {summary.DuplicateLoadingTipIdCount}\nStrings longer than fixed BIN capacity: {summary.LongStringCount}\n\nCurrent decision\nNo import is available. Talk.bin exports client dialogue/message/tip presentation XML, no matching Talk table or column exists in the live ODMO schema, and server source only references TalkToNpc as quest progress behavior.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Talk: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "UIText") { try { UITextProfileSummary summary = UITextProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for UIText. Rows: {summary.UITextCount}, non-empty text rows: {summary.NonEmptyTextCount}, duplicate hashes: {summary.DuplicateHashKeyCount}."); MessageBox.Show( $"UIText summary\n\nUI text rows: {summary.UITextCount}\nNon-empty text rows: {summary.NonEmptyTextCount}\nEmpty text rows: {summary.EmptyTextCount}\nHash key range: {summary.HashKeyRange}\nText length range: {summary.TextLengthRange}\nMax text length: {summary.MaxTextLength}\nRows with format markers: {summary.FormatTextCount}\nNegative hash keys: {summary.NegativeHashKeyCount}\nDuplicate hash keys: {summary.DuplicateHashKeyCount}\n\nCurrent decision\nNo import is available. UIText.bin is a client UI string table keyed by the client hash function. The live ODMO schema has no matching UIText table/column, and the C# server source does not load this text package.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for UIText: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Tutorial") { try { TutorialProfileSummary summary = TutorialProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Tutorial. Rows: {summary.TutorialCount}, non-empty text rows: {summary.NonEmptyTextCount}, max text length: {summary.MaxTextLength}."); MessageBox.Show( $"Tutorial summary\n\nTutorial rows: {summary.TutorialCount}\nNon-empty text rows: {summary.NonEmptyTextCount}\nIndex range: {summary.IndexRange}\nText length range: {summary.TextLengthRange}\nMax text length: {summary.MaxTextLength}\nMissing index rows: {summary.MissingIndexCount}\nDuplicate indexes: {summary.DuplicateIndexCount}\nNon-contiguous index sequence: {summary.NonContiguousIndexCount}\nTexts longer than fixed BIN capacity: {summary.LongTextCount}\n\nCurrent decision\nNo import is available. Tutorial.bin is a client tutorial text package. The live ODMO schema has no matching Tutorial table/column, while the server stores tutorial/client-option flags and tutorial quest type separately from this text table.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Tutorial: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "TimeCharge") { try { TimeChargeProfileSummary summary = TimeChargeProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for TimeCharge. Charge items: {summary.ChargeItemCount}, bit codes: {summary.BitCodeCount}, cash codes: {summary.CashCodeCount}, need rows: {summary.CashNeedInfoCount}."); MessageBox.Show( $"TimeCharge summary\n\nCharge item rows: {summary.ChargeItemCount}\nBit code rows: {summary.BitCodeCount}\nCash code rows: {summary.CashCodeCount}\nCash need rows: {summary.CashNeedInfoCount}\nCharge item code range: {summary.ChargeItemCodeRange}\nBit code range: {summary.BitCodeRange}\nCash code range: {summary.CashCodeRange}\nKeep time range: {summary.KeepTimeRange}\nCharge time range: {summary.ChargeTimeRange}\nKeep price range: {summary.KeepPriceRange}\nCash need time-index range: {summary.CashNeedTimeIndexRange}\nCash need count range: {summary.CashNeedCountRange}\nMissing bit-code references: {summary.MissingBitCodeReferenceCount}\nMissing cash-code references: {summary.MissingCashCodeReferenceCount}\nEmpty cash-code groups: {summary.EmptyCashCodeGroupCount}\nDuplicate charge item codes: {summary.DuplicateChargeItemCodeCount}\nDuplicate bit codes: {summary.DuplicateBitCodeCount}\nDuplicate cash codes: {summary.DuplicateCashCodeCount}\n\nCurrent decision\nNo import is available. TimeCharge.bin describes client equipment-recharge item links, bit timing/cost rules, and cash item requirements. The live ODMO schema has no matching table/column, and the C# server path currently only acknowledges time recharge with a stub result packet.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for TimeCharge: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Weather") { try { WeatherProfileSummary summary = WeatherProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Weather. Groups: {summary.WeatherGroupCount}, weather rows: {summary.WeatherCount}, elements: {summary.WeatherElementCount}."); MessageBox.Show( $"Weather summary\n\nWeather groups: {summary.WeatherGroupCount}\nWeather rows: {summary.WeatherCount}\nWeather element rows: {summary.WeatherElementCount}\nDistinct maps: {summary.DistinctMapCount}\nMap id range: {summary.MapIdRange}\nRadius range: {summary.RadiusRange}\nTotal loop range: {summary.TotalLoopRange}\nWeather types: {summary.WeatherTypes}\nWeather level range: {summary.WeatherLevelRange}\nElement time range: {summary.ElementTimeRange}\nFatigue range: {summary.FatigueRange}\nEmpty groups: {summary.EmptyGroupCount}\nEmpty weather element rows: {summary.EmptyWeatherElementCount}\nElement count mismatches: {summary.ElementCountMismatchCount}\nTotal loop mismatches: {summary.TotalLoopMismatchCount}\nDuplicate group indexes: {summary.DuplicateGroupIndexCount}\n\nCurrent decision\nNo import is available. Weather.bin describes client-side map weather areas and looping weather elements. The live ODMO schema has no matching Weather table/column, and the C# server source does not load this package.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Weather: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "WorldMap") { try { WorldMapProfileSummary summary = WorldMapProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for WorldMap. Worlds: {summary.WorldCount}, areas: {summary.AreaCount}, duplicate area map ids: {summary.DuplicateAreaMapIdCount}."); MessageBox.Show( $"WorldMap summary\n\nWorld rows: {summary.WorldCount}\nArea rows: {summary.AreaCount}\nWorld id range: {summary.WorldIdRange}\nArea map id range: {summary.AreaMapIdRange}\nWorld types: {summary.WorldTypes}\nArea types: {summary.AreaTypes}\nField types: {summary.FieldTypes}\nWorld UI X range: {summary.WorldUiXRange}\nWorld UI Y range: {summary.WorldUiYRange}\nArea UI X range: {summary.AreaUiXRange}\nArea UI Y range: {summary.AreaUiYRange}\nDuplicate world ids: {summary.DuplicateWorldIdCount}\nDuplicate area map ids: {summary.DuplicateAreaMapIdCount}\nInvalid gaussian blur rows: {summary.InvalidGaussianBlurCount}\nStrings longer than fixed BIN capacity: {summary.LongStringCount}\n\nCurrent decision\nNo import is available. WorldMap.bin describes client world/area map UI layout and display text. The server Asset.Map table is separate runtime map metadata, and no matching SQL table exists for this UI package.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for WorldMap: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapObject") { try { MapObjectProfileSummary summary = _config == null ? MapObjectProfileInspector.ValidateXml(ResolveProfileXmlPath(profile)) : MapObjectProfileInspector.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for MapObject. Map groups: {summary.MapGroupCount}, buckets: {summary.ObjectBucketCount}, factors: {summary.FactorCount}."); MessageBox.Show( $"MapObject summary\n\nMap groups: {summary.MapGroupCount}\nObject buckets: {summary.ObjectBucketCount}\nMap object rows: {summary.MapObjectCount}\nFactor rows: {summary.FactorCount}\nDistinct maps: {summary.DistinctMapCount}\nDistinct object ids: {summary.DistinctObjectIdCount}\nOpen types: {summary.OpenTypes}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\n\nCurrent decision\nNo import is available. This package is map-object/open-condition data, and the current server database has no matching table for it. Keeping it XML-only avoids fake columns or unsafe schema guesses.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for MapObject: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MasterCard") { try { MasterCardProfileSummary summary = MasterCardProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for MasterCard. Cards: {summary.MasterCardCount}, grades: {summary.MasterCardGradeCount}, filters: {summary.MasterFilterCount}."); MessageBox.Show( $"MasterCard summary\n\nMaster card rows: {summary.MasterCardCount}\nCard grade rows: {summary.MasterCardGradeCount}\nLeader rows: {summary.LeaderCount}\nLeader ability rows: {summary.LeaderAbilityCount}\nLeader ability term rows: {summary.LeaderAbilityTermCount}\nMaster filter rows: {summary.MasterFilterCount}\nDistinct seal item ids in filters: {summary.DistinctSealItemCount}\nDigimon image path rows: {summary.DigimonImagePathCount}\nAttribute rows: {summary.AttributeCount}\nElemental rows: {summary.ElementalCount}\nPlate path rows: {summary.PlatePathCount}\nDuplicate card ids: {summary.DuplicateCardIdCount}\nDuplicate leader ids: {summary.DuplicateLeaderIdCount}\n\nCurrent decision\nNo import is available. MasterCard.bin is a Seal Master/card collection client package, and the current server database/source does not contain matching MasterCard or SealMaster asset tables. Keeping it XML-only avoids fake SQL fields and unsafe schema guesses.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for MasterCard: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Nature") { try { NatureProfileSummary summary = NatureProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for Nature. Nature rows: {summary.NatureCount}, matrix rows: {summary.NatureElementCount}, base-element points: {summary.PointCount}."); MessageBox.Show( $"Nature summary\n\nNature rows: {summary.NatureCount}\nNature element matrix rows: {summary.NatureElementCount}\nNature ids: {summary.NatureIds}\nNature value range: {summary.NatureValueRange}\nBaseElement compare types: {summary.CompareTypeCount} ({summary.CompareTypes})\nBaseElement base-type rows: {summary.BaseTypeCount}\nBaseElement point rows: {summary.PointCount}\nBaseElement value range: {summary.BaseElementValueRange}\nDuplicate nature ids: {summary.DuplicateNatureIdCount}\n\nCurrent decision\nNo import is available. Nature.xml and BaseElement.xml describe client/reference advantage matrices, while the current server source uses DigimonAttributeEnum, DigimonElementEnum, and hardcoded HasAttributeAdvantage/HasElementAdvantage helpers. There is no current Asset/Config table to receive these rows safely.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Nature: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "New_Element") { try { NewElementProfileSummary summary = NewElementProfileInspector.ValidatePackage(ResolveProfileXmlPath(profile)); AppendLog($"Preview requested for New_Element. Attribute UI rows: {summary.AttributeTypeUiCount}, nature UI rows: {summary.NatureTypeUiCount}."); MessageBox.Show( $"New_Element summary\n\nAttributeTypeUI rows: {summary.AttributeTypeUiCount}\nAttribute ids: {summary.AttributeIds}\nNatureTypeUI rows: {summary.NatureTypeUiCount}\nNature ids: {summary.NatureIds}\nDuplicate attribute ids: {summary.DuplicateAttributeIdCount}\nDuplicate nature ids: {summary.DuplicateNatureIdCount}\n\nCurrent decision\nNo import is available. AttributeTypeUI.xml and NatureTypeUI.xml are client interface placement/image-path lookup files for the digimon status element UI. The server stores actual digimon attributes/elements on Asset.DigimonBaseInfo and Asset.MonsterBaseInfo, and does not need these UI coordinates in SQL.", "Profile Summary - Client Side Only", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for New_Element: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapRegion") { try { MapRegionAssetImportSummary summary = _config == null ? MapRegionAssetImporter.ValidateXml(ResolveProfileXmlPath(profile), ResolveMapBuffRegionXmlPath(), ResolveMapLimitEvoXmlPath()) : MapRegionAssetImporter.AssessDatabase(_config.ConnectionString, ResolveProfileXmlPath(profile), ResolveMapBuffRegionXmlPath(), ResolveMapLimitEvoXmlPath()); AppendLog($"Preview requested for MapRegion. Map groups: {summary.MapGroupCount}, region rows: {summary.RegionCount}, buff regions client-side: {summary.BuffRegionCount}, limit evo regions client-side: {summary.LimitEvoRegionCount}."); MessageBox.Show( $"MapRegion summary\n\nMap groups: {summary.MapGroupCount}\nRegion rows ready for Asset.MapRegion: {summary.RegionCount}\nDistinct maps: {summary.DistinctMapCount}\nMissing Asset.Map references: {summary.MissingAssetMapCount}\nCurrent Asset.MapRegionList rows: {summary.CurrentMapRegionListCount}\nCurrent Asset.MapRegion rows: {summary.CurrentMapRegionCount}\nClient-only MapBuffRegion rows: {summary.BuffRegionCount}\nClient-only MapLimitEvo rows: {summary.LimitEvoRegionCount}\n\nImport behavior\nUpdates/inserts Asset.MapRegionList only for maps present in MapRegion.xml.\nDeletes and recreates Asset.MapRegion children only for those maps.\nPreserves unrelated map region lists.\nUses Asset.Map.Name for MapRegionList.Name.\nIgnored on SQL import: radius, descriptions beyond cleaned ASCII name, BG sound, fatigue fields, MapBuffRegion.xml, and MapLimitEvo.xml.", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for MapRegion: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Skill") { try { SkillAssetImportSummary summary = SkillAssetImporter.ValidateXml( ResolveProfileXmlPath(profile), ResolveSkillTamerSkillXmlPath(), ResolveSkillAreaCheckXmlPath()); AppendLog($"Preview requested for Skill. SkillInfo rows: {summary.SkillInfoCount}, SkillCode rows: {summary.SkillCodeCount}, apply rows: {summary.SkillCodeApplyCount}, tamer skills: {summary.TamerSkillCount}."); MessageBox.Show( $"Skill summary\n\nRows ready for replace import\nSkillInfo: {summary.SkillInfoCount}\nSkillCode: {summary.SkillCodeCount}\nSkillCodeApply: {summary.SkillCodeApplyCount}\nTamerSkill: {summary.TamerSkillCount}\n\nClient-side only for now\nAreaCheck rows: {summary.AreaCheckCount}\n\nSafety notes\nInvalid invoke-rate rows are clamped to chance 0: {summary.InvalidInvokeRateCount}\ns_nMemorySkill rows ignored: {summary.IgnoredMemorySkillCount}\n\nTargets: Asset.SkillInfo, Asset.SkillCode, Asset.SkillCodeApply, Asset.TamerSkill\nImported XML: Skill.xml, TamerSkill.xml\nClient-only XML: AreaCheck.xml", "Profile Summary", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { AppendLog($"Preview failed for Skill: {ex.Message}"); MessageBox.Show(ex.Message, "Preview Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } MessageBox.Show( $"Profile '{profile.Name}' is visible for planning, but preview is not available until we map its XML to SQL.", "Preview Not Available", MessageBoxButtons.OK, MessageBoxIcon.Information); } private void importButton_Click(object sender, EventArgs e) { if (profileComboBox.SelectedItem is not ImportProfileViewModel profile) { return; } if (_config == null) { MessageBox.Show( $"config.txt is missing or invalid.\n\nExpected path:\n{DatabaseHelper.GetConfigPath()}", "Config Missing", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (!profile.SupportsImport) { MessageBox.Show( $"Profile '{profile.Name}' is not mapped to SQL yet.\n\nIt can stay in the list for planning, but import is disabled until we build that importer.", "Import Not Available", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (profile.Name == "Digimon_List") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.DigimonBaseInfo and recreate them from DigimonList.xml inside one transaction.\n\nSaved Digimon/evolution references to types missing from DigimonList.xml will be removed first.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Digimon_List replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Digimon_List replace import."); DigimonBaseInfoImportSummary summary = DigimonBaseInfoImporter.ImportReplace(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Digimon_List import complete. Deleted {summary.DeletedCount}, inserted {summary.InsertedCount}. Removed invalid saved digimon: {summary.DeletedInvalidDigimonCount}, evolutions: {summary.DeletedInvalidEvolutionCount}, encyclopedia evolutions: {summary.DeletedInvalidEncyclopediaEvolutionCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted rows: {summary.DeletedCount}\nInserted rows: {summary.InsertedCount}\nTarget: Asset.DigimonBaseInfo\n\nRemoved invalid saved Digimon: {summary.DeletedInvalidDigimonCount}\nRemoved invalid saved evolutions: {summary.DeletedInvalidEvolutionCount}\nRemoved invalid encyclopedia evolutions: {summary.DeletedInvalidEncyclopediaEvolutionCount}", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Digimon_List import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Monster") { string monsterXmlPath = ResolveProfileXmlPath(profile); string monsterSkillXmlPath = ResolveMonsterSkillXmlPath(); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.MonsterBaseInfo, Asset.MonsterSkill, and Asset.MonsterSkillInfo and recreate them from Monster.xml and MonsterSkill.xml inside one transaction.\n\nMonsterHit.xml and MonsterSkillTerms.xml will stay client-only.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Monster package replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Monster package replace import."); MonsterPackageImportSummary summary = MonsterPackageImporter.ImportReplace(_config.ConnectionString, monsterXmlPath, monsterSkillXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Monster import complete. Deleted base {summary.DeletedMonsterBaseInfoCount}, skill {summary.DeletedMonsterSkillCount}, skill info {summary.DeletedMonsterSkillInfoCount}. Inserted base {summary.InsertedMonsterBaseInfoCount}, skill {summary.InsertedMonsterSkillCount}, skill info {summary.InsertedMonsterSkillInfoCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted base rows: {summary.DeletedMonsterBaseInfoCount}\nDeleted skill rows: {summary.DeletedMonsterSkillCount}\nDeleted skill info rows: {summary.DeletedMonsterSkillInfoCount}\nInserted base rows: {summary.InsertedMonsterBaseInfoCount}\nInserted skill rows: {summary.InsertedMonsterSkillCount}\nInserted skill info rows: {summary.InsertedMonsterSkillInfoCount}", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Monster import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Buff") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.Buff and recreate them from Buff.xml inside one transaction.\n\nComment, icon, delete flag, and effect file stay client-side only and will not be imported.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Buff replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Buff replace import."); BuffAssetImportSummary summary = BuffAssetImporter.ImportReplace(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Buff import complete. Deleted {summary.DeletedCount}, inserted {summary.InsertedCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted rows: {summary.DeletedCount}\nInserted rows: {summary.InsertedCount}\nTarget: Asset.Buff", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Buff import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Achieve") { string achieveXmlPath = ResolveProfileXmlPath(profile); string achieveHeaderXmlPath = ResolveAchieveHeaderXmlPath(); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.Achievement and recreate them from Achieve.xml inside one transaction.\n\nAchieveHeader.xml and client display fields will stay client-side only and will not be imported.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Achieve replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Achieve replace import."); AchievementAssetImportSummary summary = AchievementAssetImporter.ImportReplace( _config.ConnectionString, achieveXmlPath, achieveHeaderXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Achieve import complete. Deleted {summary.DeletedCount}, inserted {summary.InsertedCount}. Header rows left client-side: {summary.HeaderRecordCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted rows: {summary.DeletedCount}\nInserted rows: {summary.InsertedCount}\nClient-only header rows ignored: {summary.HeaderRecordCount}\nTarget: Asset.Achievement", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Achieve import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "DigimonEvo") { string digimonEvoXmlPath = ResolveProfileXmlPath(profile); string battleEvoXmlPath = ResolveBattleEvoXmlPath(); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.Evolution, Asset.EvolutionLine, and Asset.EvolutionStage and recreate them from DigimonEvo.xml inside one transaction.\n\nBattleEvo.xml and DigimonEvo client visual/layout fields will stay client-side only and will not be imported.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("DigimonEvo replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting DigimonEvo replace import."); DigimonEvolutionImportSummary summary = DigimonEvolutionAssetImporter.ImportReplace( _config.ConnectionString, digimonEvoXmlPath, battleEvoXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"DigimonEvo import complete. Deleted evolution {summary.DeletedEvolutionCount}, line {summary.DeletedEvolutionLineCount}, stage {summary.DeletedEvolutionStageCount}. Inserted evolution {summary.InsertedEvolutionCount}, line {summary.InsertedEvolutionLineCount}, stage {summary.InsertedEvolutionStageCount}. BattleEvo rows left client-side: {summary.BattleEvolutionRecordCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted evolution rows: {summary.DeletedEvolutionCount}\nDeleted evolution line rows: {summary.DeletedEvolutionLineCount}\nDeleted evolution stage rows: {summary.DeletedEvolutionStageCount}\nInserted evolution rows: {summary.InsertedEvolutionCount}\nInserted evolution line rows: {summary.InsertedEvolutionLineCount}\nInserted evolution stage rows: {summary.InsertedEvolutionStageCount}\nClient-only BattleEvo rows ignored: {summary.BattleEvolutionRecordCount}\nTargets: Asset.Evolution, Asset.EvolutionLine, Asset.EvolutionStage", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"DigimonEvo import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } if (profile.Name == "Digimon_Book") { string bookInfoXmlPath = ResolveProfileXmlPath(profile); string deckOptionXmlPath = ResolveDigimonBookDeckOptionXmlPath(); string encyclopediaExceptionXmlPath = ResolveDigimonBookEncyclopediaExceptionXmlPath(); string deckCompositionXmlPath = ResolveDigimonBookDeckCompositionXmlPath(); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.DeckBookInfo, Asset.DeckBuff, and Asset.DeckBuffOption and recreate them from BookInfo.xml and DeckOption.xml inside one transaction.\n\nThe importer will add a synthetic 'None' DeckBookInfo row because the current client XML starts at OptionId 1. EncyclopediaException.xml and DeckComposition.xml will stay client-side only.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Digimon_Book replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Digimon_Book replace import."); DigimonBookImportSummary summary = DigimonBookAssetImporter.ImportReplace( _config.ConnectionString, bookInfoXmlPath, deckOptionXmlPath, encyclopediaExceptionXmlPath, deckCompositionXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Digimon_Book import complete. Deleted DeckBookInfo {summary.DeletedDeckBookInfoCount}, DeckBuff {summary.DeletedDeckBuffCount}, DeckBuffOption {summary.DeletedDeckBuffOptionCount}. Inserted DeckBookInfo {summary.InsertedDeckBookInfoCount}, DeckBuff {summary.InsertedDeckBuffCount}, DeckBuffOption {summary.InsertedDeckBuffOptionCount}. Client-only EncyclopediaException rows: {summary.EncyclopediaExceptionRecordCount}, DeckComposition rows: {summary.DeckCompositionRecordCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted DeckBookInfo rows: {summary.DeletedDeckBookInfoCount}\nDeleted DeckBuff rows: {summary.DeletedDeckBuffCount}\nDeleted DeckBuffOption rows: {summary.DeletedDeckBuffOptionCount}\nInserted DeckBookInfo rows: {summary.InsertedDeckBookInfoCount}\nInserted DeckBuff rows: {summary.InsertedDeckBuffCount}\nInserted DeckBuffOption rows: {summary.InsertedDeckBuffOptionCount}\nClient-only EncyclopediaException rows ignored: {summary.EncyclopediaExceptionRecordCount}\nClient-only DeckComposition rows ignored: {summary.DeckCompositionRecordCount}\nTargets: Asset.DeckBookInfo, Asset.DeckBuff, Asset.DeckBuffOption", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Digimon_Book import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "DMBase") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will replace Asset.StatusApply from DMBase\\EvolutionBaseApply.xml and refresh matching status rows from TamerBaseInfo.xml and DigimonBaseInfo.xml inside one transaction.\n\nOther DMBase XML files will stay client-side/config-only and will not be imported.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("DMBase replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting DMBase replace import for server-side status assets."); DMBaseStatusApplyImportSummary summary = DMBaseStatusApplyImporter.ImportReplace(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"DMBase import complete. StatusApply deleted {summary.DeletedCount}, inserted {summary.InsertedCount}. Tamer base deleted {summary.DeletedTamerBaseStatusCount}, inserted {summary.InsertedTamerBaseStatusCount}. Tamer level deleted {summary.DeletedTamerLevelStatusCount}, inserted {summary.InsertedTamerLevelStatusCount}. Digimon level deleted {summary.DeletedDigimonLevelStatusCount}, inserted {summary.InsertedDigimonLevelStatusCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted StatusApply rows: {summary.DeletedCount}\nInserted StatusApply rows: {summary.InsertedCount}\nDeleted tamer base rows: {summary.DeletedTamerBaseStatusCount}\nInserted tamer base rows: {summary.InsertedTamerBaseStatusCount}\nDeleted tamer level rows: {summary.DeletedTamerLevelStatusCount}\nInserted tamer level rows: {summary.InsertedTamerLevelStatusCount}\nDeleted digimon level rows: {summary.DeletedDigimonLevelStatusCount}\nInserted digimon level rows: {summary.InsertedDigimonLevelStatusCount}\nTargets: Asset.StatusApply, Asset.CharacterBaseStatus, Asset.CharacterLevelStatus, Asset.DigimonLevelStatus\nImported XML: EvolutionBaseApply.xml, TamerBaseInfo.xml, DigimonBaseInfo.xml", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"DMBase import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Event") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.MonthlyEvent and Asset.TimeEvent, then recreate them from Event\\MonthlyEvent.xml and Event\\Event.xml inside one transaction.\n\nEvent.xml has more reward groups than the current server consumes, so only rewards 0 to 3 are imported into Asset.TimeEvent. The remaining Event XML files stay client-side/hot-time only.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Event replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Event replace import for Asset.MonthlyEvent and Asset.TimeEvent."); EventAssetImportSummary summary = EventAssetImporter.ImportReplace(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Event import complete. Deleted monthly {summary.DeletedMonthlyCount}, time reward {summary.DeletedTimeRewardCount}. Inserted monthly {summary.InsertedMonthlyCount}, time reward {summary.InsertedTimeRewardCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted MonthlyEvent rows: {summary.DeletedMonthlyCount}\nDeleted TimeEvent rows: {summary.DeletedTimeRewardCount}\nInserted MonthlyEvent rows: {summary.InsertedMonthlyCount}\nInserted TimeEvent rows: {summary.InsertedTimeRewardCount}\nIgnored extra Event.xml reward groups until server supports them: {summary.IgnoredTimeRewardGroupCount}\nTargets: Asset.MonthlyEvent, Asset.TimeEvent\nImported XML: MonthlyEvent.xml, Event.xml", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Event import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "ExtraExchange") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.ExtraEvolutionNpc, Asset.ExtraEvolutionInformation, Asset.ExtraEvolution, Asset.ExtraEvolutionMaterial, and Asset.ExtraEvolutionRequired and recreate them from ExtraExchange.xml inside one transaction.\n\nClient-only unknown/count bookkeeping fields from ExtraExchange.xml will not be imported.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("ExtraExchange replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting ExtraExchange replace import."); ExtraEvolutionImportSummary summary = ExtraEvolutionAssetImporter.ImportReplace(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"ExtraExchange import complete. Deleted npc {summary.DeletedNpcCount}, info {summary.DeletedInformationCount}, evolution {summary.DeletedEvolutionCount}, material {summary.DeletedMaterialCount}, required {summary.DeletedRequiredCount}. Inserted npc {summary.InsertedNpcCount}, info {summary.InsertedInformationCount}, evolution {summary.InsertedEvolutionCount}, material {summary.InsertedMaterialCount}, required {summary.InsertedRequiredCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted NPC rows: {summary.DeletedNpcCount}\nDeleted info rows: {summary.DeletedInformationCount}\nDeleted evolution rows: {summary.DeletedEvolutionCount}\nDeleted material rows: {summary.DeletedMaterialCount}\nDeleted required rows: {summary.DeletedRequiredCount}\nInserted NPC rows: {summary.InsertedNpcCount}\nInserted info rows: {summary.InsertedInformationCount}\nInserted evolution rows: {summary.InsertedEvolutionCount}\nInserted material rows: {summary.InsertedMaterialCount}\nInserted required rows: {summary.InsertedRequiredCount}\nTargets: Asset.ExtraEvolutionNpc, Asset.ExtraEvolutionInformation, Asset.ExtraEvolution, Asset.ExtraEvolutionMaterial, Asset.ExtraEvolutionRequired", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"ExtraExchange import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "InfiniteWar") { string dailyRewardXmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.ArenaDailyItemReward and Asset.ArenaDailyItemRewards and recreate them from InfiniteWar\\DailyReward.xml inside one transaction.\n\nStageInfo.xml, SummonMonster.xml, RankReward.xml, and AwardNpc.xml will stay client-side only and will not be imported.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("InfiniteWar replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting InfiniteWar replace import for arena daily rewards."); InfiniteWarArenaDailyImportSummary summary = InfiniteWarArenaDailyImporter.ImportReplace(_config.ConnectionString, dailyRewardXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"InfiniteWar import complete. Deleted groups {summary.DeletedDailyRewardGroupCount}, reward rows {summary.DeletedDailyRewardItemCount}. Inserted groups {summary.InsertedDailyRewardGroupCount}, reward rows {summary.InsertedDailyRewardItemCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted daily reward groups: {summary.DeletedDailyRewardGroupCount}\nDeleted daily reward rows: {summary.DeletedDailyRewardItemCount}\nInserted daily reward groups: {summary.InsertedDailyRewardGroupCount}\nInserted daily reward rows: {summary.InsertedDailyRewardItemCount}\nTargets: Asset.ArenaDailyItemRewards, Asset.ArenaDailyItemReward\nImported XML: DailyReward.xml", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"InfiniteWar import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "ItemList") { string itemListXmlPath = ResolveProfileXmlPath(profile); string itemMakingXmlPath = ResolveItemMakingXmlPath(); string itemAccessoryXmlPath = ResolveItemAccessoryXmlPath(); string itemXaiXmlPath = ResolveItemXaiXmlPath(); DialogResult confirm = MessageBox.Show( "This will delete and recreate the core server item asset tables from ItemList.xml, ItemMaking.xml, ItemAcessorys.xml, and ItemXai.xml inside one transaction.\n\nClient-only item support XML files such as ItemCoolTime.xml, ItemDisplay.xml, ItemExchange.xml, ItemLook.xml, ItemRank.xml, ItemRankEffectList.xml, ItemTap.xml, ItemTypeName.xml, ElementItem.xml, ElementItem1.xml, AcessorysEnchant.xml, ItemMakingGroupList.xml, and ServerItemList.xml will not be imported.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("ItemList replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting ItemList replace import."); ItemListAssetImportSummary summary = ItemListAssetImporter.ImportReplace( _config.ConnectionString, itemListXmlPath, itemMakingXmlPath, itemAccessoryXmlPath, itemXaiXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"ItemList import complete. Deleted ItemInfo {summary.DeletedItemInfoCount}, ItemCraft {summary.DeletedItemCraftCount}, ItemCraftMaterial {summary.DeletedItemCraftMaterialCount}, AccessoryRoll {summary.DeletedAccessoryRollCount}, AccessoryRollStatus {summary.DeletedAccessoryRollStatusCount}, Xai {summary.DeletedXaiCount}. Inserted ItemInfo {summary.InsertedItemInfoCount}, ItemCraft {summary.InsertedItemCraftCount}, ItemCraftMaterial {summary.InsertedItemCraftMaterialCount}, AccessoryRoll {summary.InsertedAccessoryRollCount}, AccessoryRollStatus {summary.InsertedAccessoryRollStatusCount}, Xai {summary.InsertedXaiCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted ItemInfo rows: {summary.DeletedItemInfoCount}\nDeleted ItemCraft rows: {summary.DeletedItemCraftCount}\nDeleted ItemCraftMaterial rows: {summary.DeletedItemCraftMaterialCount}\nDeleted AccessoryRoll rows: {summary.DeletedAccessoryRollCount}\nDeleted AccessoryRollStatus rows: {summary.DeletedAccessoryRollStatusCount}\nDeleted Xai rows: {summary.DeletedXaiCount}\nInserted ItemInfo rows: {summary.InsertedItemInfoCount}\nInserted ItemCraft rows: {summary.InsertedItemCraftCount}\nInserted ItemCraftMaterial rows: {summary.InsertedItemCraftMaterialCount}\nInserted AccessoryRoll rows: {summary.InsertedAccessoryRollCount}\nInserted AccessoryRollStatus rows: {summary.InsertedAccessoryRollStatusCount}\nInserted Xai rows: {summary.InsertedXaiCount}\nTargets: Asset.ItemInfo, Asset.ItemCraft, Asset.ItemCraftMaterial, Asset.AccessoryRoll, Asset.AccessoryRollStatus, Asset.Xai", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"ItemList import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapList") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will delete all rows in Asset.Map and recreate them from MapList.xml inside one transaction.\n\nMap path, background sound, dimensions, fatigue settings, and camera settings will stay client-side only and will not be imported.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("MapList replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting MapList replace import."); MapAssetImportSummary summary = MapAssetImporter.ImportReplace(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"MapList import complete. Deleted {summary.DeletedCount}, inserted {summary.InsertedCount} into Asset.Map."); MessageBox.Show( $"Import completed successfully.\n\nDeleted rows: {summary.DeletedCount}\nInserted rows: {summary.InsertedCount}\nTarget: Asset.Map", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"MapList import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapMonsterList") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will rebuild regular monster spawn configuration from MapMonsterList.xml inside one transaction.\n\nTables rebuilt:\n- Config.Mob\n- Config.MobLocation\n- Config.MobDropReward\n- Config.MobExpReward\n- Config.ItemDropReward\n- Config.BitsDropReward\n\nMob stats are copied from Asset.MonsterBaseInfo. Drop, bits, and exp rewards are cloned from the existing reward template for each monster type. Monster types without an existing template get empty drop shells and zero exp rows.\n\nDo you want to continue?", "Confirm Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("MapMonsterList replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting MapMonsterList replace import."); MapMonsterListConfigSummary summary = MapMonsterListConfigImporter.ImportReplace(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"MapMonsterList import complete. Inserted mobs {summary.InsertedConfigMobCount}, locations {summary.InsertedMobLocationCount}, drop rewards {summary.InsertedMobDropRewardCount}, exp rewards {summary.InsertedMobExpRewardCount}, item drops {summary.InsertedItemDropRewardCount}, bits drops {summary.InsertedBitsDropRewardCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted Config.Mob rows: {summary.DeletedConfigMobCount}\nDeleted MobLocation rows: {summary.DeletedMobLocationCount}\nDeleted MobDropReward rows: {summary.DeletedMobDropRewardCount}\nDeleted MobExpReward rows: {summary.DeletedMobExpRewardCount}\nDeleted ItemDropReward rows: {summary.DeletedItemDropRewardCount}\nDeleted BitsDropReward rows: {summary.DeletedBitsDropRewardCount}\n\nInserted Config.Mob rows: {summary.InsertedConfigMobCount}\nInserted MobLocation rows: {summary.InsertedMobLocationCount}\nInserted MobDropReward rows: {summary.InsertedMobDropRewardCount}\nInserted MobExpReward rows: {summary.InsertedMobExpRewardCount}\nInserted ItemDropReward rows: {summary.InsertedItemDropRewardCount}\nInserted BitsDropReward rows: {summary.InsertedBitsDropRewardCount}\nMonster types with empty reward shells: {summary.MissingRewardTemplateTypeCount}\nTargets: Config mob spawn and reward tables", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"MapMonsterList import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapNpc") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will merge missing NPC/map rows from MapNpc.xml into Asset.Npc.\n\nNo rows will be deleted. Existing Asset.Npc identity values and attached shop/portal child rows will be preserved.\n\nX/Y position and rotation stay XML-only because the current Asset.Npc table does not have matching columns.\n\nDo you want to continue?", "Confirm Merge Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("MapNpc merge import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting MapNpc merge import."); MapNpcAssetImportSummary summary = MapNpcAssetImporter.ImportMerge(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"MapNpc merge import complete. Inserted {summary.InsertedCount} missing rows into Asset.Npc. Existing matches preserved: {summary.ExistingMatchCount}. Ignored sentinel rows: {summary.IgnoredInvalidMapCount}."); MessageBox.Show( $"Import completed successfully.\n\nInserted missing rows: {summary.InsertedCount}\nExisting XML rows already in DB: {summary.ExistingMatchCount}\nIgnored invalid/sentinel map rows: {summary.IgnoredInvalidMapCount}\nTarget: Asset.Npc\nMode: non-destructive merge insert", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"MapNpc import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapPortal") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will sync Asset.Portal from MapPortal.xml inside one transaction.\n\nImport behavior:\n- Update existing portal ids found in MapPortal.xml.\n- Insert missing portal ids from MapPortal.xml.\n- Preserve DB-only Asset.Portal rows because the current XML package does not contain every existing portal row.\n- Ignore rows with destination map 0 because they are not usable server warp targets.\n\nDo you want to continue?", "Confirm Portal Sync", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("MapPortal sync import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting MapPortal sync import."); MapPortalAssetImportSummary summary = MapPortalAssetImporter.ImportSync(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"MapPortal sync complete. Updated {summary.UpdatedPortalCount}, inserted {summary.InsertedPortalCount}, preserved DB-only {summary.PreservedDbOnlyPortalCount}."); MessageBox.Show( $"Import completed successfully.\n\nUpdated existing portal rows: {summary.UpdatedPortalCount}\nInserted missing portal rows: {summary.InsertedPortalCount}\nDB-only portal rows preserved: {summary.PreservedDbOnlyPortalCount}\nIgnored invalid destination rows: {summary.IgnoredInvalidDestinationPortalCount}\nXML portal rows processed: {summary.XmlPortalCount}\nTarget: Asset.Portal\nMode: non-destructive sync", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"MapPortal import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Npc") { string npcXmlPath = ResolveProfileXmlPath(profile); string modelInfoXmlPath = ResolveNpcModelInfoXmlPath(); string npcEventXmlPath = ResolveNpcEventXmlPath(); DialogResult confirm = MessageBox.Show( "This will sync the server-used NPC package data from Npc.xml.\n\nImport behavior:\n- Insert missing Asset.Npc rows for NpcId/MapId pairs.\n- Rebuild NpcItem and NpcPortal child rows only for NPCs present in Npc.xml.\n- Existing Asset.Npc identity IDs are preserved.\n- Name, talk, model, type/display flags, ModelInfo.xml, and NpcEvent.xml stay XML-only.\n\nDo you want to continue?", "Confirm NPC Package Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Npc package import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Npc package import."); NpcPackageImportSummary summary = NpcPackageImporter.ImportSync( _config.ConnectionString, npcXmlPath, modelInfoXmlPath, npcEventXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Npc import complete. Inserted NPC rows {summary.InsertedNpcCount}. Ignored no-map rows {summary.IgnoredNoMapNpcCount}, empty portal blocks {summary.IgnoredEmptyPortalCount}. Rebuilt child rows: items {summary.InsertedNpcItemCount}, portals {summary.InsertedNpcPortalCount}, portal entries {summary.InsertedNpcPortalAmountCount}, requirements {summary.InsertedNpcPortalRequirementCount}."); MessageBox.Show( $"Import completed successfully.\n\nInserted missing Asset.Npc rows: {summary.InsertedNpcCount}\nIgnored no-map NPC rows: {summary.IgnoredNoMapNpcCount}\nIgnored empty portal blocks: {summary.IgnoredEmptyPortalCount}\nDeleted old NpcItem rows for XML NPCs: {summary.DeletedNpcItemCount}\nInserted NpcItem rows: {summary.InsertedNpcItemCount}\nDeleted old NpcPortal rows for XML NPCs: {summary.DeletedNpcPortalCount}\nInserted NpcPortal rows: {summary.InsertedNpcPortalCount}\nDeleted old portal entry rows: {summary.DeletedNpcPortalAmountCount}\nInserted portal entry rows: {summary.InsertedNpcPortalAmountCount}\nDeleted old portal requirement rows: {summary.DeletedNpcPortalRequirementCount}\nInserted portal requirement rows: {summary.InsertedNpcPortalRequirementCount}\nTargets: Asset.Npc, Asset.NpcItem, Asset.NpcPortal, Asset.NpcPortalsAmount, Asset.NpcPortals\nMode: preserve Asset.Npc identities, sync children for Npc.xml rows", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Npc import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Quest") { string xmlPath = ResolveProfileXmlPath(profile); DialogResult confirm = MessageBox.Show( "This will delete and recreate all static Asset quest tables from Quest.xml inside one transaction.\n\nTargets:\n- Asset.Quest\n- Asset.QuestCondition\n- Asset.QuestGoal\n- Asset.QuestReward\n- Asset.QuestRewardObject\n- Asset.QuestSupply\n- Asset.QuestEvent\n\nCharacter.InProgressQuest and other player progress rows will not be touched.\n\nDo you want to continue?", "Confirm Quest Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Quest replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Quest replace import."); QuestAssetImportSummary summary = QuestAssetImporter.ImportReplace(_config.ConnectionString, xmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Quest import complete. Deleted quests {summary.DeletedQuestCount}, conditions {summary.DeletedConditionCount}, goals {summary.DeletedGoalCount}, rewards {summary.DeletedRewardCount}, reward objects {summary.DeletedRewardObjectCount}, supplies {summary.DeletedSupplyCount}, events {summary.DeletedEventCount}. Inserted quests {summary.InsertedQuestCount}, conditions {summary.InsertedConditionCount}, goals {summary.InsertedGoalCount}, rewards {summary.InsertedRewardCount}, reward objects {summary.InsertedRewardObjectCount}, supplies {summary.InsertedSupplyCount}, events {summary.InsertedEventCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted Quest rows: {summary.DeletedQuestCount}\nDeleted Condition rows: {summary.DeletedConditionCount}\nDeleted Goal rows: {summary.DeletedGoalCount}\nDeleted Reward rows: {summary.DeletedRewardCount}\nDeleted RewardObject rows: {summary.DeletedRewardObjectCount}\nDeleted Supply rows: {summary.DeletedSupplyCount}\nDeleted Event rows: {summary.DeletedEventCount}\n\nInserted Quest rows: {summary.InsertedQuestCount}\nInserted Condition rows: {summary.InsertedConditionCount}\nInserted Goal rows: {summary.InsertedGoalCount}\nInserted Reward rows: {summary.InsertedRewardCount}\nInserted RewardObject rows: {summary.InsertedRewardObjectCount}\nInserted Supply rows: {summary.InsertedSupplyCount}\nInserted Event rows: {summary.InsertedEventCount}\nUnsupported reward type rows kept but ignored by current server switch: {summary.UnsupportedRewardTypeCount}\nTargets: Asset quest tables only", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Quest import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "MapRegion") { string mapRegionXmlPath = ResolveProfileXmlPath(profile); string mapBuffRegionXmlPath = ResolveMapBuffRegionXmlPath(); string mapLimitEvoXmlPath = ResolveMapLimitEvoXmlPath(); DialogResult confirm = MessageBox.Show( "This will update/insert Asset.MapRegionList for maps present in MapRegion.xml, then delete and recreate Asset.MapRegion rows only for those maps inside one transaction.\n\nUnrelated map region lists will be preserved. MapBuffRegion.xml and MapLimitEvo.xml stay client-side only because the current server schema has no matching tables for them.\n\nDo you want to continue?", "Confirm Targeted Merge Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("MapRegion targeted merge import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting MapRegion targeted merge import."); MapRegionAssetImportSummary summary = MapRegionAssetImporter.ImportMergeReplace( _config.ConnectionString, mapRegionXmlPath, mapBuffRegionXmlPath, mapLimitEvoXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"MapRegion import complete. Updated lists {summary.UpdatedMapRegionListCount}, inserted lists {summary.InsertedMapRegionListCount}, deleted regions {summary.DeletedMapRegionCount}, inserted regions {summary.InsertedMapRegionCount}. Client-only buff regions {summary.BuffRegionCount}, limit evo regions {summary.LimitEvoRegionCount}."); MessageBox.Show( $"Import completed successfully.\n\nUpdated MapRegionList rows: {summary.UpdatedMapRegionListCount}\nInserted MapRegionList rows: {summary.InsertedMapRegionListCount}\nDeleted MapRegion rows for XML maps: {summary.DeletedMapRegionCount}\nInserted MapRegion rows: {summary.InsertedMapRegionCount}\nClient-only MapBuffRegion rows ignored: {summary.BuffRegionCount}\nClient-only MapLimitEvo rows ignored: {summary.LimitEvoRegionCount}\nTargets: Asset.MapRegionList, Asset.MapRegion", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"MapRegion import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } if (profile.Name == "Skill") { string skillXmlPath = ResolveProfileXmlPath(profile); string tamerSkillXmlPath = ResolveSkillTamerSkillXmlPath(); string areaCheckXmlPath = ResolveSkillAreaCheckXmlPath(); DialogResult confirm = MessageBox.Show( "This will delete and recreate these Skill asset tables inside one transaction:\n\n- Asset.SkillInfo\n- Asset.SkillCode\n- Asset.SkillCodeApply\n- Asset.TamerSkill\n\nAreaCheck.xml stays client-side only. Invalid invoke-rate padding values are clamped to chance 0. s_nMemorySkill is not imported because the current DB column is tinyint and the server does not consume it.\n\nDo you want to continue?", "Confirm Skill Replace Import", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirm != DialogResult.Yes) { AppendLog("Skill replace import canceled by user."); return; } try { statusValueLabel.Text = "Import running"; AppendLog("Starting Skill replace import."); SkillAssetImportSummary summary = SkillAssetImporter.ImportReplace( _config.ConnectionString, skillXmlPath, tamerSkillXmlPath, areaCheckXmlPath); statusValueLabel.Text = "Import complete"; AppendLog($"Skill import complete. Deleted SkillInfo {summary.DeletedSkillInfoCount}, SkillCode {summary.DeletedSkillCodeCount}, SkillCodeApply {summary.DeletedSkillCodeApplyCount}, TamerSkill {summary.DeletedTamerSkillCount}. Inserted SkillInfo {summary.InsertedSkillInfoCount}, SkillCode {summary.InsertedSkillCodeCount}, SkillCodeApply {summary.InsertedSkillCodeApplyCount}, TamerSkill {summary.InsertedTamerSkillCount}. AreaCheck client-only rows {summary.AreaCheckCount}."); MessageBox.Show( $"Import completed successfully.\n\nDeleted SkillInfo rows: {summary.DeletedSkillInfoCount}\nDeleted SkillCode rows: {summary.DeletedSkillCodeCount}\nDeleted SkillCodeApply rows: {summary.DeletedSkillCodeApplyCount}\nDeleted TamerSkill rows: {summary.DeletedTamerSkillCount}\n\nInserted SkillInfo rows: {summary.InsertedSkillInfoCount}\nInserted SkillCode rows: {summary.InsertedSkillCodeCount}\nInserted SkillCodeApply rows: {summary.InsertedSkillCodeApplyCount}\nInserted TamerSkill rows: {summary.InsertedTamerSkillCount}\n\nClient-only AreaCheck rows ignored: {summary.AreaCheckCount}\nInvalid invoke-rate rows clamped to chance 0: {summary.InvalidInvokeRateCount}\ns_nMemorySkill rows ignored: {summary.IgnoredMemorySkillCount}\nTargets: Asset.SkillInfo, Asset.SkillCode, Asset.SkillCodeApply, Asset.TamerSkill", "Import Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { statusValueLabel.Text = "Import failed"; AppendLog($"Skill import failed: {ex.Message}"); MessageBox.Show(ex.Message, "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return; } } private void InitializeProfiles() { BuildProfiles(); profileComboBox.DisplayMember = nameof(ImportProfileViewModel.Name); profileComboBox.ValueMember = nameof(ImportProfileViewModel.Name); profileComboBox.DataSource = null; profileComboBox.DataSource = _profiles; if (_profiles.Count > 0) { profileComboBox.SelectedIndex = 0; } } private void BuildProfiles() { _profiles.Clear(); _profiles.AddRange(CreateSupportedProfiles()); _profiles.AddRange(CreateKnownPlannedProfiles()); HashSet existingNames = new(_profiles.Select(x => x.Name), StringComparer.OrdinalIgnoreCase); foreach (ImportProfileViewModel discoveredProfile in DiscoverPlaceholderProfiles(existingNames)) { _profiles.Add(discoveredProfile); } _profiles.Sort((left, right) => string.Compare(left.Name, right.Name, StringComparison.OrdinalIgnoreCase)); } private static IEnumerable CreateSupportedProfiles() { yield return new ImportProfileViewModel( "Digimon_List", "Imports Digimon base records from DigimonList.xml into the main digimon table.", @"Digimon_List\DigimonList.xml", new[] { "Asset.DigimonBaseInfo" }, new[] { "Client-only fields stay in XML and are ignored by SQL import.", "This profile replaces Asset.DigimonBaseInfo inside a transaction.", "Saved Digimon/evolution references to types missing from DigimonList.xml are removed before replace.", "Identity values are rebuilt in XML order so the table stays consistent after replace." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "Monster", "Imports base monster rows and monster skill rows from the Monster package.", @"Monster\Monster.xml", new[] { "Asset.MonsterBaseInfo", "Asset.MonsterSkill", "Asset.MonsterSkillInfo", }, new[] { "Monster.xml feeds Asset.MonsterBaseInfo.", "MonsterSkill.xml feeds Asset.MonsterSkill and Asset.MonsterSkillInfo.", "MonsterHit.xml stays client-only because there is no matching Asset hit table.", "MonsterSkillTerms.xml stays client-only for now because there is no matching Asset terms/range table." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "Buff", "Imports the server-used buff rows from Buff.xml into Asset.Buff.", @"Buff\Buff.xml", new[] { "Asset.Buff" }, new[] { "Buff.xml maps cleanly to Asset.Buff for core gameplay fields.", "Ignored on SQL import: comment, icon, delete flag, and effect file.", "This profile replaces Asset.Buff inside one transaction.", "Identity values are rebuilt in XML order so the table stays consistent after replace." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); } private static IEnumerable CreateKnownPlannedProfiles() { yield return new ImportProfileViewModel( "Achieve", "Imports the core achievement asset rows from Achieve.xml. AchieveHeader.xml stays client-side for UI grouping.", @"Achieve\Achieve.xml", new[] { "Asset.Achievement", "No mapping required - client side only (AchieveHeader.xml)" }, new[] { "Achieve.xml contains core asset fields that match Asset.Achievement: QuestId, Type, and BuffId.", "AchieveHeader.xml is client-side only and appears to be category/header display data.", "This profile does not map to Character DB.", "Name, comment, icon, point, title, and group display fields do not fit the current server asset schema and are ignored during SQL import.", "Import uses only the safe core fields already expected by the server." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "AddExp", "AddExp is available in XML for client support, but no SQL mapping is required in the current server schema.", "AddExp", new[] { "No mapping required - client side only" }, new[] { "AddExp contains client-facing title/comment/icon data tied to skill presentation.", "No matching Asset or Character table was found in the current server schema.", "This profile stays visible so the package is documented, but SQL import is intentionally disabled." }, supportsValidation: false, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "BattleTable", "BattleTable is available in XML for client battle UI/content support, but no SQL mapping is required in the current server schema.", "BattleTable", new[] { "No mapping required - client side only" }, new[] { "BattleInfo.xml, BattleReward.xml, and BattleEnterable.xml are client-facing battle table data.", "No matching Asset or Character table was found in the current server schema.", "This profile stays visible so the package is documented, but SQL import is intentionally disabled." }, supportsValidation: false, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "CashShop", "CashShop maps partly to Asset.CashShop, but the current server schema is too flat for the full client package.", @"CashShop\CashShopTables.xml", new[] { "Asset.CashShop", "No mapping required - client side only (CashShopWebData.xml)" }, new[] { "CashShopTables.xml contains purchasable product rows that feed the current server cash shop list.", "CashShopWebData.xml is client-side only banner/link data.", "This profile does not map to Character DB.", "Current blocker: Asset.CashShop is a flat one-item-per-row table, but the client XML contains 1,396 multi-item package products.", "Current blocker: 1,879 product names exceed the current EF configuration max length of 30 characters.", "Import stays disabled until we decide whether to extend the server cash shop schema/logic or intentionally import only a reduced subset." }, supportsValidation: false, supportsImport: false, statusText: "Server update required"); yield return new ImportProfileViewModel( "CharCreateTable", "CharCreateTable is available in XML for client character-creation selection data, but no SQL mapping is required in the current server schema.", "CharCreateTable", new[] { "No mapping required - client side only" }, new[] { "TamerCreate.xml contains selectable tamer presets, costume item lists, and season flags for the client creation screen.", "DigimonCreate.xml contains selectable starter/creation digimon visibility and enable flags for the client creation screen.", "No matching Asset or Character table was found in the current server schema.", "This profile stays visible so the package is documented, but SQL import is intentionally disabled." }, supportsValidation: false, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "Cuid", "Cuid is available in XML for client blocked-ID and blocked-chat filtering, but no SQL mapping is required in the current server schema.", "Cuid", new[] { "No mapping required - client side only" }, new[] { "CuidId.xml contains blocked or restricted ID/name patterns used by the client name validation flow.", "CuidChat.xml contains blocked chat/bad-word patterns used by the client chat filtering flow.", "No matching Asset or Character table was found in the current server schema.", "This profile stays visible so the package is documented, but SQL import is intentionally disabled." }, supportsValidation: false, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "Data_Exchange", "Data_Exchange is available in XML for client item-exchange presentation/support data, but no SQL mapping is required in the current server schema.", "Data_Exchange", new[] { "No mapping required - client side only" }, new[] { "DataExchange.xml contains grouped exchange item data used by the client content flow.", "No matching Asset or Character table was found in the current server schema.", "This profile stays visible so the package is documented, but SQL import is intentionally disabled." }, supportsValidation: false, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "DigimonEvo", "Imports the server-used evolution asset rows from DigimonEvo.xml into Asset.Evolution, Asset.EvolutionLine, and Asset.EvolutionStage.", @"DigimonEvo\DigimonEvo.xml", new[] { "Asset.Evolution", "Asset.EvolutionLine", "Asset.EvolutionStage", "No mapping required - client side only (BattleEvo.xml)" }, new[] { "DigimonEvo.xml lines up with the current server evolution asset area rather than Character DB.", "DigimonEvo.xml maps to Asset.Evolution, Asset.EvolutionLine, and Asset.EvolutionStage.", "BattleEvo.xml appears to be client-side battle evolution support data because no matching current server table was found.", "Ignored on SQL import: BattleEvo.xml and DigimonEvo client visual/layout fields such as icon positions, colors, names, and effects.", "This profile replaces the three evolution asset tables inside one transaction.", "Identity values are rebuilt in XML order so line and stage relationships stay consistent after replace." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "Digimon_Book", "Imports Digimon encyclopedia deck book and deck buff data from BookInfo.xml and DeckOption.xml.", @"Digimon_Book\BookInfo.xml", new[] { "Asset.DeckBookInfo", "Asset.DeckBuff", "Asset.DeckBuffOption", "No mapping required - client side only (EncyclopediaException.xml)", "No mapping required - client side only (DeckComposition.xml)" }, new[] { "BookInfo.xml imports to Asset.DeckBookInfo with a synthetic OptionId 0 'None' row required by the server FK.", "DeckOption.xml imports to Asset.DeckBuff and Asset.DeckBuffOption after normalizing the client triplet layout into server option rows.", "EncyclopediaException.xml and DeckComposition.xml stay client-side only in the current server schema.", "This profile replaces Asset.DeckBookInfo, Asset.DeckBuff, and Asset.DeckBuffOption inside one transaction." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "DigimonParcel", "DigimonParcel is available in XML for client parcel/mail digimon support, but no SQL mapping is required in the current server schema.", "DigimonParcel", new[] { "No mapping required - client side only" }, new[] { "DigimonParcel.xml currently contains a small list of parcel-allowed digimon IDs.", "No matching Asset or Character table was found in the current server schema.", "No active server DTO/model/repository mapping was found for a DigimonParcel package.", "This profile stays visible so the package is documented, but SQL import is intentionally disabled." }, supportsValidation: false, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "EffectList", "EffectList is available in XML for client item-effect path lookup, but no SQL mapping is required in the current server schema.", "EffectList", new[] { "No mapping required - client side only" }, new[] { "EffectList.xml contains item id to effect-file path mappings used by the client visual/effect system.", "No matching Asset or Character table was found in the current server schema.", "This profile stays visible so the package is documented, but SQL import is intentionally disabled." }, supportsValidation: false, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "DMBase", "Imports server-side DMBase status assets from EvolutionBaseApply.xml, TamerBaseInfo.xml, and DigimonBaseInfo.xml.", @"DMBase\EvolutionBaseApply.xml", new[] { "Asset.StatusApply", "Asset.CharacterBaseStatus", "Asset.CharacterLevelStatus", "Asset.DigimonLevelStatus" }, new[] { "EvolutionBaseApply.xml maps cleanly to Asset.StatusApply using EvolutionType -> StageValue and EvolutionApplyValue -> ApplyValue.", "TamerBaseInfo.xml refreshes matching tamer model rows in Asset.CharacterBaseStatus and Asset.CharacterLevelStatus.", "DigimonBaseInfo.xml refreshes matching level rows in Asset.DigimonLevelStatus; Asset.DigimonBaseInfo remains owned by Digimon_List.", "This profile refreshes only matching tamer/digimon status types from XML so custom server-only tamer models are preserved." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "Event", "Imports server-used Event package rewards into Asset.MonthlyEvent and Asset.TimeEvent.", @"Event\MonthlyEvent.xml", new[] { "Asset.MonthlyEvent", "Asset.TimeEvent", "No mapping required - client side only (AttendenceTime.xml)", "No mapping required - client side only (MensalEvent.xml)", "No mapping required - client side only (TimeEvent.xml)", "No mapping required - client side only (Event100Days.xml)" }, new[] { "MonthlyEvent.xml maps cleanly to Asset.MonthlyEvent as a day-by-day reward list.", "Event.xml maps to Asset.TimeEvent for the current server's four login-time reward groups.", "Extra Event.xml reward groups are ignored until the server reward flow is extended beyond rewards 0 to 3.", "Client-side/hot-time only for now: AttendenceTime.xml, MensalEvent.xml, TimeEvent.xml, and Event100Days.xml." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "Gotcha", "Gotcha is server-relevant, but the current server schema does not safely represent the full client package yet.", @"Gotcha\Gotcha.xml", new[] { "Asset.Gotcha", "Asset.GotchaItems", "Asset.GotchaRareItems", "No mapping required - client side only (GotchaMysteryItems.xml)", "No mapping required - client side only (GotchaMysteryCoins.xml)" }, new[] { "The current server already has Gotcha, GotchaItems, and GotchaRareItems tables plus runtime packet usage.", "Client Gotcha.xml currently contains 42 machine rows but only 21 unique NPC ids, meaning multiple machine entries exist for the same NPC.", "Current server runtime loads gotcha by NpcId with FirstOrDefault, so it effectively supports one active machine row per NPC.", "GotchaItems.xml contains 31 item groups, and the exported XML does not expose a safe direct linkage from those groups back to the duplicated machine rows.", "Import stays disabled until we decide how to model multi-row-per-NPC machines or extend the server/runtime to support the richer client package safely." }, supportsValidation: false, supportsImport: false, statusText: "Server update required"); yield return new ImportProfileViewModel( "InfiniteWar", "Imports the safe DailyReward.xml slice from InfiniteWar into the current arena daily reward asset tables. Other InfiniteWar XML files stay client-side only for now.", @"InfiniteWar\DailyReward.xml", new[] { "Asset.ArenaDailyItemRewards", "Asset.ArenaDailyItemReward", "No mapping required - client side only (StageInfo.xml)", "No mapping required - client side only (SummonMonster.xml)", "No mapping required - client side only (RankReward.xml)", "No mapping required - client side only (AwardNpc.xml)" }, new[] { "DailyReward.xml lines up with the current server arena daily reward asset area used when inserting arena points and granting weekday rewards.", "The importer groups DailyReward rows by RewardDay and writes parent rows to Asset.ArenaDailyItemRewards and child rows to Asset.ArenaDailyItemReward.", "NeedItemCode exists in client XML, but the current server runtime does not store or use it, so it is ignored on SQL import.", "StageInfo.xml, SummonMonster.xml, RankReward.xml, and AwardNpc.xml stay client-side only for now because the current server schema/runtime does not consume those slices directly.", "This profile imports only the safe arena daily reward slice until we design the rest of InfiniteWar properly." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "ItemList", "Imports the core server item asset slices from ItemList.xml, ItemMaking.xml, ItemAcessorys.xml, and ItemXai.xml.", @"ItemList\ItemList.xml", new[] { "Asset.ItemInfo", "Asset.ItemCraft", "Asset.ItemCraftMaterial", "Asset.AccessoryRoll", "Asset.AccessoryRollStatus", "Asset.Xai", "No mapping required - client side only (other ItemList XML files)" }, new[] { "ItemList.xml feeds Asset.ItemInfo for the core item rows used across gameplay systems.", "ItemMaking.xml feeds Asset.ItemCraft and Asset.ItemCraftMaterial after success rates are normalized from client basis points to server percentages.", "ItemAcessorys.xml feeds Asset.AccessoryRoll and Asset.AccessoryRollStatus.", "ItemXai.xml feeds Asset.Xai.", "Client-only for now: ItemCoolTime.xml, ItemDisplay.xml, ItemExchange.xml, ItemLook.xml, ItemRank.xml, ItemRankEffectList.xml, ItemTap.xml, ItemTypeName.xml, ElementItem.xml, ElementItem1.xml, AcessorysEnchant.xml, ItemMakingGroupList.xml, and ServerItemList.xml.", "This profile imports only the safe server-used slices that already match the current asset schema." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "MapList", "Imports the server-used map rows from MapList.xml into Asset.Map.", @"MapList\MapList.xml", new[] { "Asset.Map" }, new[] { "MapList.xml maps cleanly to the current Asset.Map table for server-used map identity and region fields.", "s_szMapDiscript is used as the server map name because it contains the English display text in this client package.", "Imported fields: MapId, Name, RegionIndex, ResurrectionMapID, XgConsumeType, and BattleTagUse.", "Type is defaulted to 0 because MapList.xml does not contain a matching server map-type field.", "Client-side only in XML: map path, background sound, dimensions, fatigue settings, camera settings, and Korean/secondary description text." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "MapMonsterList", "Imports regular monster spawn placement into Config.Mob and rebuilds reward rows from existing monster-type templates.", @"MapMonsterList\MapMonsterList.xml", new[] { "Config.Mob", "Config.MobLocation", "Config.MobDropReward", "Config.MobExpReward", "Config.ItemDropReward", "Config.BitsDropReward" }, new[] { "MapMonsterList.xml maps spawn placement fields: MapId, MonsterTableId, CenterX, CenterY, Radius, Count, RespawnTime, MoveType, Killgen fields, and instant-respawn flag.", "Config.Mob also stores copied monster stats, which can be sourced from Asset.MonsterBaseInfo after Monster.xml import.", "s_nCount is expanded into individual Config.Mob and Config.MobLocation rows because the current server schema has no spawn-group count column.", "Drop, bits, and exp rewards are cloned from the existing reward template for each monster type before the old rows are replaced.", "Monster types without an existing Config.Mob template get empty drop shells and zero exp rows." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "MapNpc", "Merges missing NPC/map placement rows from MapNpc.xml into Asset.Npc without deleting existing shop or portal mappings.", @"MapNpc\MapNpc.xml", new[] { "Asset.Npc" }, new[] { "MapNpc.xml maps cleanly to the current Asset.Npc table for NpcId and MapId only.", "Import mode is non-destructive merge insert, not replace, because Asset.Npc IDs are referenced by shop and portal child tables.", "Existing Asset.Npc rows are preserved; only missing NpcId/MapId pairs are inserted.", "The unsigned sentinel map value 4294967295 is treated as invalid/no-map and ignored.", "Client placement fields X, Y, and Rotation stay XML-only because the current SQL table has no matching columns." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "MapPortal", "Syncs server-used map portal destination rows from MapPortal.xml into Asset.Portal while preserving DB-only portals.", @"MapPortal\MapPortal.xml", new[] { "Asset.Portal" }, new[] { "MapPortal.xml maps to Asset.Portal using s_dwPortalID, s_dwDestMapID, s_nDestTargetX, s_nDestTargetY, s_nPortalKindIndex, s_dwUniqObjectID, and s_dwPortalType.", "IsLocal is derived from source map id matching destination map id.", "Import mode is non-destructive sync because the current DB has portal rows that are not present in this XML package.", "Existing XML portal ids are updated, missing XML portal ids are inserted, and DB-only portal rows are preserved.", "Rows with destination map 0 are ignored because they are not usable server warp targets.", "Source coordinates, radii, destination radius, view target, and client-only portal presentation fields stay XML-only because Asset.Portal has no matching columns." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "MapObject", "MapObject is available in XML for client map-object open-condition data, but no SQL mapping exists in the current server schema.", @"MapObject\MapObject.xml", new[] { "No mapping required - client side only" }, new[] { "MapObject.xml contains map groups, object buckets, ordered object rows, and open-condition factors.", "The current server source/database has no Asset.MapObject or Config.MapObject table.", "Validation and preview are enabled so the package is documented and checked.", "Import stays disabled to avoid inventing fake fields or unsafe schema guesses.", "If the server later implements map-object logic, this XML can be mapped to the new table design." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "MasterCard", "MasterCard is available in XML for the Seal Master/card collection client UI, but no SQL mapping is required in the current server schema.", @"MasterCard\MasterCards.xml", new[] { "No mapping required - client side only" }, new[] { "MasterCard.bin exports MasterCards, Leaders, LeaderAbilities, MasterFilters, DigimonImgPaths, Attributes, Elementals, and PlatePaths.", "The current server source/database has no matching MasterCard or SealMaster asset tables/models/repositories.", "This profile validates the full package shape and counts nested fixed rows such as 6 grade rows per card and 3 terms per leader ability.", "Import stays disabled to avoid inventing fake SQL fields or pushing client-only UI collection data into unrelated DeckBook tables.", "If the server later implements Seal Master gameplay, these XML files can be mapped to the new schema." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "Nature", "Nature is available in XML for client/reference attribute and element advantage matrices, but no SQL mapping is required in the current server schema.", @"Nature\Nature.xml", new[] { "No mapping required - client side / server hardcoded" }, new[] { "Nature.xml contains 11 nature rows with 11 matrix values per row.", "BaseElement.xml contains two compare matrices, each with 5 base types and 5 point values per base type.", "The current server source uses DigimonAttributeEnum, DigimonElementEnum, and hardcoded HasAttributeAdvantage/HasElementAdvantage helpers.", "No matching Asset or Config table exists for these matrices in the current schema.", "Validation and preview are enabled for documentation; import stays disabled until/unless the server is redesigned to load this data dynamically." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "New_Element", "New_Element is available in XML for client status-window attribute/element icon placement, but no SQL mapping is required.", @"New_Element\AttributeTypeUI.xml", new[] { "No mapping required - client side only" }, new[] { "AttributeTypeUI.xml contains 5 attribute icon/bar placement rows.", "NatureTypeUI.xml contains 11 element icon/gauge placement rows.", "These files contain UI image paths and X/Y coordinates, not server gameplay values.", "The current server stores gameplay attribute/element ids on Asset.DigimonBaseInfo and Asset.MonsterBaseInfo and uses enums/helpers for advantage logic.", "Validation and preview are enabled for documentation; import stays disabled because this data belongs to the client UI." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "Npc", "Imports server-used NPC placement, shop item, and portal requirement rows from Npc.xml while leaving client display text/model data in XML.", @"Npc\Npc.xml", new[] { "Asset.Npc", "Asset.NpcItem", "Asset.NpcPortal", "Asset.NpcPortalsAmount", "Asset.NpcPortals", "No mapping required - client side only (ModelInfo.xml)", "No mapping required - client side only (NpcEvent.xml)" }, new[] { "Npc.xml maps NpcId and MapId to Asset.Npc.", "TradeItems map to Asset.NpcItem through the existing Asset.Npc identity row for each NpcId/MapId pair.", "Portal/PortalEntry/Requirement data maps to Asset.NpcPortal, Asset.NpcPortalsAmount, and Asset.NpcPortals.", "Import preserves Asset.Npc identity ids and only rebuilds child item/portal rows for NPCs present in Npc.xml.", "Ignored on SQL import: NPC name, pen name, talk text, model id, move/type/display flags, ModelInfo.xml, and NpcEvent.xml because the current server schema has no matching destination." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "Passive_Ability", "Passive_Ability is available in XML as an empty passive ability package, but no SQL mapping is required in the current server schema.", @"Passive_Ability\PassiveAbility.xml", new[] { "No mapping required - client side only" }, new[] { "PassiveAbility.xml currently contains one PassiveType row with an empty Entries list.", "No matching PassiveAbility table or server model was found in the current source/schema.", "Passive ability gameplay effects appear to be represented through existing Buff, ItemInfo, and SkillInfo data instead.", "Validation and preview are enabled for documentation; import stays disabled to avoid fake SQL fields." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "Quest", "Imports the static quest asset graph from Quest.xml into the current Asset quest tables.", @"Quest\Quest.xml", new[] { "Asset.Quest", "Asset.QuestCondition", "Asset.QuestGoal", "Asset.QuestReward", "Asset.QuestRewardObject", "Asset.QuestSupply", "Asset.QuestEvent" }, new[] { "Quest.xml is struct-truth output from Quest.bin and contains nested ApplyRequites, PreRequires, CompRequires, Requites, and Events.", "ApplyRequites feed Asset.QuestSupply, PreRequires feed Asset.QuestCondition, CompRequires feed Asset.QuestGoal, Requites feed Asset.QuestReward and Asset.QuestRewardObject, and Events feed Asset.QuestEvent.", "Only static Asset quest data is imported. Character.InProgressQuest is player runtime progress and is never touched by this importer.", "Client-only text/layout fields such as title/body/helper/process/completion text, model ids, tool positions, active flags, and start-target UI data stay in XML.", "Reward type 3 rows are preserved in SQL for XML fidelity, but the current server reward switch only actively grants types 0 money, 1 experience, and 2 item." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "Reward", "Reward.xml is historical scheduled/gift reward data. The current package has no active rows, so no SQL import is required.", @"Reward\Reward.xml", new[] { "No import required - historical/expired scheduled rewards" }, new[] { "Reward.xml contains ServerGroup rows, each with reward id, comment, start date, expiry date, item code, and item count.", "The current XML date range is historical, so validation reports zero active reward rows on a current server.", "The XML shape does not match Asset.TimeEvent because TimeEvent is login-time reward index data and has no server index, date window, or comment fields.", "Event.TimeReward and Event.AttendanceReward are per-character runtime progress tables, not static reward schedule tables.", "Quest, container, scan, arena, and drop reward tables have different ownership/foreign-key shapes and are not safe targets.", "Validation and preview stay enabled for documentation. If a future Reward.xml contains active schedule rows, it will need a dedicated scheduled reward table and server runtime." }, supportsValidation: true, supportsImport: false, statusText: "No import required"); yield return new ImportProfileViewModel( "Ride", "Ride is available in XML for rideable digimon rules, but the current server has no static SQL target for those rules.", @"Ride\Ride.xml", new[] { "Server update required - no current Ride asset/config table" }, new[] { "Ride.xml contains rideable digimon ids, ride type, movement speed, run animation rate, optional change-ride ids, and unlock item requirements.", "The current server has ride unlock, ride start, and ride stop packets, so this data is server-relevant.", "Current server behavior does not load Ride.xml: ride speed is hardcoded to double movement speed and ride unlock consumes the selected item without checking the XML's allowed item list.", "No matching Asset.Ride or Config.Ride table exists in the current database schema.", "Validation and preview are enabled for documentation; import stays disabled until dedicated server tables/loaders and packet validation are designed." }, supportsValidation: true, supportsImport: false, statusText: "Server update required"); yield return new ImportProfileViewModel( "Skill", "Imports the server-used skill, skill apply, and tamer skill asset rows from the Skill package.", @"Skill\Skill.xml", new[] { "Asset.SkillInfo", "Asset.SkillCode", "Asset.SkillCodeApply", "Asset.TamerSkill", "No mapping required - client side only (AreaCheck.xml)" }, new[] { "Skill.xml feeds Asset.SkillInfo, Asset.SkillCode, and Asset.SkillCodeApply.", "TamerSkill.xml feeds Asset.TamerSkill.", "AreaCheck.xml is client-side only for now because the current server has no matching area-check asset table.", "SkillCodeApply is mapped using the live server shape: Type = s_nID, Attribute = s_nA, Value = s_nB, Chance = s_nInvoke_Rate / 100, AdditionalValue = s_nC, IncreaseValue = s_nIncrease_B_Point.", "Invalid invoke-rate padding values are clamped to chance 0 instead of becoming always-active effects.", "s_nMemorySkill is preserved in XML but not imported because the current Asset.SkillInfo.MemoryChips column is tinyint and the server does not consume it." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "Scene", "Scene is available in XML for client cutscene/dialogue presentation, but no SQL mapping is required in the current server schema.", @"Scene\SceneData.xml", new[] { "No mapping required - client side only" }, new[] { "Scene.bin exports SceneData.xml and SceneTargets.xml from the C++ struct layout.", "SceneData.xml contains scene ids, enabled/skip flags, map/region ids, music, dialogue actions, animation ids, effect paths, sound paths, and up to 5 target references per action.", "SceneTargets.xml contains the target UID, model id, camera distance/height, and display name lookup used by those scene actions.", "No matching Scene/Cutscene asset, config, or character table was found in the current server source/schema.", "Validation and preview are enabled for documentation; import stays disabled to avoid inventing fake SQL fields for client presentation data." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "ServerTransfer", "ServerTransfer is available in XML for client/server transfer rule data, but the current dump is empty and no SQL mapping is required.", @"ServerTransfer\ServerTransfer.xml", new[] { "No mapping required - empty/client side only" }, new[] { "ServerTransfer.bin exports ServerIndex, Enable, ServerName, and transfer Limit rows when entries exist.", "The current original bin dumped to an empty with zero transfer server rows.", "This package is not the same as Account.Server, which is the current login server-list table used by the account server.", "No matching transfer-rule table or server runtime usage was found in the current source/schema.", "Validation and preview are enabled for documentation; import stays disabled because there is no data and no safe SQL target." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "Tactics", "Tactics is available in XML for digimon mercenary/tactics, enchant, and transcendence reference data, but the current server has no static SQL target for the package.", @"Tactics\TDBTactic.xml", new[] { "Server update required - tactics/enchant/transcend asset tables", "No mapping required - client display text (TacticsPlain.xml)" }, new[] { "TDBTactic.xml contains digimon tactics ids and grade-specific required item/level warning rows.", "TacticsPlain.xml contains digimon display names and descriptions for the client tactics UI.", "EnchantItemInfo.xml and EnchantStatInfo.xml contain client/reference enchant cost and stat matrices.", "TranscendInfo.xml, TranscendEvo.xml, TranscendCorrect.xml, and ExpDigimon.xml contain transcendence rule/material/reference values.", "The current server stores owned digimon and TranscendenceExperience as runtime Digimon rows and has packet logic with hardcoded thresholds, exp values, and correction formulas.", "Validation checks referenced digimon/item ids against Asset.DigimonBaseInfo and Asset.ItemInfo so a later server-table import can be designed from clean data.", "Validation and preview are enabled for documentation; import stays disabled until dedicated server tables/loaders are designed." }, supportsValidation: true, supportsImport: false, statusText: "Server update required"); yield return new ImportProfileViewModel( "Talk", "Talk is available in XML for client dialogue/message/tip presentation, but the current server/database has no SQL target for this package.", @"Talk\TalkDigimon.xml", new[] { "No mapping required - client side only" }, new[] { "Talk.bin exports TalkDigimon.xml, TalkEvent.xml, TalkMessage.xml, TalkTip.xml, and TalkLoadingTip.xml.", "The package contains client-side digimon dialogue, event talk text, message boxes, normal tips, and loading tips.", "No matching Talk table or column was found in the live ODMO database metadata.", "The C# server source only references TalkToNpc as a quest-goal progress type; it does not load or query Talk.bin data.", "Validation and preview are enabled for documentation; import stays disabled because this is client UI/string data." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "UIText", "UIText is available in XML for client UI strings keyed by the client hash function, but the current server/database has no SQL target for this package.", @"UIText\UIText.xml", new[] { "No mapping required - client side only" }, new[] { "UIText.bin exports one UIText.xml table with HashKey and Text fields.", "The client builds HashKey from the original UI string tag and looks text up locally through CsUITextMng.", "The XML preserves whitespace on Text elements because UI strings can include formatting and placeholders.", "No matching UIText table or column was found in the live ODMO database metadata.", "The C# server source does not load this text package.", "Validation and preview are enabled for documentation; import stays disabled because this is client UI string data." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "Tutorial", "Tutorial is available in XML for client tutorial text, but the current server/database has no SQL target for this package.", @"Tutorial\Tutorial.xml", new[] { "No mapping required - client side only" }, new[] { "Tutorial.bin exports a single Tutorial.xml table with fixed 256-character Unicode text rows.", "The XML Index is derived from row order and is used when rebuilding the BIN.", "No matching Tutorial table or column was found in the live ODMO database metadata.", "The C# server has client-option/tutorial flags and tutorial quest type behavior, but those are runtime state and quest metadata, not this text package.", "Validation and preview are enabled for documentation; import stays disabled because this is client tutorial UI/text data." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "TimeCharge", "TimeCharge is available in XML for client equipment-recharge item links, timing/cost rules, and cash requirements, but the current server/database has no SQL target for this package.", @"TimeCharge\ChargeItem.xml", new[] { "No mapping required - client side only" }, new[] { "TimeCharge.bin exports ChargeItem.xml, BitCode.xml, and CashCode.xml.", "ChargeItem.xml links item codes to bit-code and cash-code recharge rules.", "BitCode.xml contains keep time, charge time, and bit price values.", "CashCode.xml contains grouped item-count requirements by time index.", "No matching TimeCharge table or column was found in the live ODMO database metadata.", "The C# server source only sends a stub TimeRecharge result packet and does not load these config rows.", "Validation and preview are enabled for documentation; import stays disabled because this is client equipment-recharge config." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "Weather", "Weather is available in XML for client map weather zones and loops, but the current server/database has no SQL target for this package.", @"Weather\Weather.xml", new[] { "No mapping required - client side only" }, new[] { "Weather.bin exports one Weather.xml table with WeatherGroup, Weather, and Element rows.", "Weather rows contain map id, center point, radius, total loop minutes, and nested element rows.", "Element rows contain weather type, level, time minutes, and fatigue values.", "No matching Weather table or column was found in the live ODMO database metadata.", "The C# server source does not load this package.", "Validation and preview are enabled for documentation; import stays disabled because this is client map weather presentation/config data." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "WorldMap", "WorldMap is available in XML for client world/area map UI layout and display text, but the current server/database has no SQL target for this package.", @"WorldMap\WorldMap.xml", new[] { "No mapping required - client side only" }, new[] { "WorldMap.bin exports WorldMap.xml and AreaMap.xml.", "WorldMap.xml contains world ids, names, descriptions, world types, and UI coordinates.", "AreaMap.xml contains area map ids, names, descriptions, type/detail flags, UI coordinates, and gaussian blur values.", "Asset.Map is the server runtime map table, but it does not match this client UI layout package.", "No matching WorldMap/AreaMap table or column was found in the live ODMO database metadata.", "Validation and preview are enabled for documentation; import stays disabled because this is client world-map UI data." }, supportsValidation: true, supportsImport: false, statusText: "Client side only"); yield return new ImportProfileViewModel( "MapRegion", "Imports server-used map waypoint/region rows from MapRegion.xml into Asset.MapRegionList and Asset.MapRegion while preserving unrelated maps.", @"MapRegion\MapRegion.xml", new[] { "Asset.MapRegionList", "Asset.MapRegion", "No mapping required - client side only (MapBuffRegion.xml)", "No mapping required - client side only (MapLimitEvo.xml)" }, new[] { "MapRegion.xml feeds server waypoint/respawn region lookup used by MapRegionListAssetsByMapIdQuery.", "Import mode is targeted merge-replace: only maps present in MapRegion.xml are updated.", "Existing Asset.MapRegionList identity values are preserved when a map already exists.", "Region names are cleaned from the readable ASCII prefix because the client XML contains trailing corrupted DB-helper text.", "Ignored on SQL import: radius, Korean/secondary text, BG sound, fatigue fields, MapBuffRegion.xml, and MapLimitEvo.xml." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); yield return new ImportProfileViewModel( "ExtraExchange", "Imports the spirit-craft / extra-evolution asset graph from ExtraExchange.xml into the current server extra evolution tables.", @"ExtraExchange\ExtraExchange.xml", new[] { "Asset.ExtraEvolutionNpc", "Asset.ExtraEvolutionInformation", "Asset.ExtraEvolution", "Asset.ExtraEvolutionMaterial", "Asset.ExtraEvolutionRequired" }, new[] { "ExtraExchange.xml lines up with the current server ExtraEvolution asset graph used by SpiritCraftPacketProcessor.", "NpcId feeds Asset.ExtraEvolutionNpc and each ExtraExchangesId group feeds Asset.ExtraEvolutionInformation.IndexId.", "Each ExtraExchange row feeds Asset.ExtraEvolution, MaterialData feeds Asset.ExtraEvolutionMaterial, and SubMaterialData feeds Asset.ExtraEvolutionRequired.", "Ignored on SQL import: client-only unknown/count bookkeeping fields such as Unknow, Unknow1, ItemCount, and MaterialCount.", "This profile replaces the five extra evolution asset tables inside one transaction." }, supportsValidation: true, supportsImport: true, statusText: "Ready"); } private IEnumerable DiscoverPlaceholderProfiles(HashSet existingNames) { string xmlRoot = ResolveXmlRootDirectory(); if (!Directory.Exists(xmlRoot)) { yield break; } foreach (DirectoryInfo directory in new DirectoryInfo(xmlRoot).GetDirectories().OrderBy(x => x.Name, StringComparer.OrdinalIgnoreCase)) { if (!existingNames.Add(directory.Name)) { continue; } int xmlFileCount = directory.GetFiles("*.xml", SearchOption.AllDirectories).Length; string xmlSummary = xmlFileCount == 1 ? "1 XML file discovered." : $"{xmlFileCount} XML files discovered."; yield return new ImportProfileViewModel( directory.Name, $"XML package discovered for {directory.Name}. SQL mapping has not been implemented yet.", directory.Name, new[] { "SQL mapping pending" }, new[] { xmlSummary, "The XML package is available from BinXmlConverter2 output.", "This profile is listed so we can plan DB mapping package by package.", "Import stays disabled until we confirm the target table design." }, supportsValidation: false, supportsImport: false, statusText: "Mapping pending"); } string modelFile = Path.Combine(xmlRoot, "Model.xml"); if (File.Exists(modelFile) && existingNames.Add("Model")) { yield return new ImportProfileViewModel( "Model", "Model.dat XML package discovered. SQL mapping has not been implemented yet.", "Model.xml", new[] { "SQL mapping pending" }, new[] { "1 XML file discovered.", "Model.dat is visible in the importer for planning.", "Import stays disabled until we confirm whether it belongs in SQL." }, supportsValidation: false, supportsImport: false, statusText: "Mapping pending"); } } private void AppendLog(string message) { string line = $"[{DateTime.Now:HH:mm:ss}] {message}"; if (activityLogTextBox.TextLength > 0) { activityLogTextBox.AppendText(Environment.NewLine); } activityLogTextBox.AppendText(line); } private static ImporterConfig? TryLoadConfig() { try { return DatabaseHelper.LoadConfig(); } catch { return null; } } private string ResolveProfileXmlPath(ImportProfileViewModel profile) { if (_config != null) { return Path.Combine(_config.XmlRootPath, profile.XmlPath); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", profile.XmlPath), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", profile.XmlPath) }; return candidates.FirstOrDefault(PathExists) ?? candidates[0]; } private string ResolveMonsterSkillXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Monster\MonsterSkill.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Monster\MonsterSkill.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Monster\MonsterSkill.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveSkillTamerSkillXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Skill\TamerSkill.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Skill\TamerSkill.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Skill\TamerSkill.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveSkillAreaCheckXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Skill\AreaCheck.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Skill\AreaCheck.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Skill\AreaCheck.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveAchieveHeaderXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Achieve\AchieveHeader.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Achieve\AchieveHeader.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Achieve\AchieveHeader.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveBattleEvoXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"DigimonEvo\BattleEvo.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"DigimonEvo\BattleEvo.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"DigimonEvo\BattleEvo.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveDigimonBookDeckOptionXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Digimon_Book\DeckOption.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Digimon_Book\DeckOption.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Digimon_Book\DeckOption.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveDigimonBookEncyclopediaExceptionXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Digimon_Book\EncyclopediaException.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Digimon_Book\EncyclopediaException.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Digimon_Book\EncyclopediaException.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveDigimonBookDeckCompositionXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Digimon_Book\DeckComposition.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Digimon_Book\DeckComposition.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Digimon_Book\DeckComposition.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveInfiniteWarStageInfoXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"InfiniteWar\StageInfo.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"InfiniteWar\StageInfo.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"InfiniteWar\StageInfo.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveInfiniteWarSummonMonsterXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"InfiniteWar\SummonMonster.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"InfiniteWar\SummonMonster.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"InfiniteWar\SummonMonster.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveInfiniteWarRankRewardXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"InfiniteWar\RankReward.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"InfiniteWar\RankReward.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"InfiniteWar\RankReward.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveInfiniteWarAwardNpcXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"InfiniteWar\AwardNpc.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"InfiniteWar\AwardNpc.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"InfiniteWar\AwardNpc.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveItemMakingXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"ItemList\ItemMaking.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"ItemList\ItemMaking.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"ItemList\ItemMaking.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveItemAccessoryXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"ItemList\ItemAcessorys.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"ItemList\ItemAcessorys.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"ItemList\ItemAcessorys.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveItemXaiXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"ItemList\ItemXai.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"ItemList\ItemXai.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"ItemList\ItemXai.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveNpcModelInfoXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Npc\ModelInfo.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Npc\ModelInfo.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Npc\ModelInfo.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveNpcEventXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"Npc\NpcEvent.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"Npc\NpcEvent.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"Npc\NpcEvent.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveMapBuffRegionXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"MapRegion\MapBuffRegion.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"MapRegion\MapBuffRegion.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"MapRegion\MapBuffRegion.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private string ResolveMapLimitEvoXmlPath() { if (_config != null) { return Path.Combine(_config.XmlRootPath, @"MapRegion\MapLimitEvo.xml"); } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML", @"MapRegion\MapLimitEvo.xml"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML", @"MapRegion\MapLimitEvo.xml") }; return candidates.FirstOrDefault(File.Exists) ?? candidates[0]; } private static string ResolveRepositoryRoot() { DirectoryInfo? current = new DirectoryInfo(AppContext.BaseDirectory); while (current != null) { bool hasClientFolder = Directory.Exists(Path.Combine(current.FullName, "DMO_GSP_Ver487")); bool hasProjectFolder = Directory.Exists(Path.Combine(current.FullName, "DProject_vs2022")); if (hasClientFolder && hasProjectFolder) { return current.FullName; } current = current.Parent; } return AppContext.BaseDirectory; } private string ResolveXmlRootDirectory() { if (_config != null) { return _config.XmlRootPath; } string[] candidates = { Path.Combine(ResolveRepositoryRoot(), @"DMO_GSP_Ver487\XML"), Path.Combine(ResolveRepositoryRoot(), @"DProject_vs2022\Tool\BinXmlConverter2\bin\Debug\net8.0-windows\XML") }; return candidates.FirstOrDefault(Directory.Exists) ?? candidates[0]; } private static bool PathExists(string path) { return File.Exists(path) || Directory.Exists(path); } private sealed class ImportProfileViewModel { public ImportProfileViewModel( string name, string description, string xmlPath, IEnumerable targetTables, IEnumerable notes, bool supportsValidation, bool supportsImport, string statusText) { Name = name; Description = description; XmlPath = xmlPath; TargetTables = targetTables.ToList(); Notes = notes.ToList(); SupportsValidation = supportsValidation; SupportsImport = supportsImport; StatusText = statusText; } public string Name { get; } public string Description { get; } public string XmlPath { get; } public List TargetTables { get; } public List Notes { get; } public bool SupportsValidation { get; } public bool SupportsImport { get; } public string StatusText { get; } public override string ToString() { return Name; } } } }