mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Fix arceus held item compare
https://projectpokemon.org/home/forums/topic/52771-bug-report-pkhex-20190515-arceus-forms-error/
This commit is contained in:
parent
7625ab66b4
commit
b7f024e3ea
1 changed files with 2 additions and 2 deletions
|
@ -178,11 +178,11 @@ namespace PKHeX.Core
|
|||
private static int GetArceusFormFromHeldItem(int item, int format)
|
||||
{
|
||||
if (777 <= item && item <= 793)
|
||||
return Array.IndexOf(Legal.Arceus_ZCrystal, item) + 1;
|
||||
return Array.IndexOf(Legal.Arceus_ZCrystal, (ushort)item) + 1;
|
||||
|
||||
int form = 0;
|
||||
if ((298 <= item && item <= 313) || item == 644)
|
||||
form = Array.IndexOf(Legal.Arceus_Plate, item) + 1;
|
||||
form = Array.IndexOf(Legal.Arceus_Plate, (ushort)item) + 1;
|
||||
if (format == 4 && form >= 9)
|
||||
return form + 1; // ??? type Form shifts everything by 1
|
||||
return form;
|
||||
|
|
Loading…
Reference in a new issue