From 4fdff9581f93d3ac793168a1a4e2f66d50c0c685 Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 11 May 2018 17:40:00 -0700 Subject: [PATCH] Add forme specific cry detect dex-form.wav if not found, reverts to none (dex.wav) https://github.com/kwsch/PKHeX/commit/47be96e92d880b4b64f865fe2219f7f6386e7e77#commitcomment-28950071 --- .../Controls/SAV Editor/SlotChangeManager.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs b/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs index 51364ea85..32dc9b61c 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/SlotChangeManager.cs @@ -157,9 +157,15 @@ private void PlayCry(PKM pk) if (pk.Species == 0) return; - var path = Path.Combine("sounds", $"{pk.Species}.wav"); + string resource = $"{pk.Species}-{pk.AltForm}"; + var path = Path.Combine("sounds", $"{resource}.wav"); if (!File.Exists(path)) - return; + { + resource = $"{pk.Species}"; + path = Path.Combine("sounds", $"{resource}.wav"); + if (!File.Exists(path)) + return; + } Sounds.SoundLocation = path; Sounds.Play();