mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 20:13:06 +00:00
Add wc5full compatibility (#3854)
* Add WC5Full compatibility * Add .wc5full to mystery gift filter
This commit is contained in:
parent
e53ca4b1af
commit
43c67fd455
3 changed files with 6 additions and 2 deletions
|
@ -39,6 +39,7 @@ public abstract class MysteryGift : IEncounterable, IMoveset, IRelearn, ITrainer
|
|||
WA8.Size when Equals(ext, ".wa8") => new WA8(data),
|
||||
WC9.Size when Equals(ext, ".wc9") => new WC9(data),
|
||||
|
||||
PGF.SizeFull when Equals(ext, ".wc5full") => new PGF(data),
|
||||
WB7.SizeFull when Equals(ext, ".wb7full") => new WB7(data),
|
||||
WC6Full.Size when Equals(ext, ".wc6full") => new WC6Full(data).Gift,
|
||||
WC7Full.Size when Equals(ext, ".wc7full") => new WC7Full(data).Gift,
|
||||
|
@ -59,9 +60,11 @@ public abstract class MysteryGift : IEncounterable, IMoveset, IRelearn, ITrainer
|
|||
PCD.Size => new PCD(data),
|
||||
PGF.Size => new PGF(data),
|
||||
WR7.Size => new WR7(data),
|
||||
WC8.Size => new WC8(data),
|
||||
WB8.Size => new WB8(data),
|
||||
|
||||
// WC8/WC5Full: WC8 0x2CF always 0, WC5Full 0x2CF contains card checksum
|
||||
WC8.Size => data[0x2CF] == 0 ? new WC8(data) : new PGF(data),
|
||||
|
||||
// WA8/WC9: WA8 CardType >0 for wa8, 0 for wc9.
|
||||
WA8.Size => data[0xF] > 0 ? new WA8(data) : new WC9(data),
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace PKHeX.Core;
|
|||
public sealed class PGF : DataMysteryGift, IRibbonSetEvent3, IRibbonSetEvent4, ILangNick, IContestStats, INature
|
||||
{
|
||||
public const int Size = 0xCC;
|
||||
public const int SizeFull = 0x2D0;
|
||||
public override int Generation => 5;
|
||||
public override EntityContext Context => EntityContext.Gen5;
|
||||
public override bool FatefulEncounter => true;
|
||||
|
|
|
@ -424,7 +424,7 @@ public static class WinFormsUtil
|
|||
public static string GetMysterGiftFilter(EntityContext context) => context switch
|
||||
{
|
||||
EntityContext.Gen4 => "Gen4 Mystery Gift|*.pgt;*.pcd;*.wc4" + all,
|
||||
EntityContext.Gen5 => "Gen5 Mystery Gift|*.pgf" + all,
|
||||
EntityContext.Gen5 => "Gen5 Mystery Gift|*.pgf;*.wc5full" + all,
|
||||
EntityContext.Gen6 => "Gen6 Mystery Gift|*.wc6;*.wc6full" + all,
|
||||
EntityContext.Gen7 => "Gen7 Mystery Gift|*.wc7;*.wc7full" + all,
|
||||
EntityContext.Gen8 => "Gen8 Mystery Gift|*.wc8" + all,
|
||||
|
|
Loading…
Reference in a new issue