Flag all marks, unlike prior commit

oops, unnecessary simplification
This commit is contained in:
Kurt 2021-01-22 21:17:41 -08:00
parent acfbef6cfa
commit 68673cf671
2 changed files with 5 additions and 14 deletions

View file

@ -25,8 +25,11 @@ namespace PKHeX.Core
private void VerifyNoMarksPresent(LegalityAnalysis data, IRibbonIndex m)
{
if (m.HasMark(out var x))
data.AddLine(GetInvalid(string.Format(LRibbonMarkingFInvalid_0, x)));
for (var x = RibbonIndex.MarkLunchtime; x <= RibbonIndex.MarkSlump; x++)
{
if (m.GetRibbon((int)x))
data.AddLine(GetInvalid(string.Format(LRibbonMarkingFInvalid_0, x)));
}
}
private void VerifyMarksPresent(LegalityAnalysis data, IRibbonIndex m)

View file

@ -110,17 +110,5 @@
{
public static bool GetRibbonIndex(this IRibbonIndex x, RibbonIndex r) => x.GetRibbon((int)r);
public static void SetRibbonIndex(this IRibbonIndex x, RibbonIndex r, bool value = true) => x.SetRibbon((int)r, value);
public static bool HasMark(this IRibbonIndex m, out RibbonIndex x)
{
for (x = RibbonIndex.MarkLunchtime; x <= RibbonIndex.MarkSlump; x++)
{
if (m.GetRibbon((int) x))
return true;
}
x = (RibbonIndex)0xFF;
return false;
}
}
}