mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-25 08:10:48 -05:00
Fix Rival → RivalName rename from upstream
Upstream renamed SAV8BS.Rival and Misc7b.Rival to RivalName. Update Avalonia ViewModels to match.
This commit is contained in:
parent
c2719273ca
commit
512caa4122
|
|
@ -47,7 +47,7 @@ public SAVTrainer7GGViewModel(SAV7b sav) : base(sav)
|
|||
private void LoadData()
|
||||
{
|
||||
OtName = _sav.OT;
|
||||
RivalName = _sav.Blocks.Misc.Rival;
|
||||
RivalName = _sav.Blocks.Misc.RivalName;
|
||||
Gender = _sav.Gender;
|
||||
Money = _sav.Blocks.Misc.Money.ToString();
|
||||
Language = _sav.Language;
|
||||
|
|
@ -85,7 +85,7 @@ private void Save()
|
|||
_sav.Money = uint.TryParse(Money, out var m) ? m : 0u;
|
||||
_sav.Language = Language;
|
||||
_sav.OT = OtName;
|
||||
_sav.Blocks.Misc.Rival = RivalName;
|
||||
_sav.Blocks.Misc.RivalName = RivalName;
|
||||
|
||||
_sav.PlayedHours = (ushort)Math.Clamp(PlayedHours, 0, ushort.MaxValue);
|
||||
_sav.PlayedMinutes = (ushort)Math.Clamp(PlayedMinutes, 0, 59);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ private void LoadData()
|
|||
GameIndex = Math.Clamp((byte)_sav.Version - (byte)GameVersion.BD, 0, 1);
|
||||
Gender = _sav.Gender;
|
||||
OtName = _sav.OT;
|
||||
Rival = _sav.Rival;
|
||||
Rival = _sav.RivalName;
|
||||
Money = _sav.Money.ToString();
|
||||
Bp = (int)_sav.BattleTower.BP;
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ private void Save()
|
|||
_sav.Version = (GameVersion)(GameIndex + (int)GameVersion.BD);
|
||||
_sav.Gender = (byte)Gender;
|
||||
_sav.OT = OtName;
|
||||
_sav.Rival = Rival;
|
||||
_sav.RivalName = Rival;
|
||||
_sav.Money = uint.TryParse(Money, out var money) ? (uint)Math.Min(money, (uint)_sav.MaxMoney) : 0u;
|
||||
_sav.BattleTower.BP = (uint)Math.Max(0, Bp);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user