From 1bcb6767739bfefd98e26fa13975e45be8d1b098 Mon Sep 17 00:00:00 2001 From: AdAstra-LD <76622070+AdAstra-LD@users.noreply.github.com> Date: Sun, 22 Aug 2021 04:19:23 +0200 Subject: [PATCH] Partially Fixed Trainer Editor (tuber Jared) --- DS_Map/ROMFiles/TrainerFile.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DS_Map/ROMFiles/TrainerFile.cs b/DS_Map/ROMFiles/TrainerFile.cs index c83a67f..479da31 100644 --- a/DS_Map/ROMFiles/TrainerFile.cs +++ b/DS_Map/ROMFiles/TrainerFile.cs @@ -194,7 +194,11 @@ namespace DSPRE.ROMFiles { for (int i = 0; i < endval; i++) { ushort unknown1 = reader.ReadUInt16(); ushort level = reader.ReadUInt16(); - ushort pokemon = reader.ReadUInt16(); + + //NOTE: This bitwise AND fixes TUBER JARED [PLAT] and all trainers + //who use pokemon with a special form --> ALL PARTY POKEMON WITH A SPECIAL FORM WILL LOSE IT + ushort pokemon = (ushort)(reader.ReadUInt16() & (ushort.MaxValue>>7)); + ushort? heldItem = null; ushort[] moves = null;