Minor clean

invert nesting, add missing if( space, group OT checks together
This commit is contained in:
Kurt 2022-05-02 23:48:25 -07:00
parent d58aed109d
commit 7c8f52cbbf
4 changed files with 22 additions and 22 deletions

View file

@ -30,8 +30,9 @@ namespace PKHeX.Core
public static ModifyResult SetSuggestedMasteryData(BatchInfo info, string propValue)
{
var pk = info.Entity;
if (pk is IMoveShop8Mastery t)
{
if (pk is not IMoveShop8Mastery t)
return ModifyResult.Invalid;
if (IsAll(propValue))
{
t.SetMoveShopFlags();
@ -49,8 +50,6 @@ namespace PKHeX.Core
}
return ModifyResult.Modified;
}
return ModifyResult.Invalid;
}
public static ModifyResult SetSuggestedRibbons(BatchInfo info, string value)
{

View file

@ -46,10 +46,11 @@ namespace PKHeX.Core
{
if (WordFilter.IsFiltered(ot, out string bad))
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
if (WordFilter.IsFiltered(pkm.HT_Name, out bad))
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
if (ContainsTooManyNumbers(ot, data.Info.Generation))
data.AddLine(GetInvalid("Wordfilter: Too many numbers."));
if (WordFilter.IsFiltered(pkm.HT_Name, out bad))
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
}
}