mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 20:13:06 +00:00
Fix dex gender set again
Closes #2356 update test case to actually set a genderless gender
This commit is contained in:
parent
f37a587a1c
commit
82f305cd36
2 changed files with 4 additions and 2 deletions
|
@ -118,7 +118,7 @@ namespace PKHeX.Core
|
|||
|
||||
protected void SetDexFlags(int baseBit, int formBit, int gender, int shiny, bool value = true)
|
||||
{
|
||||
int shift = gender | (shiny << 1);
|
||||
int shift = (gender & 1) | (shiny << 1);
|
||||
|
||||
// Set the [Species/Gender/Shiny] Seen Flag
|
||||
SetFlag(OFS_SEEN + (shift * BitSeenSize), baseBit, value);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
using Xunit;
|
||||
using FluentAssertions;
|
||||
using PKHeX.Core;
|
||||
|
||||
namespace PKHeX.Core.Tests.Saves
|
||||
namespace PKHeX.Tests.Saves
|
||||
{
|
||||
public static class PokeDex
|
||||
{
|
||||
|
@ -27,6 +28,7 @@ namespace PKHeX.Core.Tests.Saves
|
|||
private static void SetDexSpecies(SaveFile sav, int species, int regionSize)
|
||||
{
|
||||
var pk5 = new PK5 {Species = species, TID = 1337}; // non-shiny
|
||||
pk5.Gender = pk5.GetSaneGender();
|
||||
|
||||
int boxofs = sav.GetBoxSlotOffset(0, 0);
|
||||
sav.SetStoredSlot(pk5, boxofs);
|
||||
|
|
Loading…
Reference in a new issue