mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Use Current Level instead of Stat Level for pk1/2
Closes #3704 all other impl of LoadStats get CurrentLevel
This commit is contained in:
parent
88830e0d00
commit
7b910504ce
2 changed files with 4 additions and 2 deletions
|
@ -203,7 +203,7 @@ public abstract class GBPKM : PKM
|
|||
|
||||
public override void LoadStats(IBaseStat p, Span<ushort> stats)
|
||||
{
|
||||
var lv = Stat_Level;
|
||||
var lv = CurrentLevel; // recalculate instead of checking Stat_Level
|
||||
stats[0] = (ushort)(GetStat(p.HP, IV_HP, EV_HP, lv) + (5 + lv)); // HP
|
||||
stats[1] = GetStat(p.ATK, IV_ATK, EV_ATK, lv);
|
||||
stats[2] = GetStat(p.DEF, IV_DEF, EV_DEF, lv);
|
||||
|
|
|
@ -389,7 +389,9 @@ public partial class StatEditor : UserControl
|
|||
{
|
||||
var pt = MainEditor.RequestSaveFile.Personal;
|
||||
var pi = pt.GetFormEntry(Entity.Species, Entity.Form);
|
||||
Entity.SetStats(Entity.GetStats(pi));
|
||||
Span<ushort> stats = stackalloc ushort[6];
|
||||
Entity.LoadStats(pi, stats);
|
||||
Entity.SetStats(stats);
|
||||
LoadBST(pi);
|
||||
LoadPartyStats(Entity);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue