mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05: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
|
|
@ -178,11 +178,11 @@ bool IsValidPikachuCap()
|
|||
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 New Issue
Block a user