Skip to content

Commit

Permalink
Actual fix for Personal struct EVs
Browse files Browse the repository at this point in the history
Restore backup (original) files via ctrl/shift clicking the editor
button.
  • Loading branch information
kwsch committed Sep 2, 2015
1 parent 1928ca0 commit cbf2937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pk3DS/Structs.cs
Expand Up @@ -117,7 +117,7 @@ public byte[] Write()
foreach (byte Type in Types) bw.Write(Type);
bw.Write(CatchRate);
bw.Write(EvoStage);
EVs = (ushort)(EVs & 0x80 | (EV_HP >> 0 & 3) | (EV_ATK << 2 & 3) | (EV_DEF >> 4 & 3) | (EV_SPE >> 6 & 3) | (EV_SPA >> 8 & 3) | (EV_SPD >> 10 & 3));
EVs = (ushort)(EVs & 0x80 | ((EV_HP & 3) << 0) | ((EV_ATK & 3) << 2) | ((EV_DEF & 3) << 4) | ((EV_SPE & 3) << 6) | ((EV_SPA & 3) << 8) | ((EV_SPD & 3) << 10));
bw.Write(EVs);
foreach (ushort Item in Items) bw.Write(Item);
bw.Write(Gender);
Expand Down

0 comments on commit cbf2937

Please sign in to comment.