use sprite resource name instead of species-form

Closes #2113
This commit is contained in:
Kurt
2018-09-07 19:11:22 -07:00
parent 316341e140
commit d8c355cf64
2 changed files with 3 additions and 2 deletions

View File

@@ -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;

View File

@@ -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");