mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-06 22:44:25 -05:00
Add treasure items to valid held item table
This commit is contained in:
parent
ab7e920410
commit
025e36c5fc
|
|
@ -181,7 +181,7 @@ public static partial class Legal
|
|||
1105, 1106, 1107, 1108,
|
||||
};
|
||||
|
||||
internal static readonly ushort[] HeldItems_SWSH = new ushort[1].Concat(Pouch_Items_SWSH).Concat(Pouch_Berries_SWSH).Concat(Pouch_Medicine_SWSH).Concat(TR_SWSH).ToArray();
|
||||
internal static readonly ushort[] HeldItems_SWSH = ArrayUtil.ConcatAll(new ushort[1], Pouch_Items_SWSH, Pouch_Berries_SWSH, Pouch_Medicine_SWSH, TR_SWSH, Pouch_Treasure_SWSH);
|
||||
|
||||
internal static readonly HashSet<int> WildPokeballs8 = new HashSet<int> {
|
||||
(int)Ball.Poke,
|
||||
|
|
|
|||
|
|
@ -160,5 +160,23 @@ public static int CopyTo<T>(this IEnumerable<T> list, IList<T> dest, int start =
|
|||
}
|
||||
return ctr - start;
|
||||
}
|
||||
|
||||
internal static T[] ConcatAll<T>(params T[][] arr)
|
||||
{
|
||||
int len = 0;
|
||||
foreach (var a in arr)
|
||||
len += a.Length;
|
||||
|
||||
var result = new T[len];
|
||||
|
||||
int ctr = 0;
|
||||
for (int i = 0; i < arr.Length; i++)
|
||||
{
|
||||
arr[i].CopyTo(result, ctr);
|
||||
ctr += arr[i].Length;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user