Fix wc7 deletion

shift down logic does not apply for array writes; the setter sets empty
slots to fill all required slots
Closes #1142
This commit is contained in:
Kurt 2017-05-16 21:29:34 -07:00
parent 7edc2eb14f
commit 7d39b70d91
2 changed files with 0 additions and 10 deletions

View file

@ -980,11 +980,6 @@ namespace PKHeX.Core
wc6.Data.CopyTo(Data, WondercardData + index * WC6.Size);
for (int i = 0; i < GiftCountMax; i++)
if (getData(WondercardData + i * WC6.Size, WC6.Size).All(b => b == 0)) // empty
for (int j = i + 1; j < GiftCountMax - i; j++) // Shift everything down
Array.Copy(Data, WondercardData + j * WC6.Size, Data, WondercardData + (j - 1) * WC6.Size, WC6.Size);
Edited = true;
}

View file

@ -1226,11 +1226,6 @@ namespace PKHeX.Core
wc7.Data.CopyTo(Data, WondercardData + index * WC7.Size);
for (int i = 0; i < GiftCountMax; i++)
if (getData(WondercardData + i * WC7.Size, WC7.Size).All(b => b == 0)) // empty
for (int j = i + 1; j < GiftCountMax - i; j++) // Shift everything down
Array.Copy(Data, WondercardData + j * WC7.Size, Data, WondercardData + (j - 1) * WC7.Size, WC7.Size);
Edited = true;
}