Handle WCID editing for GiftType9.Pokemon

This commit is contained in:
Manu
2023-06-05 23:56:51 +02:00
parent 32480c8c9b
commit eab6cb1f71
2 changed files with 30 additions and 26 deletions

View File

@@ -199,35 +199,19 @@ namespace SwitchGiftDataManager.WinForm
if (wcid != list.GetWCID(ListBoxWC.SelectedIndex))
{
var proceed = true;
if (CurrentGame is Games.SCVI)
var index = list.GetIndex(wcid);
if (index == -1)
{
var warning = "WARNING\n\n" +
"WCID editings in SV wondercards might impact the entity's TID and SID, resulting in an illegal Pok<6F>mon.\n" +
"Do not share Pok<6F>mon obtained with the use of edited wondercards.\n" +
"\nDo you want to coninue?";
var disclaimer = MessageBox.Show(warning, "Disclaimer", MessageBoxButtons.YesNo);
if (disclaimer == DialogResult.No)
proceed = false;
list.SetWCID(ListBoxWC.SelectedIndex, wcid);
list.Sort();
UpdateWCList();
ListBoxWC.SelectedIndex = list.GetIndex(wcid);
BtnApply.Enabled = false;
}
if (proceed)
else
{
var index = list.GetIndex(wcid);
if (index == -1)
{
list.SetWCID(ListBoxWC.SelectedIndex, wcid);
list.Sort();
UpdateWCList();
ListBoxWC.SelectedIndex = list.GetIndex(wcid);
BtnApply.Enabled = false;
}
else
{
MessageBox.Show($"WCID {wcid} already exists.");
return;
}
MessageBox.Show($"WCID {wcid} already exists.");
return;
}
}