Compare commits

..

No commits in common. "main" and "1.9.0" have entirely different histories.
main ... 1.9.0

4 changed files with 5 additions and 11 deletions

View File

@ -12,7 +12,6 @@ This allows wondercards to be redeemed through the in-game Mystery Gift menu. Th
* Brilliant Diamond and Shining Pearl wondercard files (.wb8)
* Legends Arceus wondercard files (.wa8)
* Scarlet & Violet wondercard files (.wc9)
* Legends Z-A wondercard files (.wa9)
* BCAT wondercard files, containing either multiple or single wondercards (no file format extension)
### Compatible games
@ -21,7 +20,6 @@ This allows wondercards to be redeemed through the in-game Mystery Gift menu. Th
* Pokémon Brilliant Diamond and Shining Pearl
* Pokémon Legends Arceus
* Pokémon Scarlet and Violet
* Pokémon Legends Z-A
## Disclosure
Neither I nor the Project Pokémon staff take any responsibility for possible adverse outcomes or bans resulting from the use of this tool. Use it at your own discretion.
@ -83,4 +81,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -101,7 +101,7 @@ public class OtherGift
}
else if (type.GetType() == typeof(GiftType9A))
{
if ((GiftType9A)type is GiftType9A.Item or GiftType9A.Flag)
if ((GiftType9A)type is GiftType9A.Item)
str = Properties.Resources.Items.Split(new String[] { "\n" }, StringSplitOptions.None)[id];
else if ((GiftType9A)type is GiftType9A.Clothing)
{

View File

@ -13,9 +13,6 @@ public class WA9 : Wondercard
private const int TIDOffset = 0x18;
private const int SIDOffset = 0x1A;
private const int PIDOffset = 0x24;
private const int FlagStringOffset = 0x28;
private const int FlagItemOffset = 0x6C;
private const int FlagItemQuantityOffset = 0x6E;
private const int SpeciesOffset = 0x270;
private const int ShinyTypeOffset = 0x278;
private const int ChecksumOffset = 0x2C0;
@ -85,9 +82,8 @@ public class WA9 : Wondercard
}
else
{
item = type is GiftType9A.Flag ? BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(FlagItemOffset + (0x04 * i))) :
BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(ItemOffset + (0x04 * i)));
quantity = type is GiftType9A.Flag ? BinaryPrimitives.ReadUInt32LittleEndian(Data.AsSpan(FlagItemQuantityOffset + (0x04 * i))) :
item = BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(ItemOffset + (0x04 * i)));
quantity = type is GiftType9A.BP ? BinaryPrimitives.ReadUInt32LittleEndian(Data.AsSpan(ItemOffset + (0x04 * i))) :
BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(QuantityOffset + (0x04 * i)));
}

View File

@ -78,7 +78,7 @@ public enum GiftType9A : byte
None = 0,
Pokemon = 1,
Item = 2,
Flag = 3,
BP = 3,
Clothing = 4,
}