From 8d08f291c3361db5d06f4a9fce739cfa273db4ea Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 2 Dec 2016 19:32:58 -0800 Subject: [PATCH] Add private EXP setter set level will set the correct EXP Closes #562 --- PKHeX/PKM/PKM.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKHeX/PKM/PKM.cs b/PKHeX/PKM/PKM.cs index 267d15fa0..a5541f01e 100644 --- a/PKHeX/PKM/PKM.cs +++ b/PKHeX/PKM/PKM.cs @@ -284,7 +284,7 @@ namespace PKHeX public bool PKRS_Infected => PKRS_Strain > 0; public bool PKRS_Cured => PKRS_Days == 0 && PKRS_Strain > 0; public virtual bool ChecksumValid => Checksum == CalculateChecksum(); - public int CurrentLevel => PKX.getLevel(Species, EXP); + public int CurrentLevel { get { return PKX.getLevel(Species, EXP); } private set { EXP = PKX.getEXP(value, Species); } } public bool MarkCircle { get { return (MarkValue & (1 << 0)) == 1 << 0; } set { MarkValue = (byte)(MarkValue & ~(1 << 0) | (value ? 1 << 0 : 0)); } } public bool MarkTriangle { get { return (MarkValue & (1 << 1)) == 1 << 1; } set { MarkValue = (byte)(MarkValue & ~(1 << 0) | (value ? 1 << 0 : 0)); } } public bool MarkSquare { get { return (MarkValue & (1 << 2)) == 1 << 2; } set { MarkValue = (byte)(MarkValue & ~(1 << 0) | (value ? 1 << 0 : 0)); } }