mirror of
https://github.com/Manu098vm/Switch-Gift-Data-Manager.git
synced 2026-03-22 01:44:24 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef1c90dbea | ||
|
|
f8fb4485c0 |
|
|
@ -12,6 +12,7 @@ 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
|
||||
|
|
@ -20,6 +21,7 @@ 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.
|
||||
|
|
@ -81,4 +83,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/>.
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public class OtherGift
|
|||
}
|
||||
else if (type.GetType() == typeof(GiftType9A))
|
||||
{
|
||||
if ((GiftType9A)type is GiftType9A.Item)
|
||||
if ((GiftType9A)type is GiftType9A.Item or GiftType9A.Flag)
|
||||
str = Properties.Resources.Items.Split(new String[] { "\n" }, StringSplitOptions.None)[id];
|
||||
else if ((GiftType9A)type is GiftType9A.Clothing)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ 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;
|
||||
|
|
@ -82,8 +85,9 @@ public class WA9 : Wondercard
|
|||
}
|
||||
else
|
||||
{
|
||||
item = BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(ItemOffset + (0x04 * i)));
|
||||
quantity = type is GiftType9A.BP ? BinaryPrimitives.ReadUInt32LittleEndian(Data.AsSpan(ItemOffset + (0x04 * i))) :
|
||||
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))) :
|
||||
BinaryPrimitives.ReadUInt16LittleEndian(Data.AsSpan(QuantityOffset + (0x04 * i)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public enum GiftType9A : byte
|
|||
None = 0,
|
||||
Pokemon = 1,
|
||||
Item = 2,
|
||||
BP = 3,
|
||||
Flag = 3,
|
||||
Clothing = 4,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user