mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-07-28 15:57:26 -05:00
Tweak set override logic
If the method defines whether or not the sub should be called, that will be used. Else, it will use the global setting.
This commit is contained in:
parent
a4b5033b1e
commit
dd910e6aa1
12
Misc/SAV6.cs
12
Misc/SAV6.cs
|
|
@ -467,9 +467,9 @@ public PK6 getPK6Stored(int offset)
|
|||
}
|
||||
public void setPK6Party(PK6 pk6, int offset, bool? trade = null, bool? dex = null)
|
||||
{
|
||||
if (SetUpdatePK6 || (trade ?? false))
|
||||
if (trade ?? SetUpdatePK6)
|
||||
setPK6(pk6);
|
||||
if (SetUpdateDex || (dex ?? false))
|
||||
if (dex ?? SetUpdateDex)
|
||||
setDex(pk6);
|
||||
|
||||
byte[] ek6 = encryptArray(pk6.Data);
|
||||
|
|
@ -479,9 +479,9 @@ public void setPK6Party(PK6 pk6, int offset, bool? trade = null, bool? dex = nul
|
|||
}
|
||||
public void setPK6Stored(PK6 pk6, int offset, bool? trade = null, bool? dex = null)
|
||||
{
|
||||
if (SetUpdatePK6 || (trade ?? false))
|
||||
if (trade ?? SetUpdatePK6)
|
||||
setPK6(pk6);
|
||||
if (SetUpdateDex || (dex ?? false))
|
||||
if (dex ?? SetUpdateDex)
|
||||
setDex(pk6);
|
||||
|
||||
byte[] ek6 = encryptArray(pk6.Data);
|
||||
|
|
@ -492,9 +492,9 @@ public void setPK6Stored(PK6 pk6, int offset, bool? trade = null, bool? dex = nu
|
|||
public void setEK6Stored(byte[] ek6, int offset, bool? trade = null, bool? dex = null)
|
||||
{
|
||||
PK6 pk6 = new PK6(decryptArray(ek6));
|
||||
if (SetUpdatePK6 || (trade ?? false))
|
||||
if (trade ?? SetUpdatePK6)
|
||||
setPK6(pk6);
|
||||
if (SetUpdateDex || (dex ?? false))
|
||||
if (dex ?? SetUpdateDex)
|
||||
setDex(pk6);
|
||||
|
||||
Array.Resize(ref ek6, PK6.SIZE_STORED);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user