Fix FestaCoins

Fix FestaCoins

0x50D08 ... Current coins
0x50D0C ... Total coins
0x69C98 ... Used coins

total = current + used
This commit is contained in:
hogeunk 2016-12-08 10:40:54 +09:00
parent a2c5870deb
commit d754139707

View file

@ -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);
}
}