Set alpha move in batch edit suggest

This commit is contained in:
Kurt 2025-10-31 22:21:25 -05:00
parent 46e9b6d2fc
commit 74a74c6749
3 changed files with 13 additions and 18 deletions

View File

@ -40,19 +40,22 @@ public static void SetPlusFlags(this IPlusRecord record, IPermitPlus permit, Leg
var entity = la.Entity;
var context = entity.Context;
var evos = la.Info.EvoChainsAllGens.Get(context);
switch (la.Entity.Context)
switch (la.Entity)
{
case EntityContext.Gen9a:
case PA9 pa9:
{
var learn = LearnSource9ZA.Instance;
SetPlusFlagsNatural(record, permit, evos, learn, seedOfMastery);
if (pa9 is { IsAlpha: true, PersonalInfo: { } pi })
SetPlusFlagsSpecific(pa9, pi, pi.AlphaMove);
if (tm)
{
var learn = LearnSource9ZA.Instance;
SetPlusFlagsNatural(record, permit, evos, learn, seedOfMastery);
if (tm)
{
var table = PersonalTable.ZA;
SetPlusFlagsTM<PersonalTable9ZA, PersonalInfo9ZA, LearnSource9ZA>(record, permit, evos, learn, seedOfMastery, table);
}
break;
var table = PersonalTable.ZA;
SetPlusFlagsTM<PersonalTable9ZA, PersonalInfo9ZA, LearnSource9ZA>(record, permit, evos, learn, seedOfMastery, table);
}
break;
}
default:
throw new Exception("Format not supported.");
}

View File

@ -1953,9 +1953,6 @@ private void B_PlusRecord_Click(object sender, EventArgs e)
if (ModifierKeys.HasFlag(Keys.Shift))
{
m.SetPlusFlags(Entity, p, PlusRecordApplicatorOption.LegalCurrent);
if (Entity is PA9 { IsAlpha: true, PersonalInfo: { } pi } pa9)
PlusRecordApplicator.SetPlusFlagsSpecific(pa9, pi, pi.AlphaMove);
UpdateLegality();
return;
}

View File

@ -127,11 +127,6 @@ private void B_All_Click(object sender, EventArgs e)
_ => PlusRecordApplicatorOption.LegalCurrent,
};
Plus.SetPlusFlags(Entity, Permit, option);
if (option != PlusRecordApplicatorOption.None)
{
if (Entity is PA9 { IsAlpha: true, PersonalInfo: { } pi } pa9)
PlusRecordApplicator.SetPlusFlagsSpecific(pa9, pi, pi.AlphaMove);
}
Close();
}