From d8c355cf64a76ceaa3baaa10af647da2c2e171c4 Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 7 Sep 2018 19:11:22 -0700 Subject: [PATCH] use sprite resource name instead of species-form Closes #2113 --- PKHeX.Core/PKM/PKM.cs | 2 +- PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PKHeX.Core/PKM/PKM.cs b/PKHeX.Core/PKM/PKM.cs index 4ed7d5bdf..1376604aa 100644 --- a/PKHeX.Core/PKM/PKM.cs +++ b/PKHeX.Core/PKM/PKM.cs @@ -298,7 +298,7 @@ private void SetID7(int sid7, int tid7) public bool GG => Version == (int)GameVersion.GP || Version == (int)GameVersion.GE; protected bool PtHGSS => Pt || HGSS; public bool VC => VC1 || VC2; - public bool Gen7 => Version >= 30 && Version <= 33; + public bool Gen7 => (Version >= 30 && Version <= 33) || GG; public bool Gen6 => Version >= 24 && Version <= 29; public bool Gen5 => Version >= 20 && Version <= 23; public bool Gen4 => Version >= 7 && Version <= 12 && Version != 9; diff --git a/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs b/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs index 20b4d74b9..80324b63c 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs @@ -228,7 +228,8 @@ private void PlayCry(PKM pk) if (pk.Species == 0) return; - var path = Path.Combine(Main.CryPath, $"{pk.Species}-{pk.AltForm}.wav"); + var name = PKX.GetResourceStringSprite(pk.Species, pk.AltForm, pk.Gender, pk.Format).Replace('_','-'); + var path = Path.Combine(Main.CryPath, $"{name}.wav"); if (!File.Exists(path)) { path = Path.Combine(Main.CryPath, $"{pk.Species}.wav");