mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 06:38:54 -05: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:
@@ -203,7 +203,7 @@ protected int TransferLanguage(int destLanguage)
|
||||
|
||||
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 void UpdateStats()
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user