mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-11 21:22:41 +00:00
Fix FestaCoins
Fix FestaCoins 0x50D08 ... Current coins 0x50D0C ... Total coins 0x69C98 ... Used coins total = current + used
This commit is contained in:
parent
a2c5870deb
commit
d754139707
1 changed files with 12 additions and 18 deletions
|
@ -411,7 +411,16 @@ namespace PKHeX
|
|||
BitConverter.GetBytes(value).CopyTo(Data, Misc + 0x11C);
|
||||
}
|
||||
}
|
||||
public uint FestaCoinsDisplayed
|
||||
public uint UsedFestaCoins
|
||||
{
|
||||
get { return BitConverter.ToUInt32(Data, 0x69C98); }
|
||||
set
|
||||
{
|
||||
if (value > 9999999) value = 9999999;
|
||||
BitConverter.GetBytes(value).CopyTo(Data, 0x69C98);
|
||||
}
|
||||
}
|
||||
public uint FestaCoins
|
||||
{
|
||||
get { return BitConverter.ToUInt32(Data, JoinFestaData + 0x508); }
|
||||
set
|
||||
|
@ -419,31 +428,16 @@ namespace PKHeX
|
|||
if (value > 9999999) value = 9999999;
|
||||
BitConverter.GetBytes(value).CopyTo(Data, JoinFestaData + 0x508);
|
||||
|
||||
if (TotalFestaCoins < value)
|
||||
TotalFestaCoins = value;
|
||||
TotalFestaCoins = UsedFestaCoins + value;
|
||||
}
|
||||
}
|
||||
public uint FestaCoins
|
||||
private uint TotalFestaCoins
|
||||
{
|
||||
get { return BitConverter.ToUInt32(Data, JoinFestaData + 0x50C); }
|
||||
set
|
||||
{
|
||||
if (value > 9999999) value = 9999999;
|
||||
BitConverter.GetBytes(value).CopyTo(Data, JoinFestaData + 0x50C);
|
||||
|
||||
if (TotalFestaCoins < value)
|
||||
TotalFestaCoins = value;
|
||||
|
||||
FestaCoinsDisplayed = value;
|
||||
}
|
||||
}
|
||||
private uint TotalFestaCoins
|
||||
{
|
||||
get { return BitConverter.ToUInt32(Data, JoinFestaData + 0x510); }
|
||||
set
|
||||
{
|
||||
if (value > 9999999) value = 9999999;
|
||||
BitConverter.GetBytes(value).CopyTo(Data, JoinFestaData + 0x510);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue