Use more optimized index find

This commit is contained in:
Kurt 2019-12-03 18:24:28 -08:00
parent 3526c37f1e
commit a0f2aded02

View file

@ -592,7 +592,7 @@ namespace PKHeX.Core
var permit = pk8.PersonalInfo.TMHM;
foreach (var m in moves)
{
var index = Array.FindIndex(Legal.TMHM_SWSH, 100, z => z == m);
var index = Array.IndexOf(Legal.TMHM_SWSH, m, 100);
if (index < 100)
continue;
if (permit[index])