mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
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:
parent
7edc2eb14f
commit
7d39b70d91
2 changed files with 0 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue